AWS Resilience Hub

2024/05/07 - AWS Resilience Hub - 1 new1 updated api methods

Changes  AWS Resilience Hub has expanded its drift detection capabilities by introducing a new type of drift detection - application resource drift. This new enhancement detects changes, such as the addition or deletion of resources within the application's input sources.

ListAppAssessmentResourceDrifts (new) Link ¶

Indicates the list of resource drifts that were detected while running an assessment.

See also: AWS API Documentation

Request Syntax

client.list_app_assessment_resource_drifts(
    assessmentArn='string',
    maxResults=123,
    nextToken='string'
)
type assessmentArn:

string

param assessmentArn:

[REQUIRED]

Amazon Resource Name (ARN) of the assessment. The format for this ARN is: arn: partition:resiliencehub: region: account:app-assessment/ app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

type maxResults:

integer

param maxResults:

Indicates the maximum number of drift results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved.

type nextToken:

string

param nextToken:

Null, or the token from a previous call to get the next set of results.

rtype:

dict

returns:

Response Syntax

{
    'nextToken': 'string',
    'resourceDrifts': [
        {
            'appArn': 'string',
            'appVersion': 'string',
            'diffType': 'NotEqual'|'Added'|'Removed',
            'referenceId': 'string',
            'resourceIdentifier': {
                'logicalResourceId': {
                    'eksSourceName': 'string',
                    'identifier': 'string',
                    'logicalStackName': 'string',
                    'resourceGroupName': 'string',
                    'terraformSourceName': 'string'
                },
                'resourceType': 'string'
            }
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      Null, or the token from a previous call to get the next set of results.

    • resourceDrifts (list) --

      Indicates all the resource drifts detected for an assessed entity.

      • (dict) --

        Indicates the resources that have drifted in the current application version.

        • appArn (string) --

          Amazon Resource Name (ARN) of the application whose resources have drifted. The format for this ARN is: arn: partition:resiliencehub: region: account:app-assessment/ app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

        • appVersion (string) --

          Version of the application whose resources have drifted.

        • diffType (string) --

          Indicates if the resource was added or removed.

        • referenceId (string) --

          Reference identifier of the resource drift.

        • resourceIdentifier (dict) --

          Identifier of the drifted resource.

          • logicalResourceId (dict) --

            Logical identifier of the drifted resource.

            • eksSourceName (string) --

              Name of the Amazon Elastic Kubernetes Service cluster and namespace this resource belongs to.

            • identifier (string) --

              Identifier of the resource.

            • logicalStackName (string) --

              The name of the CloudFormation stack this resource belongs to.

            • resourceGroupName (string) --

              The name of the resource group that this resource belongs to.

            • terraformSourceName (string) --

              The name of the Terraform S3 state file this resource belongs to.

          • resourceType (string) --

            Type of the drifted resource.

ListAppAssessmentComplianceDrifts (updated) Link ¶
Changes (response)
{'complianceDrifts': {'diffType': {'Added', 'Removed'},
                      'driftType': {'AppComponentResiliencyComplianceStatus'}}}

List of compliance drifts that were detected while running an assessment.

See also: AWS API Documentation

Request Syntax

client.list_app_assessment_compliance_drifts(
    assessmentArn='string',
    maxResults=123,
    nextToken='string'
)
type assessmentArn:

string

param assessmentArn:

[REQUIRED]

Amazon Resource Name (ARN) of the assessment. The format for this ARN is: arn: partition:resiliencehub: region: account:app-assessment/ app-id. For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference guide.

type maxResults:

integer

param maxResults:

Indicates the maximum number of applications requested.

type nextToken:

string

param nextToken:

Indicates the unique token number of the next application to be checked for compliance and regulatory requirements from the list of applications.

rtype:

dict

returns:

Response Syntax

{
    'complianceDrifts': [
        {
            'actualReferenceId': 'string',
            'actualValue': {
                'string': {
                    'achievableRpoInSecs': 123,
                    'achievableRtoInSecs': 123,
                    'complianceStatus': 'PolicyBreached'|'PolicyMet',
                    'currentRpoInSecs': 123,
                    'currentRtoInSecs': 123,
                    'message': 'string',
                    'rpoDescription': 'string',
                    'rpoReferenceId': 'string',
                    'rtoDescription': 'string',
                    'rtoReferenceId': 'string'
                }
            },
            'appId': 'string',
            'appVersion': 'string',
            'diffType': 'NotEqual'|'Added'|'Removed',
            'driftType': 'ApplicationCompliance'|'AppComponentResiliencyComplianceStatus',
            'entityId': 'string',
            'entityType': 'string',
            'expectedReferenceId': 'string',
            'expectedValue': {
                'string': {
                    'achievableRpoInSecs': 123,
                    'achievableRtoInSecs': 123,
                    'complianceStatus': 'PolicyBreached'|'PolicyMet',
                    'currentRpoInSecs': 123,
                    'currentRtoInSecs': 123,
                    'message': 'string',
                    'rpoDescription': 'string',
                    'rpoReferenceId': 'string',
                    'rtoDescription': 'string',
                    'rtoReferenceId': 'string'
                }
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • complianceDrifts (list) --

      Indicates compliance drifts (recovery time objective (RTO) and recovery point objective (RPO)) detected for an assessed entity.

      • (dict) --

        Indicates the compliance drifts (recovery time objective (RTO) and recovery point objective (RPO)) that were detected for an assessed entity.

        • actualReferenceId (string) --

          Assessment identifier that is associated with this drift item.

        • actualValue (dict) --

          Actual compliance value of the entity.

          • (string) --

            • (dict) --

              Defines the compliance against the resiliency policy for a disruption.

              • achievableRpoInSecs (integer) --

                The Recovery Point Objective (RPO) that is achievable, in seconds.

              • achievableRtoInSecs (integer) --

                The Recovery Time Objective (RTO) that is achievable, in seconds

              • complianceStatus (string) --

                The current status of compliance for the resiliency policy.

              • currentRpoInSecs (integer) --

                The current RPO, in seconds.

              • currentRtoInSecs (integer) --

                The current RTO, in seconds.

              • message (string) --

                The disruption compliance message.

              • rpoDescription (string) --

                The RPO description.

              • rpoReferenceId (string) --

                Reference identifier of the RPO .

              • rtoDescription (string) --

                The RTO description.

              • rtoReferenceId (string) --

                Reference identifier of the RTO.

        • appId (string) --

          Identifier of your application.

        • appVersion (string) --

          Published version of your application on which drift was detected.

        • diffType (string) --

          Difference type between actual and expected recovery point objective (RPO) and recovery time objective (RTO) values. Currently, Resilience Hub supports only NotEqual difference type.

        • driftType (string) --

          The type of drift detected. Currently, Resilience Hub supports only ApplicationCompliance drift type.

        • entityId (string) --

          Identifier of an entity in which drift was detected. For compliance drift, the entity ID can be either application ID or the AppComponent ID.

        • entityType (string) --

          The type of entity in which drift was detected. For compliance drifts, Resilience Hub supports AWS::ResilienceHub::AppComponent and AWS::ResilienceHub::Application.

        • expectedReferenceId (string) --

          Assessment identifier of a previous assessment of the same application version. Resilience Hub uses the previous assessment (associated with the reference identifier) to compare the compliance with the current assessment to identify drifts.

        • expectedValue (dict) --

          The expected compliance value of an entity.

          • (string) --

            • (dict) --

              Defines the compliance against the resiliency policy for a disruption.

              • achievableRpoInSecs (integer) --

                The Recovery Point Objective (RPO) that is achievable, in seconds.

              • achievableRtoInSecs (integer) --

                The Recovery Time Objective (RTO) that is achievable, in seconds

              • complianceStatus (string) --

                The current status of compliance for the resiliency policy.

              • currentRpoInSecs (integer) --

                The current RPO, in seconds.

              • currentRtoInSecs (integer) --

                The current RTO, in seconds.

              • message (string) --

                The disruption compliance message.

              • rpoDescription (string) --

                The RPO description.

              • rpoReferenceId (string) --

                Reference identifier of the RPO .

              • rtoDescription (string) --

                The RTO description.

              • rtoReferenceId (string) --

                Reference identifier of the RTO.

    • nextToken (string) --

      Token number of the next application to be checked for compliance and regulatory requirements from the list of applications.