Retrieves an infrastructure configuration.
Parameters:
-
infrastructure_configuration_arn
(InfrastructureConfigurationArn)
–
The Amazon Resource Name (ARN) of the infrastructure configuration that you want to retrieve.
Raises:
-
CallRateLimitExceededException
–
You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.
-
ClientException
–
A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.
-
ForbiddenException
–
You are not authorized to perform the requested operation.
-
InvalidRequestException
–
The request is malformed or otherwise invalid. Verify the request and try again.
-
ServiceException
–
An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.
-
ServiceUnavailableException
–
The service is unable to process your request at this time.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Examples:
Get the details of an infrastructure configuration
The following example retrieves an infrastructure configuration that specifies the instance types, instance profile, and instance metadata options that Image Builder uses for build and test instances.
>>> await client.get_infrastructure_configuration(infrastructure_configuration_arn='arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure-configuration')
Source code in docs_src/capo_imagebuilder/_services/async_imagebuilder.py
| async def get_infrastructure_configuration(
self,
infrastructure_configuration_arn: "capo_imagebuilder.types.infrastructure_configuration_arn.InfrastructureConfigurationArn",
*,
config_overrides: Optional[AsyncimagebuilderClientConfig] = None,
) -> "capo_imagebuilder.types.get_infrastructure_configuration_response.GetInfrastructureConfigurationResponse":
"""<p>Retrieves an infrastructure configuration.</p>
Args:
infrastructure_configuration_arn: <p>The Amazon Resource Name (ARN) of the infrastructure configuration that you want to retrieve.</p>
Raises:
capo_imagebuilder.errors.call_rate_limit_exceeded_exception.CallRateLimitExceededException: <p>You have exceeded the permitted request rate for the Amazon EC2 APIs that Image Builder calls on your behalf. Retry with an increasing or variable delay between requests.</p>
capo_imagebuilder.errors.client_exception.ClientException: <p>A generic client error. This error usually indicates that the request failed a validation check, such as when a downstream service rejects a configured value.</p>
capo_imagebuilder.errors.forbidden_exception.ForbiddenException: <p>You are not authorized to perform the requested operation.</p>
capo_imagebuilder.errors.invalid_request_exception.InvalidRequestException: <p>The request is malformed or otherwise invalid. Verify the request and try again.</p>
capo_imagebuilder.errors.service_exception.ServiceException: <p>An internal server error occurred while Image Builder processed the request. Retrying the request may succeed.</p>
capo_imagebuilder.errors.service_unavailable_exception.ServiceUnavailableException: <p>The service is unable to process your request at this time.</p>
capo_imagebuilder.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Get the details of an infrastructure configuration
The following example retrieves an infrastructure configuration that specifies the instance types, instance profile, and instance metadata options that Image Builder uses for build and test instances.
>>> await client.get_infrastructure_configuration(infrastructure_configuration_arn='arn:aws:imagebuilder:us-west-2:111122223333:infrastructure-configuration/my-example-infrastructure-configuration')
"""
async def _handler(
req: "AsyncOperationRequest[capo_imagebuilder.types.get_infrastructure_configuration_request.GetInfrastructureConfigurationRequest]",
) -> AsyncOperationResponse[
"capo_imagebuilder.types.get_infrastructure_configuration_response.GetInfrastructureConfigurationResponse"
]:
import capo_imagebuilder._operations.imagebuilder.get_infrastructure_configuration
(
output,
http_response,
) = await capo_imagebuilder._operations.imagebuilder.get_infrastructure_configuration.async_get_infrastructure_configuration(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetInfrastructureConfiguration")
)
input_: capo_imagebuilder.types.get_infrastructure_configuration_request.GetInfrastructureConfigurationRequest = {
"infrastructure_configuration_arn": infrastructure_configuration_arn
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|