describe_policies
¶
describe_policies(
*,
config_overrides: Optional[AutoScalingClientConfig] = 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/auto_scaling.py
2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 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 | |