ResilienceHubV2 / Client / update_policy

update_policy

ResilienceHubV2.Client.update_policy(**kwargs)

Updates an existing resilience policy.

See also: AWS API Documentation

Request Syntax

response = client.update_policy(
    policyArn='string',
    description='string',
    availabilitySlo={
        'target': 123.0
    },
    multiAz={
        'rtoInMinutes': 123,
        'rpoInMinutes': 123,
        'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE'
    },
    multiRegion={
        'rtoInMinutes': 123,
        'rpoInMinutes': 123,
        'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE'
    },
    dataRecovery={
        'timeBetweenBackupsInMinutes': 123
    }
)
Parameters:
  • policyArn (string) –

    [REQUIRED]

    ARN identifier.

  • description (string) – Resource description for services and policies.

  • availabilitySlo (dict) –

    The updated availability SLO for the policy.

    • target (float) –

      The target availability percentage, expressed as a value between 0 and 100.

  • multiAz (dict) –

    The updated multi-AZ disaster recovery targets for the policy.

    • rtoInMinutes (integer) –

      The recovery time objective (RTO) target for multi-AZ, in minutes.

    • rpoInMinutes (integer) –

      The recovery point objective (RPO) target for multi-AZ, in minutes.

    • disasterRecoveryApproach (string) –

      The disaster recovery approach for multi-AZ.

  • multiRegion (dict) –

    The updated multi-Region disaster recovery targets for the policy.

    • rtoInMinutes (integer) –

      The recovery time objective (RTO) target for multi-Region, in minutes.

    • rpoInMinutes (integer) –

      The recovery point objective (RPO) target for multi-Region, in minutes.

    • disasterRecoveryApproach (string) –

      The disaster recovery approach for multi-Region.

  • dataRecovery (dict) –

    The updated data recovery targets for the policy.

    • timeBetweenBackupsInMinutes (integer) –

      The target time between backups, in minutes.

Return type:

dict

Returns:

Response Syntax

{
    'policy': {
        'policyArn': 'string',
        'name': 'string',
        'description': 'string',
        'availabilitySlo': {
            'target': 123.0
        },
        'multiAz': {
            'rtoInMinutes': 123,
            'rpoInMinutes': 123,
            'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE'
        },
        'multiRegion': {
            'rtoInMinutes': 123,
            'rpoInMinutes': 123,
            'disasterRecoveryApproach': 'ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE'
        },
        'dataRecovery': {
            'timeBetweenBackupsInMinutes': 123
        },
        'kmsKeyId': 'string',
        'tags': {
            'string': 'string'
        },
        'associatedServiceCount': 123,
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • policy (dict) –

      The updated policy.

      • policyArn (string) –

        ARN identifier.

      • name (string) –

        Resource name (used in ARN — no spaces allowed).

      • description (string) –

        Resource description for services and policies.

      • availabilitySlo (dict) –

        The availability SLO defined in the policy.

        • target (float) –

          The target availability percentage, expressed as a value between 0 and 100.

      • multiAz (dict) –

        The multi-AZ disaster recovery targets defined in the policy.

        • rtoInMinutes (integer) –

          The recovery time objective (RTO) target for multi-AZ, in minutes.

        • rpoInMinutes (integer) –

          The recovery point objective (RPO) target for multi-AZ, in minutes.

        • disasterRecoveryApproach (string) –

          The disaster recovery approach for multi-AZ.

      • multiRegion (dict) –

        The multi-Region disaster recovery targets defined in the policy.

        • rtoInMinutes (integer) –

          The recovery time objective (RTO) target for multi-Region, in minutes.

        • rpoInMinutes (integer) –

          The recovery point objective (RPO) target for multi-Region, in minutes.

        • disasterRecoveryApproach (string) –

          The disaster recovery approach for multi-Region.

      • dataRecovery (dict) –

        The data recovery targets defined in the policy.

        • timeBetweenBackupsInMinutes (integer) –

          The target time between backups, in minutes.

      • kmsKeyId (string) –

        KMS key identifier — accepts key ID, key ARN, alias name, or alias ARN.

      • tags (dict) –

        Resource tags.

        • (string) –

          Tag key.

          • (string) –

            Tag value.

      • associatedServiceCount (integer) –

        The number of services associated with this policy.

      • createdAt (datetime) –

        The timestamp when the policy was created.

      • updatedAt (datetime) –

        The timestamp when the policy was last updated.

Exceptions

  • ResilienceHubV2.Client.exceptions.InternalServerException

  • ResilienceHubV2.Client.exceptions.ResourceNotFoundException

  • ResilienceHubV2.Client.exceptions.ValidationException

  • ResilienceHubV2.Client.exceptions.ConflictException

  • ResilienceHubV2.Client.exceptions.AccessDeniedException