Skip to content

modify_replication_instance async

modify_replication_instance(
    replication_instance_arn: String,
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    allocated_storage: Optional[IntegerOptional] = None,
    apply_immediately: Optional[Boolean] = None,
    replication_instance_class: Optional[ReplicationInstanceClass] = None,
    vpc_security_group_ids: Optional[VpcSecurityGroupIdList] = None,
    preferred_maintenance_window: Optional[String] = None,
    multi_az: Optional[BooleanOptional] = None,
    engine_version: Optional[String] = None,
    allow_major_version_upgrade: Optional[Boolean] = None,
    auto_minor_version_upgrade: Optional[BooleanOptional] = None,
    replication_instance_identifier: Optional[String] = None,
    network_type: Optional[String] = None,
    kerberos_authentication_settings: Optional[KerberosAuthenticationSettings] = None,
) -> ModifyReplicationInstanceResponse

Modifies the replication instance to apply new settings. You can change one or more parameters by specifying these parameters and the new values in the request.

Some settings are applied during the maintenance window.

Parameters:

  • replication_instance_arn (String) –

    The Amazon Resource Name (ARN) of the replication instance.

  • allocated_storage (Optional[IntegerOptional], default: None ) –

    The amount of storage (in gigabytes) to be allocated for the replication instance.

  • apply_immediately (Optional[Boolean], default: None ) –

    Indicates whether the changes should be applied immediately or during the next maintenance window.

  • replication_instance_class (Optional[ReplicationInstanceClass], default: None ) –

    The compute and memory capacity of the replication instance as defined for the specified replication instance class. For example to specify the instance class dms.c4.large, set this parameter to "dms.c4.large".

    For more information on the settings and capacities for the available replication instance classes, see Selecting the right DMS replication instance for your migration.

  • vpc_security_group_ids (Optional[VpcSecurityGroupIdList], default: None ) –

    Specifies the VPC security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance.

  • preferred_maintenance_window (Optional[String], default: None ) –

    The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.

    Default: Uses existing setting

    Format: ddd:hh24:mi-ddd:hh24:mi

    Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun

    Constraints: Must be at least 30 minutes

  • multi_az (Optional[BooleanOptional], default: None ) –

    Specifies whether the replication instance is a Multi-AZ deployment. You can't set the AvailabilityZone parameter if the Multi-AZ parameter is set to true.

  • engine_version (Optional[String], default: None ) –

    The engine version number of the replication instance.

    When modifying a major engine version of an instance, also set AllowMajorVersionUpgrade to true.

  • allow_major_version_upgrade (Optional[Boolean], default: None ) –

    Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage, and the change is asynchronously applied as soon as possible.

    This parameter must be set to true when specifying a value for the EngineVersion parameter that is a different major version than the replication instance's current version.

  • auto_minor_version_upgrade (Optional[BooleanOptional], default: None ) –

    A value that indicates that minor version upgrades are applied automatically to the replication instance during the maintenance window. Changing this parameter doesn't result in an outage, except in the case described following. The change is asynchronously applied as soon as possible.

    An outage does result if these factors apply:

    • This parameter is set to true during the maintenance window.

    • A newer minor version is available.

    • DMS has enabled automatic patching for the given engine version.

  • replication_instance_identifier (Optional[String], default: None ) –

    The replication instance identifier. This parameter is stored as a lowercase string.

  • network_type (Optional[String], default: None ) –

    The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.

  • kerberos_authentication_settings (Optional[KerberosAuthenticationSettings], default: None ) –

    Specifies the settings required for kerberos authentication when modifying a replication instance.

Raises:

Examples:

Modify replication instance Modifies the replication instance to apply new settings. You can change one or more parameters by specifying these parameters and the new values in the request. Some settings are applied during the maintenance window.

