Skip to content

update_replication_configuration async

update_replication_configuration(
    source_server_id: SourceServerID,
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    name: Optional[SmallBoundedString] = None,
    staging_area_subnet_id: Optional[SubnetID] = None,
    associate_default_security_group: Optional[bool] = None,
    replication_servers_security_groups_i_ds: Optional[
        ReplicationServersSecurityGroupsIDs
    ] = None,
    replication_server_instance_type: Optional[EC2InstanceType] = None,
    use_dedicated_replication_server: Optional[bool] = None,
    default_large_staging_disk_type: Optional[
        ReplicationConfigurationDefaultLargeStagingDiskType
    ] = None,
    replicated_disks: Optional[ReplicationConfigurationReplicatedDisks] = None,
    ebs_encryption: Optional[ReplicationConfigurationEbsEncryption] = None,
    ebs_encryption_key_arn: Optional[ARN] = None,
    bandwidth_throttling: Optional[PositiveInteger] = None,
    data_plane_routing: Optional[ReplicationConfigurationDataPlaneRouting] = None,
    create_public_ip: Optional[bool] = None,
    staging_area_tags: Optional[TagsMap] = None,
    pit_policy: Optional[PITPolicy] = None,
    auto_replicate_new_disks: Optional[bool] = None,
    internet_protocol: Optional[InternetProtocol] = None,
) -> ReplicationConfiguration

Allows you to update a ReplicationConfiguration by Source Server ID.

Parameters:

  • source_server_id (SourceServerID) –

    The ID of the Source Server for this Replication Configuration.

  • name (Optional[SmallBoundedString], default: None ) –

    The name of the Replication Configuration.

  • staging_area_subnet_id (Optional[SubnetID], default: None ) –

    The subnet to be used by the replication staging area.

  • associate_default_security_group (Optional[bool], default: None ) –

    Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.

  • replication_servers_security_groups_i_ds (Optional[ReplicationServersSecurityGroupsIDs], default: None ) –

    The security group IDs that will be used by the replication server.

  • replication_server_instance_type (Optional[EC2InstanceType], default: None ) –

    The instance type to be used for the replication server.

  • use_dedicated_replication_server (Optional[bool], default: None ) –

    Whether to use a dedicated Replication Server in the replication staging area.

  • default_large_staging_disk_type (Optional[ReplicationConfigurationDefaultLargeStagingDiskType], default: None ) –

    The Staging Disk EBS volume type to be used during replication.

  • replicated_disks (Optional[ReplicationConfigurationReplicatedDisks], default: None ) –

    The configuration of the disks of the Source Server to be replicated.

  • ebs_encryption (Optional[ReplicationConfigurationEbsEncryption], default: None ) –

    The type of EBS encryption to be used during replication.

  • ebs_encryption_key_arn (Optional[ARN], default: None ) –

    The ARN of the EBS encryption key to be used during replication.

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

    Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.

  • data_plane_routing (Optional[ReplicationConfigurationDataPlaneRouting], default: None ) –

    The data plane routing mechanism that will be used for replication.

  • create_public_ip (Optional[bool], default: None ) –

    Whether to create a Public IP for the Recovery Instance by default.

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

    A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.

  • pit_policy (Optional[PITPolicy], default: None ) –

    The Point in time (PIT) policy to manage snapshots taken during replication.

  • auto_replicate_new_disks (Optional[bool], default: None ) –

    Whether to allow the AWS replication agent to automatically replicate newly added disks.

  • internet_protocol (Optional[InternetProtocol], default: None ) –

    Which version of the Internet Protocol to use for replication of data. (IPv4 or IPv6)

Raises:

