Skip to content

create_extended_source_server

create_extended_source_server(
    source_server_arn: SourceServerARN,
    *,
    config_overrides: Optional[drsClientConfig] = None,
    tags: Optional[TagsMap] = None,
) -> CreateExtendedSourceServerResponse

Create an extended source server in the target Account based on the source server in staging account.

Parameters:

  • source_server_arn (SourceServerARN) –

    This defines the ARN of the source server in staging Account based on which you want to create an extended source server.

  • tags (Optional[TagsMap], default: None ) –

    A list of tags associated with the extended source server.

Raises:

Source code in docs_src/capo_drs/_services/drs.py
def create_extended_source_server(
    self,
    source_server_arn: "capo_drs.types.source_server_arn.SourceServerARN",
    *,
    config_overrides: Optional[drsClientConfig] = None,
    tags: Optional["capo_drs.types.tags_map.TagsMap"] = None,
) -> "capo_drs.types.create_extended_source_server_response.CreateExtendedSourceServerResponse":
    """<p>Create an extended source server in the target Account based on the source server in staging account.</p>

    Args:
        source_server_arn: <p>This defines the ARN of the source server in staging Account based on which you want to create an extended source server.</p>
        tags: <p>A list of tags associated with the extended source server.</p>

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource for this operation was not found.</p>
        capo_drs.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request could not be completed because its exceeded the service quota.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.uninitialized_account_exception.UninitializedAccountException: <p>The account performing the request has not been initialized.</p>
        capo_drs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the AWS service.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_drs.types.create_extended_source_server_request.CreateExtendedSourceServerRequest]",
    ) -> OperationResponse[
        "capo_drs.types.create_extended_source_server_response.CreateExtendedSourceServerResponse"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.create_extended_source_server

        output, http_response = (
            capo_drs._operations.elastic_disaster_recovery_service.create_extended_source_server.create_extended_source_server(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_drs.types.create_extended_source_server_request.CreateExtendedSourceServerRequest",
    ) -> dict[str, Any]:
        import capo_drs.types.create_extended_source_server_request

        return (
            capo_drs.types.create_extended_source_server_request.redact_sensitive(
                input_
            )
        )

    def _redact_output(
        output: "capo_drs.types.create_extended_source_server_response.CreateExtendedSourceServerResponse",
    ) -> dict[str, Any]:
        import capo_drs.types.create_extended_source_server_response

        return (
            capo_drs.types.create_extended_source_server_response.redact_sensitive(
                output
            )
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateExtendedSourceServer",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_drs.types.create_extended_source_server_request.CreateExtendedSourceServerRequest = {
        "source_server_arn": source_server_arn
    }
    if tags is not None:
        input_["tags"] = tags

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