Gets information about the launch configurations in the account and Region.
Parameters:
-
launch_configuration_names
(Optional[LaunchConfigurationNames], default:
None
)
–
The launch configuration names. If you omit this property, all launch configurations are described.
Array Members: Maximum number of 50 items.
-
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 return with this call. The default value is 50 and the maximum value is 100.
Raises:
-
InvalidNextToken
–
The NextToken value 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).
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
To describe Auto Scaling launch configurations
This example describes the specified launch configuration.
>>> client.describe_launch_configurations(launch_configuration_names=['my-launch-config'])
Source code in docs_src/capo_auto_scaling/_services/auto_scaling.py
| def describe_launch_configurations(
self,
*,
config_overrides: Optional[AutoScalingClientConfig] = None,
launch_configuration_names: Optional[
"capo_auto_scaling.types.launch_configuration_names.LaunchConfigurationNames"
] = None,
next_token: Optional["capo_auto_scaling.types.xml_string.XmlString"] = None,
max_records: Optional["capo_auto_scaling.types.max_records.MaxRecords"] = None,
) -> "capo_auto_scaling.types.launch_configurations_type.LaunchConfigurationsType":
"""<p>Gets information about the launch configurations in the account and Region.</p>
Args:
launch_configuration_names: <p>The launch configuration names. If you omit this property, all launch configurations are described.</p> <p>Array Members: Maximum number of 50 items.</p>
next_token: <p>The token for the next set of items to return. (You received this token from a previous call.)</p>
max_records: <p>The maximum number of items to return with this call. The default value is <code>50</code> and the maximum value is <code>100</code>.</p>
Raises:
capo_auto_scaling.errors.invalid_next_token.InvalidNextToken: <p>The <code>NextToken</code> value is not valid.</p>
capo_auto_scaling.errors.resource_contention_fault.ResourceContentionFault: <p>You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).</p>
capo_auto_scaling.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
To describe Auto Scaling launch configurations
This example describes the specified launch configuration.
>>> client.describe_launch_configurations(launch_configuration_names=['my-launch-config'])
"""
def _handler(
req: "OperationRequest[capo_auto_scaling.types.launch_configuration_names_type.LaunchConfigurationNamesType]",
) -> OperationResponse[
"capo_auto_scaling.types.launch_configurations_type.LaunchConfigurationsType"
]:
import capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_launch_configurations
output, http_response = (
capo_auto_scaling._operations.auto_scaling_2011_01_01.describe_launch_configurations.describe_launch_configurations(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("DescribeLaunchConfigurations")
)
input_: capo_auto_scaling.types.launch_configuration_names_type.LaunchConfigurationNamesType = {}
if launch_configuration_names is not None:
input_["launch_configuration_names"] = launch_configuration_names
if next_token is not None:
input_["next_token"] = next_token
if max_records is not None:
input_["max_records"] = max_records
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|