Gets the launch configuration defaults of a source server: the Amazon Elastic Block Store (Amazon EBS) volume configuration used for the disk mappings created later in the source server's Amazon Elastic Compute Cloud (Amazon EC2) launch template.
Parameters:
-
source_server_id
(SourceServerID)
–
Request to get the launch configuration defaults by Source Server ID.
-
account_id
(Optional[AccountID], default:
None
)
–
Request to get the launch configuration defaults by Account ID.
Raises:
Source code in docs_src/capo_mgn/_services/async_mgn.py
| async def get_launch_configuration_defaults(
self,
source_server_id: "capo_mgn.types.source_server_id.SourceServerID",
*,
config_overrides: Optional[AsyncmgnClientConfig] = None,
account_id: Optional["capo_mgn.types.account_id.AccountID"] = None,
) -> "capo_mgn.types.get_launch_configuration_defaults_response.GetLaunchConfigurationDefaultsResponse":
"""<p>Gets the launch configuration defaults of a source server: the Amazon Elastic Block Store (Amazon EBS) volume configuration used for the disk mappings created later in the source server's Amazon Elastic Compute Cloud (Amazon EC2) launch template.</p>
Args:
source_server_id: <p>Request to get the launch configuration defaults by Source Server ID.</p>
account_id: <p>Request to get the launch configuration defaults by Account ID.</p>
Raises:
capo_mgn.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found exception.</p>
capo_mgn.errors.uninitialized_account_exception.UninitializedAccountException: <p>Uninitialized account exception.</p>
capo_mgn.errors.validation_exception.ValidationException: <p>Validate exception.</p>
capo_mgn.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_mgn.types.get_launch_configuration_defaults_request.GetLaunchConfigurationDefaultsRequest]",
) -> AsyncOperationResponse[
"capo_mgn.types.get_launch_configuration_defaults_response.GetLaunchConfigurationDefaultsResponse"
]:
import capo_mgn._operations.application_migration_service.get_launch_configuration_defaults
(
output,
http_response,
) = await capo_mgn._operations.application_migration_service.get_launch_configuration_defaults.async_get_launch_configuration_defaults(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetLaunchConfigurationDefaults")
)
input_: capo_mgn.types.get_launch_configuration_defaults_request.GetLaunchConfigurationDefaultsRequest = {
"source_server_id": source_server_id
}
if account_id is not None:
input_["account_id"] = account_id
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|