describe_policies
async
¶
describe_policies(
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = None,
auto_scaling_group_name: Optional[XmlStringMaxLen255] = None,
policy_names: Optional[PolicyNames] = None,
policy_types: Optional[PolicyTypes] = None,
include_managed_resources: Optional[IncludeManagedResources] = None,
next_token: Optional[XmlString] = None,
max_records: Optional[MaxRecords] = None,
) -> PoliciesType
Gets information about the scaling policies in the account and Region.
Parameters:
-
auto_scaling_group_name(Optional[XmlStringMaxLen255], default:None) –The name of the Auto Scaling group.
-
policy_names(Optional[PolicyNames], default:None) –The names of one or more policies. If you omit this property, all policies are described. If a group name is provided, the results are limited to that group. If you specify an unknown policy name, it is ignored with no error.
Array Members: Maximum number of 50 items.
-
policy_types(Optional[PolicyTypes], default:None) –One or more policy types. The valid values are
SimpleScaling,StepScaling,TargetTrackingScaling, andPredictiveScaling. -
include_managed_resources(Optional[IncludeManagedResources], default:None) –Specifies whether to include scaling policies for managed Auto Scaling groups in the response. When set to
true(default), the response includes scaling policies for managed Auto Scaling groups. -
next_token(Optional[XmlString], default:None) –The token for the next set of items to return. (You received this token from a previous call.)
-
max_records(Optional[MaxRecords], default:None) –The maximum number of items to be returned with each call. The default value is
50and the maximum value is100.A response can contain fewer items than the value specified by
MaxRecords, even when more items are available. To retrieve the additional items, use theNextTokenvalue in a subsequent call rather than relying on the number of items in the response.
Raises:
-
InvalidNextToken–The
NextTokenvalue is not valid. -
ResourceContentionFault–You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
ServiceLinkedRoleFailure–The service-linked role is not yet ready for use.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To describe scaling policies This example describes the policies for the specified Auto Scaling group.
Source code in docs_src/capo_auto_scaling/_services/async_auto_scaling.py
2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 | |