Source code in docs_src/capo_drs/_services/async_drs.py
async def update_replication_configuration(
    self,
    source_server_id: "capo_drs.types.source_server_id.SourceServerID",
    *,
    config_overrides: Optional[AsyncdrsClientConfig] = None,
    name: Optional["capo_drs.types.small_bounded_string.SmallBoundedString"] = None,
    staging_area_subnet_id: Optional["capo_drs.types.subnet_id.SubnetID"] = None,
    associate_default_security_group: Optional[bool] = None,
    replication_servers_security_groups_i_ds: Optional[
        "capo_drs.types.replication_servers_security_groups_i_ds.ReplicationServersSecurityGroupsIDs"
    ] = None,
    replication_server_instance_type: Optional[
        "capo_drs.types.ec2_instance_type.EC2InstanceType"
    ] = None,
    use_dedicated_replication_server: Optional[bool] = None,
    default_large_staging_disk_type: Optional[
        "capo_drs.types.replication_configuration_default_large_staging_disk_type.ReplicationConfigurationDefaultLargeStagingDiskType"
    ] = None,
    replicated_disks: Optional[
        "capo_drs.types.replication_configuration_replicated_disks.ReplicationConfigurationReplicatedDisks"
    ] = None,
    ebs_encryption: Optional[
        "capo_drs.types.replication_configuration_ebs_encryption.ReplicationConfigurationEbsEncryption"
    ] = None,
    ebs_encryption_key_arn: Optional["capo_drs.types.arn.ARN"] = None,
    bandwidth_throttling: Optional[
        "capo_drs.types.positive_integer.PositiveInteger"
    ] = None,
    data_plane_routing: Optional[
        "capo_drs.types.replication_configuration_data_plane_routing.ReplicationConfigurationDataPlaneRouting"
    ] = None,
    create_public_ip: Optional[bool] = None,
    staging_area_tags: Optional["capo_drs.types.tags_map.TagsMap"] = None,
    pit_policy: Optional["capo_drs.types.pit_policy.PITPolicy"] = None,
    auto_replicate_new_disks: Optional[bool] = None,
    internet_protocol: Optional[
        "capo_drs.types.internet_protocol.InternetProtocol"
    ] = None,
) -> "capo_drs.types.replication_configuration.ReplicationConfiguration":
    """<p>Allows you to update a ReplicationConfiguration by Source Server ID.</p>

    Args:
        source_server_id: <p>The ID of the Source Server for this Replication Configuration.</p>
        name: <p>The name of the Replication Configuration.</p>
        staging_area_subnet_id: <p>The subnet to be used by the replication staging area.</p>
        associate_default_security_group: <p>Whether to associate the default Elastic Disaster Recovery Security group with the Replication Configuration.</p>
        replication_servers_security_groups_i_ds: <p>The security group IDs that will be used by the replication server.</p>
        replication_server_instance_type: <p>The instance type to be used for the replication server.</p>
        use_dedicated_replication_server: <p>Whether to use a dedicated Replication Server in the replication staging area.</p>
        default_large_staging_disk_type: <p>The Staging Disk EBS volume type to be used during replication.</p>
        replicated_disks: <p>The configuration of the disks of the Source Server to be replicated.</p>
        ebs_encryption: <p>The type of EBS encryption to be used during replication.</p>
        ebs_encryption_key_arn: <p>The ARN of the EBS encryption key to be used during replication.</p>
        bandwidth_throttling: <p>Configure bandwidth throttling for the outbound data transfer rate of the Source Server in Mbps.</p>
        data_plane_routing: <p>The data plane routing mechanism that will be used for replication.</p>
        create_public_ip: <p>Whether to create a Public IP for the Recovery Instance by default.</p>
        staging_area_tags: <p>A set of tags to be associated with all resources created in the replication staging area: EC2 replication server, EBS volumes, EBS snapshots, etc.</p>
        pit_policy: <p>The Point in time (PIT) policy to manage snapshots taken during replication.</p>
        auto_replicate_new_disks: <p>Whether to allow the AWS replication agent to automatically replicate newly added disks.</p>
        internet_protocol: <p>Which version of the Internet Protocol to use for replication of data. (IPv4 or IPv6)</p>

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.errors.conflict_exception.ConflictException: <p>The request could not be completed due to a conflict with the current state of the target resource.</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.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.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_drs.types.update_replication_configuration_request.UpdateReplicationConfigurationRequest]",
    ) -> AsyncOperationResponse[
        "capo_drs.types.replication_configuration.ReplicationConfiguration"
    ]:
        import capo_drs._operations.elastic_disaster_recovery_service.update_replication_configuration

        (
            output,
            http_response,
        ) = await capo_drs._operations.elastic_disaster_recovery_service.update_replication_configuration.async_update_replication_configuration(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

        return capo_drs.types.update_replication_configuration_request.redact_sensitive(
            input_
        )

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

        return capo_drs.types.replication_configuration.redact_sensitive(output)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "UpdateReplicationConfiguration",
            redact_input=_redact_input,
            redact_output=_redact_output,
        ),
    )
    input_: capo_drs.types.update_replication_configuration_request.UpdateReplicationConfigurationRequest = {
        "source_server_id": source_server_id
    }
    if name is not None:
        input_["name"] = name
    if staging_area_subnet_id is not None:
        input_["staging_area_subnet_id"] = staging_area_subnet_id
    if associate_default_security_group is not None:
        input_["associate_default_security_group"] = (
            associate_default_security_group
        )
    if replication_servers_security_groups_i_ds is not None:
        input_["replication_servers_security_groups_i_ds"] = (
            replication_servers_security_groups_i_ds
        )
    if replication_server_instance_type is not None:
        input_["replication_server_instance_type"] = (
            replication_server_instance_type
        )
    if use_dedicated_replication_server is not None:
        input_["use_dedicated_replication_server"] = (
            use_dedicated_replication_server
        )
    if default_large_staging_disk_type is not None:
        input_["default_large_staging_disk_type"] = default_large_staging_disk_type
    if replicated_disks is not None:
        input_["replicated_disks"] = replicated_disks
    if ebs_encryption is not None:
        input_["ebs_encryption"] = ebs_encryption
    if ebs_encryption_key_arn is not None:
        input_["ebs_encryption_key_arn"] = ebs_encryption_key_arn
    if bandwidth_throttling is not None:
        input_["bandwidth_throttling"] = bandwidth_throttling
    if data_plane_routing is not None:
        input_["data_plane_routing"] = data_plane_routing
    if create_public_ip is not None:
        input_["create_public_ip"] = create_public_ip
    if staging_area_tags is not None:
        input_["staging_area_tags"] = staging_area_tags
    if pit_policy is not None:
        input_["pit_policy"] = pit_policy
    if auto_replicate_new_disks is not None:
        input_["auto_replicate_new_disks"] = auto_replicate_new_disks
    if internet_protocol is not None:
        input_["internet_protocol"] = internet_protocol

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