Skip to content

update_region_settings async

update_region_settings(
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    resource_type_opt_in_preference: Optional[ResourceTypeOptInPreference] = None,
    resource_type_management_preference: Optional[
        ResourceTypeManagementPreference
    ] = None,
) -> None

Updates the current service opt-in settings for the Region.

Use the DescribeRegionSettings API to determine the resource types that are supported.

Parameters:

  • resource_type_opt_in_preference (Optional[ResourceTypeOptInPreference], default: None ) –

    Updates the list of services along with the opt-in preferences for the Region.

    If resource assignments are only based on tags, then service opt-in settings are applied. If a resource type is explicitly assigned to a backup plan, such as Amazon S3, Amazon EC2, or Amazon RDS, it will be included in the backup even if the opt-in is not enabled for that particular service. If both a resource type and tags are specified in a resource assignment, the resource type specified in the backup plan takes priority over the tag condition. Service opt-in settings are disregarded in this situation.

  • resource_type_management_preference (Optional[ResourceTypeManagementPreference], default: None ) –

    Enables or disables full Backup management of backups for a resource type. To enable full Backup management for DynamoDB along with Backup's advanced DynamoDB backup features, follow the procedure to enable advanced DynamoDB backup programmatically.

Raises:

Source code in docs_src/capo_backup/_services/async_backup.py
async def update_region_settings(
    self,
    *,
    config_overrides: Optional[AsyncBackupClientConfig] = None,
    resource_type_opt_in_preference: Optional[
        "capo_backup.types.resource_type_opt_in_preference.ResourceTypeOptInPreference"
    ] = None,
    resource_type_management_preference: Optional[
        "capo_backup.types.resource_type_management_preference.ResourceTypeManagementPreference"
    ] = None,
) -> None:
    """<p>Updates the current service opt-in settings for the Region.</p> <p>Use the <code>DescribeRegionSettings</code> API to determine the resource types that are supported.</p>

    Args:
        resource_type_opt_in_preference: <p>Updates the list of services along with the opt-in preferences for the Region.</p> <p>If resource assignments are only based on tags, then service opt-in settings are applied. If a resource type is explicitly assigned to a backup plan, such as Amazon S3, Amazon EC2, or Amazon RDS, it will be included in the backup even if the opt-in is not enabled for that particular service. If both a resource type and tags are specified in a resource assignment, the resource type specified in the backup plan takes priority over the tag condition. Service opt-in settings are disregarded in this situation.</p>
        resource_type_management_preference: <p>Enables or disables full Backup management of backups for a resource type. To enable full Backup management for DynamoDB along with <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html"> Backup's advanced DynamoDB backup features</a>, follow the procedure to <a href="https://docs.aws.amazon.com/aws-backup/latest/devguide/advanced-ddb-backup.html#advanced-ddb-backup-enable-cli"> enable advanced DynamoDB backup programmatically</a>.</p>

    Raises:
        capo_backup.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
        capo_backup.errors.missing_parameter_value_exception.MissingParameterValueException: <p>Indicates that a required parameter is missing.</p>
        capo_backup.errors.service_unavailable_exception.ServiceUnavailableException: <p>The request failed due to a temporary failure of the server.</p>
        capo_backup.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_backup.types.update_region_settings_input.UpdateRegionSettingsInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_backup._operations.cryo_controller_user_manager.update_region_settings

        (
            output,
            http_response,
        ) = await capo_backup._operations.cryo_controller_user_manager.update_region_settings.async_update_region_settings(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateRegionSettings")
    )
    input_: capo_backup.types.update_region_settings_input.UpdateRegionSettingsInput = {}
    if resource_type_opt_in_preference is not None:
        input_["resource_type_opt_in_preference"] = resource_type_opt_in_preference
    if resource_type_management_preference is not None:
        input_["resource_type_management_preference"] = (
            resource_type_management_preference
        )

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