Skip to content

update_launch_configuration_defaults

update_launch_configuration_defaults(
    source_server_id: SourceServerID,
    *,
    config_overrides: Optional[mgnClientConfig] = None,
    account_id: Optional[AccountID] = None,
    small_volume_max_size: Optional[PositiveInteger] = None,
    small_volume_configuration: Optional[SourceServerVolumeConfiguration] = None,
    large_volume_configuration: Optional[SourceServerVolumeConfiguration] = None,
) -> UpdateLaunchConfigurationDefaultsResponse

Updates the launch configuration defaults of a source server. They apply only to disk mappings created later in the source server's Amazon Elastic Compute Cloud (Amazon EC2) launch template, and members you omit keep their current values.

Parameters:

  • source_server_id (SourceServerID) –

    Request to update the launch configuration defaults by Source Server ID.

  • account_id (Optional[AccountID], default: None ) –

    Request to update the launch configuration defaults by Account ID.

  • small_volume_max_size (Optional[PositiveInteger], default: None ) –

    Disks up to this size, in GiB, use the small volume configuration, and larger disks use the large one. 0 means every disk uses the large one. If you omit it, the current value is kept.

  • small_volume_configuration (Optional[SourceServerVolumeConfiguration], default: None ) –

    Volume configuration for disks up to smallVolumeMaxSize. If you omit it, the current one is kept. If you send it, it replaces the current one: fields you omit are cleared, and an empty configuration, {}, clears all of them.

  • large_volume_configuration (Optional[SourceServerVolumeConfiguration], default: None ) –

    Volume configuration for disks larger than smallVolumeMaxSize. If you omit it, the current one is kept. If you send it, it replaces the current one: fields you omit are cleared, and an empty configuration, {}, clears all of them.

Raises:

Source code in docs_src/capo_mgn/_services/mgn.py
def update_launch_configuration_defaults(
    self,
    source_server_id: "capo_mgn.types.source_server_id.SourceServerID",
    *,
    config_overrides: Optional[mgnClientConfig] = None,
    account_id: Optional["capo_mgn.types.account_id.AccountID"] = None,
    small_volume_max_size: Optional[
        "capo_mgn.types.positive_integer.PositiveInteger"
    ] = None,
    small_volume_configuration: Optional[
        "capo_mgn.types.source_server_volume_configuration.SourceServerVolumeConfiguration"
    ] = None,
    large_volume_configuration: Optional[
        "capo_mgn.types.source_server_volume_configuration.SourceServerVolumeConfiguration"
    ] = None,
) -> "capo_mgn.types.update_launch_configuration_defaults_response.UpdateLaunchConfigurationDefaultsResponse":
    """<p>Updates the launch configuration defaults of a source server. They apply only to disk mappings created later in the source server's Amazon Elastic Compute Cloud (Amazon EC2) launch template, and members you omit keep their current values.</p>

    Args:
        source_server_id: <p>Request to update the launch configuration defaults by Source Server ID.</p>
        account_id: <p>Request to update the launch configuration defaults by Account ID.</p>
        small_volume_max_size: <p>Disks up to this size, in GiB, use the small volume configuration, and larger disks use the large one. <code>0</code> means every disk uses the large one. If you omit it, the current value is kept.</p>
        small_volume_configuration: <p>Volume configuration for disks up to <code>smallVolumeMaxSize</code>. If you omit it, the current one is kept. If you send it, it replaces the current one: fields you omit are cleared, and an empty configuration, <code>{}</code>, clears all of them.</p>
        large_volume_configuration: <p>Volume configuration for disks larger than <code>smallVolumeMaxSize</code>. If you omit it, the current one is kept. If you send it, it replaces the current one: fields you omit are cleared, and an empty configuration, <code>{}</code>, clears all of them.</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.
    """

    def _handler(
        req: "OperationRequest[capo_mgn.types.update_launch_configuration_defaults_request.UpdateLaunchConfigurationDefaultsRequest]",
    ) -> OperationResponse[
        "capo_mgn.types.update_launch_configuration_defaults_response.UpdateLaunchConfigurationDefaultsResponse"
    ]:
        import capo_mgn._operations.application_migration_service.update_launch_configuration_defaults

        output, http_response = (
            capo_mgn._operations.application_migration_service.update_launch_configuration_defaults.update_launch_configuration_defaults(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateLaunchConfigurationDefaults")
    )
    input_: capo_mgn.types.update_launch_configuration_defaults_request.UpdateLaunchConfigurationDefaultsRequest = {
        "source_server_id": source_server_id
    }
    if account_id is not None:
        input_["account_id"] = account_id
    if small_volume_max_size is not None:
        input_["small_volume_max_size"] = small_volume_max_size
    if small_volume_configuration is not None:
        input_["small_volume_configuration"] = small_volume_configuration
    if large_volume_configuration is not None:
        input_["large_volume_configuration"] = large_volume_configuration

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output