>>> await client.modify_replication_instance(replication_instance_arn='arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ', allocated_storage=123, apply_immediately=True, replication_instance_class='dms.t2.micro', vpc_security_group_ids=[], preferred_maintenance_window='sun:06:00-sun:14:00', multi_az=True, engine_version='1.5.0', allow_major_version_upgrade=True, auto_minor_version_upgrade=True, replication_instance_identifier='test-rep-1')
Source code in docs_src/capo_database_migration_service/_services/async_database_migration_service.py
async def modify_replication_instance(
    self,
    replication_instance_arn: "capo_database_migration_service.types.string.String",
    *,
    config_overrides: Optional[AsyncDatabaseMigrationServiceClientConfig] = None,
    allocated_storage: Optional[
        "capo_database_migration_service.types.integer_optional.IntegerOptional"
    ] = None,
    apply_immediately: Optional[
        "capo_database_migration_service.types.boolean.Boolean"
    ] = None,
    replication_instance_class: Optional[
        "capo_database_migration_service.types.replication_instance_class.ReplicationInstanceClass"
    ] = None,
    vpc_security_group_ids: Optional[
        "capo_database_migration_service.types.vpc_security_group_id_list.VpcSecurityGroupIdList"
    ] = None,
    preferred_maintenance_window: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    multi_az: Optional[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ] = None,
    engine_version: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    allow_major_version_upgrade: Optional[
        "capo_database_migration_service.types.boolean.Boolean"
    ] = None,
    auto_minor_version_upgrade: Optional[
        "capo_database_migration_service.types.boolean_optional.BooleanOptional"
    ] = None,
    replication_instance_identifier: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    network_type: Optional[
        "capo_database_migration_service.types.string.String"
    ] = None,
    kerberos_authentication_settings: Optional[
        "capo_database_migration_service.types.kerberos_authentication_settings.KerberosAuthenticationSettings"
    ] = None,
) -> "capo_database_migration_service.types.modify_replication_instance_response.ModifyReplicationInstanceResponse":
    """<p>Modifies the replication instance to apply new settings. You can change one or more parameters by specifying these parameters and the new values in the request.</p> <p>Some settings are applied during the maintenance window.</p> <p></p>

    Args:
        replication_instance_arn: <p>The Amazon Resource Name (ARN) of the replication instance.</p>
        allocated_storage: <p>The amount of storage (in gigabytes) to be allocated for the replication instance.</p>
        apply_immediately: <p>Indicates whether the changes should be applied immediately or during the next maintenance window.</p>
        replication_instance_class: <p>The compute and memory capacity of the replication instance as defined for the specified replication instance class. For example to specify the instance class dms.c4.large, set this parameter to <code>"dms.c4.large"</code>.</p> <p>For more information on the settings and capacities for the available replication instance classes, see <a href="https://docs.aws.amazon.com/dms/latest/userguide/CHAP_ReplicationInstance.html#CHAP_ReplicationInstance.InDepth"> Selecting the right DMS replication instance for your migration</a>. </p>
        vpc_security_group_ids: <p> Specifies the VPC security group to be used with the replication instance. The VPC security group must work with the VPC containing the replication instance. </p>
        preferred_maintenance_window: <p>The weekly time range (in UTC) during which system maintenance can occur, which might result in an outage. Changing this parameter does not result in an outage, except in the following situation, and the change is asynchronously applied as soon as possible. If moving this window to the current time, there must be at least 30 minutes between the current time and end of the window to ensure pending changes are applied.</p> <p>Default: Uses existing setting</p> <p>Format: ddd:hh24:mi-ddd:hh24:mi</p> <p>Valid Days: Mon | Tue | Wed | Thu | Fri | Sat | Sun</p> <p>Constraints: Must be at least 30 minutes</p>
        multi_az: <p> Specifies whether the replication instance is a Multi-AZ deployment. You can't set the <code>AvailabilityZone</code> parameter if the Multi-AZ parameter is set to <code>true</code>. </p>
        engine_version: <p>The engine version number of the replication instance.</p> <p>When modifying a major engine version of an instance, also set <code>AllowMajorVersionUpgrade</code> to <code>true</code>.</p>
        allow_major_version_upgrade: <p>Indicates that major version upgrades are allowed. Changing this parameter does not result in an outage, and the change is asynchronously applied as soon as possible.</p> <p>This parameter must be set to <code>true</code> when specifying a value for the <code>EngineVersion</code> parameter that is a different major version than the replication instance's current version.</p>
        auto_minor_version_upgrade: <p>A value that indicates that minor version upgrades are applied automatically to the replication instance during the maintenance window. Changing this parameter doesn't result in an outage, except in the case described following. The change is asynchronously applied as soon as possible. </p> <p>An outage does result if these factors apply: </p> <ul> <li> <p>This parameter is set to <code>true</code> during the maintenance window.</p> </li> <li> <p>A newer minor version is available. </p> </li> <li> <p>DMS has enabled automatic patching for the given engine version. </p> </li> </ul>
        replication_instance_identifier: <p>The replication instance identifier. This parameter is stored as a lowercase string.</p>
        network_type: <p>The type of IP address protocol used by a replication instance, such as IPv4 only or Dual-stack that supports both IPv4 and IPv6 addressing. IPv6 only is not yet supported.</p>
        kerberos_authentication_settings: <p>Specifies the settings required for kerberos authentication when modifying a replication instance.</p>

    Raises:
        capo_database_migration_service.errors.access_denied_fault.AccessDeniedFault: <p>DMS was denied access to the endpoint. Check that the role is correctly configured.</p>
        capo_database_migration_service.errors.insufficient_resource_capacity_fault.InsufficientResourceCapacityFault: <p>There are not enough resources allocated to the database migration.</p>
        capo_database_migration_service.errors.invalid_resource_state_fault.InvalidResourceStateFault: <p>The resource is in a state that prevents it from being used for database migration.</p>
        capo_database_migration_service.errors.resource_already_exists_fault.ResourceAlreadyExistsFault: <p>The resource you are attempting to create already exists.</p>
        capo_database_migration_service.errors.resource_not_found_fault.ResourceNotFoundFault: <p>The resource could not be found.</p>
        capo_database_migration_service.errors.storage_quota_exceeded_fault.StorageQuotaExceededFault: <p>The storage quota has been exceeded.</p>
        capo_database_migration_service.errors.upgrade_dependency_failure_fault.UpgradeDependencyFailureFault: <p>An upgrade dependency is preventing the database migration.</p>
        capo_database_migration_service.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Modify replication instance
        Modifies the replication instance to apply new settings. You can change one or more parameters by specifying these parameters and the new values in the request. Some settings are applied during the maintenance window.

        >>> await client.modify_replication_instance(replication_instance_arn='arn:aws:dms:us-east-1:123456789012:rep:6UTDJGBOUS3VI3SUWA66XFJCJQ', allocated_storage=123, apply_immediately=True, replication_instance_class='dms.t2.micro', vpc_security_group_ids=[], preferred_maintenance_window='sun:06:00-sun:14:00', multi_az=True, engine_version='1.5.0', allow_major_version_upgrade=True, auto_minor_version_upgrade=True, replication_instance_identifier='test-rep-1')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_database_migration_service.types.modify_replication_instance_message.ModifyReplicationInstanceMessage]",
    ) -> AsyncOperationResponse[
        "capo_database_migration_service.types.modify_replication_instance_response.ModifyReplicationInstanceResponse"
    ]:
        import capo_database_migration_service._operations.amazon_dm_sv20160101.modify_replication_instance

        (
            output,
            http_response,
        ) = await capo_database_migration_service._operations.amazon_dm_sv20160101.modify_replication_instance.async_modify_replication_instance(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ModifyReplicationInstance")
    )
    input_: capo_database_migration_service.types.modify_replication_instance_message.ModifyReplicationInstanceMessage = {
        "replication_instance_arn": replication_instance_arn
    }
    if allocated_storage is not None:
        input_["allocated_storage"] = allocated_storage
    if apply_immediately is not None:
        input_["apply_immediately"] = apply_immediately
    if replication_instance_class is not None:
        input_["replication_instance_class"] = replication_instance_class
    if vpc_security_group_ids is not None:
        input_["vpc_security_group_ids"] = vpc_security_group_ids
    if preferred_maintenance_window is not None:
        input_["preferred_maintenance_window"] = preferred_maintenance_window
    if multi_az is not None:
        input_["multi_az"] = multi_az
    if engine_version is not None:
        input_["engine_version"] = engine_version
    if allow_major_version_upgrade is not None:
        input_["allow_major_version_upgrade"] = allow_major_version_upgrade
    if auto_minor_version_upgrade is not None:
        input_["auto_minor_version_upgrade"] = auto_minor_version_upgrade
    if replication_instance_identifier is not None:
        input_["replication_instance_identifier"] = replication_instance_identifier
    if network_type is not None:
        input_["network_type"] = network_type
    if kerberos_authentication_settings is not None:
        input_["kerberos_authentication_settings"] = (
            kerberos_authentication_settings
        )

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