Skip to content

create_replication_set async

create_replication_set(
    regions: RegionMapInput,
    *,
    config_overrides: Optional[AsyncSSMIncidentsClientConfig] = None,
    client_token: Optional[ClientToken] = None,
    tags: Optional[TagMap] = None,
) -> CreateReplicationSetOutput

A replication set replicates and encrypts your data to the provided Regions with the provided KMS key.

Parameters:

  • regions (RegionMapInput) –

    The Regions that Incident Manager replicates your data to. You can have up to three Regions in your replication set.

  • client_token (Optional[ClientToken], default: None ) –

    A token that ensures that the operation is called only once with the specified details.

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

    A list of tags to add to the replication set.

Raises:

Source code in docs_src/capo_ssm_incidents/_services/async_ssm_incidents.py
async def create_replication_set(
    self,
    regions: "capo_ssm_incidents.types.region_map_input.RegionMapInput",
    *,
    config_overrides: Optional[AsyncSSMIncidentsClientConfig] = None,
    client_token: Optional[
        "capo_ssm_incidents.types.client_token.ClientToken"
    ] = None,
    tags: Optional["capo_ssm_incidents.types.tag_map.TagMap"] = None,
) -> "capo_ssm_incidents.types.create_replication_set_output.CreateReplicationSetOutput":
    """<p>A replication set replicates and encrypts your data to the provided Regions with the provided KMS key. </p>

    Args:
        regions: <p>The Regions that Incident Manager replicates your data to. You can have up to three Regions in your replication set.</p>
        client_token: <p>A token that ensures that the operation is called only once with the specified details.</p>
        tags: <p>A list of tags to add to the replication set.</p>

    Raises:
        capo_ssm_incidents.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation.</p>
        capo_ssm_incidents.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource causes an inconsistent state.</p>
        capo_ssm_incidents.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_ssm_incidents.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>Request would cause a service quota to be exceeded.</p>
        capo_ssm_incidents.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_ssm_incidents.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_ssm_incidents.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ssm_incidents.types.create_replication_set_input.CreateReplicationSetInput]",
    ) -> AsyncOperationResponse[
        "capo_ssm_incidents.types.create_replication_set_output.CreateReplicationSetOutput"
    ]:
        import capo_ssm_incidents._operations.ssm_incidents.create_replication_set

        (
            output,
            http_response,
        ) = await capo_ssm_incidents._operations.ssm_incidents.create_replication_set.async_create_replication_set(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateReplicationSet")
    )
    input_: capo_ssm_incidents.types.create_replication_set_input.CreateReplicationSetInput = {
        "regions": regions
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output