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,
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. -
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.
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
2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 | |