AWS Resilience Hub V2

2026/09/16 - AWS Resilience Hub V2 - 3 new 6 updated api methods

Changes  Next Gen Resilience Hub now supports dependency insights (LLM-based insights about customer's service dependencies) and organization-level policy sharing (provision to share policy with member accounts for an organization)

GetDependencyInsights (new) Link ¶

Retrieves the dependency insights generated for a service. The response reports the current generation status; insights are populated once generation has completed. If generation failed, the response includes an error code, whose possible values are listed under the response's errorCode field, and a message describing the cause. To use this operation, you must have the resiliencehub:GetDependencyInsights permission on the service.

See also: AWS API Documentation

Request Syntax

client.get_dependency_insights(
    serviceArn='string'
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

ARN identifier.

rtype:

dict

returns:

Response Syntax

{
    'overview': 'string',
    'insights': [
        {
            'category': 'CROSS_REGION'|'NEW_DEPENDENCY'|'THIRD_PARTY'|'UNEVEN_USAGE'|'AWS_SERVICE',
            'description': 'string'
        },
    ],
    'status': 'IN_PROGRESS'|'COMPLETED'|'FAILED',
    'createdAt': datetime(2015, 1, 1),
    'errorCode': 'INSUFFICIENT_DATA'|'LLM_GENERATION_FAILED'|'INTERNAL_ERROR',
    'errorMessage': 'string'
}

Response Structure

  • (dict) --

    • overview (string) --

      A summary of the dependency insights for the service. This field is not returned until the status is COMPLETED.

    • insights (list) --

      The list of dependency insights generated for the service. This field is not returned until the status is COMPLETED.

      • (dict) --

        Contains a single insight about a service's dependencies.

        • category (string) --

          The category of the insight. Valid values:

          • CROSS_REGION - The insight relates to dependencies used across multiple Regions.

          • NEW_DEPENDENCY - The insight relates to a recently detected dependency.

          • THIRD_PARTY - The insight relates to a third-party dependency.

          • UNEVEN_USAGE - The insight relates to a dependency with uneven usage across the service.

          • AWS_SERVICE - The insight relates to a dependency on an Amazon Web Services service.

        • description (string) --

          A human-readable explanation of the insight, describing the dependency behavior or condition that was detected.

    • status (string) --

      The status of the dependency insights generation. Valid values:

      • IN_PROGRESS - Insights generation is in progress.

      • COMPLETED - Insights generation completed successfully.

      • FAILED - Insights generation failed. See errorCode and errorMessage for details.

    • createdAt (datetime) --

      The timestamp when the dependency insights were generated.

    • errorCode (string) --

      The error code returned when insights generation failed. Valid values:

      • INSUFFICIENT_DATA - There was not enough dependency data to generate insights.

      • LLM_GENERATION_FAILED - The insights could not be generated.

      • INTERNAL_ERROR - An internal error occurred while generating insights.

    • errorMessage (string) --

      A message describing why insights generation failed.

StartDependencyInsights (new) Link ¶

Starts generating dependency insights for a service. Generation runs asynchronously; the response returns the initial status, and you retrieve the results with GetDependencyInsights. To use this operation, you must have the resiliencehub:StartDependencyInsights permission on the service.

See also: AWS API Documentation

Request Syntax

client.start_dependency_insights(
    serviceArn='string',
    clientToken='string'
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

ARN identifier.

type clientToken:

string

param clientToken:

Idempotency token.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'status': 'IN_PROGRESS'|'COMPLETED'|'FAILED'
}

Response Structure

  • (dict) --

    • status (string) --

      The status of the dependency insights generation. Valid values:

      • IN_PROGRESS - Insights generation is in progress.

      • COMPLETED - Insights generation completed successfully.

      • FAILED - Insights generation failed. Call GetDependencyInsights for the error code and message.

ListPolicyEvents (new) Link ¶

Lists events for a resilience policy, including services that started or stopped using it, changes to cross-account sharing, and deletion of the policy.

See also: AWS API Documentation

Request Syntax

client.list_policy_events(
    policyArn='string',
    eventTypes=[
        'POLICY_ATTACHED_TO_SERVICE'|'POLICY_DETACHED_FROM_SERVICE'|'POLICY_SHARING_REVOKED'|'POLICY_DELETED',
    ],
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string'
)
type policyArn:

string

param policyArn:

[REQUIRED]

ARN identifier.

type eventTypes:

list

param eventTypes:

The type of events to include in the results.

  • (string) --

type startTime:

datetime

param startTime:

The start time for filtering events.

type endTime:

datetime

param endTime:

The end time for filtering events.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'events': [
        {
            'eventId': 'string',
            'timestamp': datetime(2015, 1, 1),
            'eventType': 'POLICY_ATTACHED_TO_SERVICE'|'POLICY_DETACHED_FROM_SERVICE'|'POLICY_SHARING_REVOKED'|'POLICY_DELETED',
            'policyArn': 'string',
            'actor': {
                'type': 'USER'|'SYSTEM',
                'principalId': 'string',
                'accountId': 'string',
                'userName': 'string'
            },
            'eventDetails': {
                'title': 'string',
                'description': 'string',
                'eventMetadata': {
                    'policyAttachedToService': {
                        'serviceArn': 'string',
                        'accountId': 'string'
                    },
                    'policyDetachedFromService': {
                        'serviceArn': 'string',
                        'accountId': 'string'
                    },
                    'policySharingRevoked': {
                        'affectedServiceCount': 123
                    },
                    'policyDeleted': {
                        'affectedServiceCount': 123
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      The list of policy events.

      • (dict) --

        An event on the timeline of a resilience policy.

        • eventId (string) --

          The identifier of the event.

        • timestamp (datetime) --

          The time the event occurred.

        • eventType (string) --

          The type of the event.

        • policyArn (string) --

          ARN identifier.

        • actor (dict) --

          Identifies the actor that triggered an event.

          • type (string) --

            The type of actor, either USER or SYSTEM.

          • principalId (string) --

            The principal ID of the actor.

          • accountId (string) --

            The AWS account ID of the actor.

          • userName (string) --

            The user name of the actor.

        • eventDetails (dict) --

          The details of the event.

          • title (string) --

            A short summary of the event.

          • description (string) --

            A description of the event.

          • eventMetadata (dict) --

            The event-specific metadata, with one member populated according to the event type.

            • policyAttachedToService (dict) --

              Contains details about the service that started using the policy, such as the account that owns the service.

              • serviceArn (string) --

                ARN identifier.

              • accountId (string) --

                The account that owns the service.

            • policyDetachedFromService (dict) --

              Contains details about the service that stopped using the policy, such as the account that owns the service.

              • serviceArn (string) --

                ARN identifier.

              • accountId (string) --

                The account that owns the service.

            • policySharingRevoked (dict) --

              Contains details about a policy for which organization sharing was revoked, including the number of services that were affected.

              • affectedServiceCount (integer) --

                The number of services that were using the policy when sharing was revoked.

            • policyDeleted (dict) --

              Contains details about a policy that was deleted, including the number of services that were affected.

              • affectedServiceCount (integer) --

                The number of services that were using the policy when it was deleted.

    • nextToken (string) --

      Pagination token.

CreatePolicy (updated) Link ¶
Changes (request, response)
Request
{'sharingEnabled': 'boolean'}
Response
{'policy': {'organizationId': 'string', 'sharingEnabled': 'boolean'}}

Creates a resilience policy that defines availability and disaster recovery requirements.

See also: AWS API Documentation

Request Syntax

client.create_policy(
    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
    },
    sharingEnabled=True|False,
    kmsKeyId='string',
    tags={
        'string': 'string'
    },
    clientToken='string'
)
type name:

string

param name:

[REQUIRED]

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

type description:

string

param description:

Resource description for services and policies.

type availabilitySlo:

dict

param availabilitySlo:

The availability SLO for the resilience policy.

  • target (float) --

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

type multiAz:

dict

param multiAz:

The multi-AZ disaster recovery targets for the resilience 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.

type multiRegion:

dict

param multiRegion:

The multi-Region disaster recovery targets for the resilience 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.

type dataRecovery:

dict

param dataRecovery:

The data recovery targets for the resilience policy.

  • timeBetweenBackupsInMinutes (integer) --

    The target time between backups, in minutes.

type sharingEnabled:

boolean

param sharingEnabled:

Specifies whether cross-account sharing is enabled for the policy. Only a delegated administrator or the management account can enable sharing.

type kmsKeyId:

string

param kmsKeyId:

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

type tags:

dict

param tags:

Resource tags.

  • (string) --

    Tag key.

    • (string) --

      Tag value.

type clientToken:

string

param clientToken:

Idempotency token.

This field is autopopulated if not provided.

rtype:

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
        },
        'sharingEnabled': True|False,
        'organizationId': 'string',
        'kmsKeyId': 'string',
        'tags': {
            'string': 'string'
        },
        'associatedServiceCount': 123,
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • policy (dict) --

      The created resilience 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.

      • sharingEnabled (boolean) --

        Specifies whether cross-account sharing is enabled.

      • organizationId (string) --

        The identifier of the organization this policy is shared with.

      • 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.

GetPolicy (updated) Link ¶
Changes (response)
{'policy': {'organizationId': 'string', 'sharingEnabled': 'boolean'}}

Retrieves a resilience policy by ARN.

See also: AWS API Documentation

Request Syntax

client.get_policy(
    policyArn='string'
)
type policyArn:

string

param policyArn:

[REQUIRED]

ARN identifier.

rtype:

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
        },
        'sharingEnabled': True|False,
        'organizationId': 'string',
        'kmsKeyId': 'string',
        'tags': {
            'string': 'string'
        },
        'associatedServiceCount': 123,
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • policy (dict) --

      The requested resilience 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.

      • sharingEnabled (boolean) --

        Specifies whether cross-account sharing is enabled.

      • organizationId (string) --

        The identifier of the organization this policy is shared with.

      • 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.

ImportPolicy (updated) Link ¶
Changes (response)
{'policy': {'organizationId': 'string', 'sharingEnabled': 'boolean'}}

Imports a V1 policy into V2, mapping RTO/RPO values from V1 scenarios.

See also: AWS API Documentation

Request Syntax

client.import_policy(
    v1PolicyArn='string',
    kmsKeyId='string',
    availabilitySlo={
        'target': 123.0
    },
    multiAzDisasterRecoveryApproach='ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE',
    multiRegionDisasterRecoveryApproach='ACTIVE_ACTIVE'|'HOT_STANDBY'|'WARM_STANDBY'|'PILOT_LIGHT'|'BACKUP_AND_RESTORE',
    tags={
        'string': 'string'
    },
    clientToken='string'
)
type v1PolicyArn:

string

param v1PolicyArn:

[REQUIRED]

ARN identifier.

type kmsKeyId:

string

param kmsKeyId:

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

type availabilitySlo:

dict

param availabilitySlo:

The availability SLO to set on the imported policy.

  • target (float) --

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

type multiAzDisasterRecoveryApproach:

string

param multiAzDisasterRecoveryApproach:

The multi-AZ disaster recovery approach for the imported policy.

type multiRegionDisasterRecoveryApproach:

string

param multiRegionDisasterRecoveryApproach:

The multi-Region disaster recovery approach for the imported policy.

type tags:

dict

param tags:

Resource tags.

  • (string) --

    Tag key.

    • (string) --

      Tag value.

type clientToken:

string

param clientToken:

Idempotency token.

This field is autopopulated if not provided.

rtype:

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
        },
        'sharingEnabled': True|False,
        'organizationId': 'string',
        'kmsKeyId': 'string',
        'tags': {
            'string': 'string'
        },
        'associatedServiceCount': 123,
        'createdAt': datetime(2015, 1, 1),
        'updatedAt': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • policy (dict) --

      The imported 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.

      • sharingEnabled (boolean) --

        Specifies whether cross-account sharing is enabled.

      • organizationId (string) --

        The identifier of the organization this policy is shared with.

      • 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.

ListPolicies (updated) Link ¶
Changes (request, response)
Request
{'accountId': 'string'}
Response
{'policySummaries': {'organizationId': 'string', 'sharingEnabled': 'boolean'}}

Lists resilience policies.

See also: AWS API Documentation

Request Syntax

client.list_policies(
    accountId='string',
    maxResults=123,
    nextToken='string'
)
type accountId:

string

param accountId:

The identifier of the account that owns the policies to include in the results.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'policySummaries': [
        {
            'policyArn': 'string',
            'name': '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
            },
            'sharingEnabled': True|False,
            'organizationId': 'string',
            'associatedServiceCount': 123,
            'createdAt': datetime(2015, 1, 1),
            'updatedAt': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • policySummaries (list) --

      The list of policy summaries.

      • (dict) --

        Contains summary information about a resilience policy.

        • policyArn (string) --

          ARN identifier.

        • name (string) --

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

        • 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.

        • sharingEnabled (boolean) --

          Specifies whether cross-account sharing is enabled.

        • organizationId (string) --

          The identifier of the organization this policy is shared with.

        • 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.

    • nextToken (string) --

      Pagination token.

ListServiceEvents (updated) Link ¶
Changes (response)
{'events': {'eventDetails': {'eventMetadata': {'servicePolicyAssociated': {'policyOwnerAccountId': 'string',
                                                                           'policySource': 'SELF '
                                                                                           '| '
                                                                                           'CROSS_ACCOUNT'},
                                               'servicePolicyDisassociated': {'policyOwnerAccountId': 'string',
                                                                              'policySource': 'SELF '
                                                                                              '| '
                                                                                              'CROSS_ACCOUNT',
                                                                              'reason': 'REPLACED_BY_UPDATE '
                                                                                        '| '
                                                                                        'SHARING_REVOKED '
                                                                                        '| '
                                                                                        'POLICY_DELETED'}}}}}

Lists events for a service.

See also: AWS API Documentation

Request Syntax

client.list_service_events(
    serviceArn='string',
    eventTypes=[
        'SERVICE_CREATED'|'SERVICE_DELETED'|'SERVICE_SYSTEM_ASSOCIATED'|'SERVICE_SYSTEM_DISASSOCIATED'|'SERVICE_RESOURCES_ASSOCIATED'|'SERVICE_RESOURCES_DISASSOCIATED'|'SERVICE_WORKFLOW_UPDATED'|'SERVICE_INPUT_SOURCES_UPDATED'|'SERVICE_POLICY_ASSOCIATED'|'SERVICE_POLICY_DISASSOCIATED'|'SERVICE_FUNCTION_CREATED'|'SERVICE_FUNCTION_UPDATED'|'SERVICE_FUNCTION_DELETED'|'SERVICE_FUNCTION_RESOURCES_ADDED'|'SERVICE_FUNCTION_RESOURCES_REMOVED'|'SERVICE_ACHIEVABILITY_UPDATED'|'ASSERTION_CREATED'|'ASSERTION_UPDATED'|'ASSERTION_DELETED',
    ],
    startTime=datetime(2015, 1, 1),
    endTime=datetime(2015, 1, 1),
    maxResults=123,
    nextToken='string'
)
type serviceArn:

string

param serviceArn:

[REQUIRED]

ARN identifier.

type eventTypes:

list

param eventTypes:

The type of events to include in the results.

  • (string) --

type startTime:

datetime

param startTime:

The start time for filtering events.

type endTime:

datetime

param endTime:

The end time for filtering events.

type maxResults:

integer

param maxResults:

Pagination page size.

type nextToken:

string

param nextToken:

Pagination token.

rtype:

dict

returns:

Response Syntax

{
    'events': [
        {
            'eventId': 'string',
            'timestamp': datetime(2015, 1, 1),
            'eventType': 'SERVICE_CREATED'|'SERVICE_DELETED'|'SERVICE_SYSTEM_ASSOCIATED'|'SERVICE_SYSTEM_DISASSOCIATED'|'SERVICE_RESOURCES_ASSOCIATED'|'SERVICE_RESOURCES_DISASSOCIATED'|'SERVICE_WORKFLOW_UPDATED'|'SERVICE_INPUT_SOURCES_UPDATED'|'SERVICE_POLICY_ASSOCIATED'|'SERVICE_POLICY_DISASSOCIATED'|'SERVICE_FUNCTION_CREATED'|'SERVICE_FUNCTION_UPDATED'|'SERVICE_FUNCTION_DELETED'|'SERVICE_FUNCTION_RESOURCES_ADDED'|'SERVICE_FUNCTION_RESOURCES_REMOVED'|'SERVICE_ACHIEVABILITY_UPDATED'|'ASSERTION_CREATED'|'ASSERTION_UPDATED'|'ASSERTION_DELETED',
            'serviceArn': 'string',
            'actor': {
                'type': 'USER'|'SYSTEM',
                'principalId': 'string',
                'accountId': 'string',
                'userName': 'string'
            },
            'eventDetails': {
                'title': 'string',
                'description': 'string',
                'eventMetadata': {
                    'serviceCreated': {},
                    'serviceDeleted': {},
                    'serviceSystemAssociated': {
                        'systemName': 'string',
                        'systemArn': 'string'
                    },
                    'serviceSystemDisassociated': {
                        'systemId': 'string',
                        'systemName': 'string',
                        'systemArn': 'string'
                    },
                    'serviceResourcesAssociated': {
                        'resourceCount': 123,
                        'resourceTypes': [
                            'string',
                        ]
                    },
                    'serviceResourcesDisassociated': {
                        'resourceCount': 123,
                        'resourceTypes': [
                            'string',
                        ]
                    },
                    'serviceWorkflowUpdated': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string'
                    },
                    'serviceInputSourcesUpdated': {},
                    'servicePolicyAssociated': {
                        'policyName': 'string',
                        'policyArn': 'string',
                        'policyOwnerAccountId': 'string',
                        'policySource': 'SELF'|'CROSS_ACCOUNT'
                    },
                    'servicePolicyDisassociated': {
                        'policyName': 'string',
                        'policyArn': 'string',
                        'policyOwnerAccountId': 'string',
                        'policySource': 'SELF'|'CROSS_ACCOUNT',
                        'reason': 'REPLACED_BY_UPDATE'|'SHARING_REVOKED'|'POLICY_DELETED'
                    },
                    'serviceFunctionCreated': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string'
                    },
                    'serviceFunctionUpdated': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string',
                        'resourcesAdded': [
                            'string',
                        ],
                        'resourcesRemoved': [
                            'string',
                        ]
                    },
                    'serviceFunctionDeleted': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string'
                    },
                    'serviceFunctionResourcesAdded': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string',
                        'resourcesAdded': [
                            'string',
                        ]
                    },
                    'serviceFunctionResourcesRemoved': {
                        'serviceFunctionId': 'string',
                        'serviceFunctionName': 'string',
                        'resourcesRemoved': [
                            'string',
                        ]
                    },
                    'serviceAchievabilityUpdated': {
                        'assessmentId': 'string',
                        'availabilitySlo': 'string',
                        'multiAzRtoRpo': 'string',
                        'multiRegionRtoRpo': 'string'
                    },
                    'assertionCreated': {
                        'assertionId': 'string',
                        'assertionName': 'string'
                    },
                    'assertionUpdated': {
                        'assertionId': 'string',
                        'assertionName': 'string'
                    },
                    'assertionDeleted': {
                        'assertionId': 'string',
                        'assertionName': 'string'
                    }
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • events (list) --

      The list of service events.

      • (dict) --

        Represents an event in the service event log.

        • eventId (string) --

          The unique identifier of the event.

        • timestamp (datetime) --

          The timestamp of the event.

        • eventType (string) --

          The type of the event.

        • serviceArn (string) --

          ARN identifier.

        • actor (dict) --

          The actor that triggered the event.

          • type (string) --

            The type of actor, either USER or SYSTEM.

          • principalId (string) --

            The principal ID of the actor.

          • accountId (string) --

            The AWS account ID of the actor.

          • userName (string) --

            The user name of the actor.

        • eventDetails (dict) --

          The details of the event.

          • title (string) --

            The title of the event.

          • description (string) --

            The description of the event.

          • eventMetadata (dict) --

            Type-specific metadata for each service event type.

            • serviceCreated (dict) --

              Metadata for a service created event.

            • serviceDeleted (dict) --

              Metadata for a service deleted event.

            • serviceSystemAssociated (dict) --

              Metadata for a service system associated event.

              • systemName (string) --

                The name of the associated system.

              • systemArn (string) --

                ARN identifier.

            • serviceSystemDisassociated (dict) --

              Metadata for a service system disassociated event.

              • systemId (string) --

                The identifier of the disassociated system.

              • systemName (string) --

                The name of the disassociated system.

              • systemArn (string) --

                ARN identifier.

            • serviceResourcesAssociated (dict) --

              Metadata for a service resources associated event.

              • resourceCount (integer) --

                The number of resources associated.

              • resourceTypes (list) --

                The types of resources associated.

                • (string) --

            • serviceResourcesDisassociated (dict) --

              Metadata for a service resources disassociated event.

              • resourceCount (integer) --

                The number of resources disassociated.

              • resourceTypes (list) --

                The types of resources disassociated.

                • (string) --

            • serviceWorkflowUpdated (dict) --

              Metadata for a service workflow updated event.

              • serviceFunctionId (string) --

                The identifier of the service function.

              • serviceFunctionName (string) --

                The name of the service function.

            • serviceInputSourcesUpdated (dict) --

              Metadata for a service input sources updated event.

            • servicePolicyAssociated (dict) --

              Metadata for a service policy associated event.

              • policyName (string) --

                The name of the associated policy.

              • policyArn (string) --

                ARN identifier.

              • policyOwnerAccountId (string) --

                The account that owns the policy.

              • policySource (string) --

                The source of the policy.

                • SELF — the policy belongs to the account that owns the service.

                • CROSS_ACCOUNT — the policy belongs to another account and was shared with the organization.

            • servicePolicyDisassociated (dict) --

              Metadata for a service policy disassociated event.

              • policyName (string) --

                The name of the disassociated policy.

              • policyArn (string) --

                ARN identifier.

              • policyOwnerAccountId (string) --

                The account that owns the policy.

              • policySource (string) --

                The source of the policy.

                • SELF — the policy belongs to the account that owns the service.

                • CROSS_ACCOUNT — the policy belongs to another account and was shared with the organization.

              • reason (string) --

                The reason the policy was disassociated from the service.

            • serviceFunctionCreated (dict) --

              Metadata for a service function created event.

              • serviceFunctionId (string) --

                The identifier of the created service function.

              • serviceFunctionName (string) --

                The name of the created service function.

            • serviceFunctionUpdated (dict) --

              Metadata for a service function updated event.

              • serviceFunctionId (string) --

                The identifier of the service function.

              • serviceFunctionName (string) --

                The name of the service function.

              • resourcesAdded (list) --

                The list of resource ARNs that were added.

                • (string) --

                  ARN identifier.

              • resourcesRemoved (list) --

                The list of resource ARNs that were removed.

                • (string) --

                  ARN identifier.

            • serviceFunctionDeleted (dict) --

              Metadata for a service function deleted event.

              • serviceFunctionId (string) --

                The identifier of the deleted service function.

              • serviceFunctionName (string) --

                The name of the deleted service function.

            • serviceFunctionResourcesAdded (dict) --

              Metadata for a service function resources added event.

              • serviceFunctionId (string) --

                The identifier of the service function.

              • serviceFunctionName (string) --

                The name of the service function.

              • resourcesAdded (list) --

                The list of resource ARNs that were added.

                • (string) --

                  ARN identifier.

            • serviceFunctionResourcesRemoved (dict) --

              Metadata for a service function resources removed event.

              • serviceFunctionId (string) --

                The identifier of the service function.

              • serviceFunctionName (string) --

                The name of the service function.

              • resourcesRemoved (list) --

                The list of resource ARNs that were removed.

                • (string) --

                  ARN identifier.

            • serviceAchievabilityUpdated (dict) --

              Metadata for a service achievability updated event.

              • assessmentId (string) --

                The assessment identifier that triggered the update.

              • availabilitySlo (string) --

                The updated achievability status of the availability SLO.

              • multiAzRtoRpo (string) --

                The updated achievability status of the multi-AZ RTO and RPO targets.

              • multiRegionRtoRpo (string) --

                The updated achievability status of the multi-Region RTO and RPO targets.

            • assertionCreated (dict) --

              Metadata for an assertion created event.

              • assertionId (string) --

                The unique identifier of the created assertion.

              • assertionName (string) --

                The name of the created assertion.

            • assertionUpdated (dict) --

              Metadata for an assertion updated event.

              • assertionId (string) --

                The unique identifier of the updated assertion.

              • assertionName (string) --

                The name of the updated assertion.

            • assertionDeleted (dict) --

              Metadata for an assertion deleted event.

              • assertionId (string) --

                The unique identifier of the deleted assertion.

              • assertionName (string) --

                The name of the deleted assertion.

    • nextToken (string) --

      Pagination token.

UpdatePolicy (updated) Link ¶
Changes (request, response)
Request
{'sharingEnabled': 'boolean'}
Response
{'policy': {'organizationId': 'string', 'sharingEnabled': 'boolean'}}

Updates an existing resilience policy.

See also: AWS API Documentation

Request Syntax

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
    },
    sharingEnabled=True|False
)
type policyArn:

string

param policyArn:

[REQUIRED]

ARN identifier.

type description:

string

param description:

Resource description for services and policies.

type availabilitySlo:

dict

param availabilitySlo:

The updated availability SLO for the policy.

  • target (float) --

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

type multiAz:

dict

param multiAz:

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.

type multiRegion:

dict

param multiRegion:

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.

type dataRecovery:

dict

param dataRecovery:

The updated data recovery targets for the policy.

  • timeBetweenBackupsInMinutes (integer) --

    The target time between backups, in minutes.

type sharingEnabled:

boolean

param sharingEnabled:

Specifies whether cross-account sharing is enabled for the policy. Disabling sharing stops member services from using the policy.

rtype:

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
        },
        'sharingEnabled': True|False,
        'organizationId': 'string',
        '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.

      • sharingEnabled (boolean) --

        Specifies whether cross-account sharing is enabled.

      • organizationId (string) --

        The identifier of the organization this policy is shared with.

      • 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.