ResilienceHubV2 / Client / list_resources

list_resources

ResilienceHubV2.Client.list_resources(**kwargs)

List resources.

See also: AWS API Documentation

Request Syntax

response = client.list_resources(
    serviceArn='string',
    serviceFunctionId='string',
    awsRegion='string',
    resourceTypes=[
        'string',
    ],
    billable=True|False,
    maxResults=123,
    nextToken='string'
)
Parameters:
  • serviceArn (string) –

    [REQUIRED]

    ARN identifier.

  • serviceFunctionId (string) – Filter resources by service function identifier.

  • awsRegion (string) – Filter resources by AWS Region.

  • resourceTypes (list) –

    The CloudFormation resource types to include in the response.

    • (string) –

  • billable (boolean) – Specifies whether to filter non-billable resources. When true (the default), the operation returns only billable resources.

  • maxResults (integer) – Pagination page size.

  • nextToken (string) – Pagination token.

Return type:

dict

Returns:

Response Syntax

{
    'serviceFunctionId': 'string',
    'serviceResources': [
        {
            'resourceIdentifier': 'string',
            'inputSource': {
                'identifier': 'string',
                'type': 'CFN_STACK'|'TAGS'|'EKS'|'TERRAFORM'|'DESIGN_FILE'|'MONITORING'
            },
            'resource': {
                'identifier': 'string',
                'awsRegion': 'string',
                'awsAccountId': 'string',
                'resourceType': 'string',
                'availabilityZoneId': 'string',
                'availabilityZoneName': 'string',
                'containmentParentId': 'string',
                'logicalResourceGroupId': 'string'
            }
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) –

    • serviceFunctionId (string) –

      The service function identifier for the returned resources.

    • serviceResources (list) –

      The list of service resources.

      • (dict) –

        Represents a resource associated with a service.

        • resourceIdentifier (string) –

          The identifier of the resource.

        • inputSource (dict) –

          The input source that discovered the resource.

          • identifier (string) –

            The identifier of the input source.

          • type (string) –

            The type of the input source.

        • resource (dict) –

          The resource details.

          • identifier (string) –

            The identifier of the resource.

          • awsRegion (string) –

            The AWS Region where the resource is located.

          • awsAccountId (string) –

            The AWS account ID that owns the resource.

          • resourceType (string) –

            The type of the resource.

          • availabilityZoneId (string) –

            The Availability Zone ID of the Availability Zone that hosts the resource, such as use1-az1. The Availability Zone ID is consistent across Amazon Web Services (AWS) accounts, unlike the Availability Zone name.

          • availabilityZoneName (string) –

            The name of the Availability Zone that hosts the resource, such as us-west-2a.

          • containmentParentId (string) –

            The identifier of the single parent resource that contains this resource, used to represent containment relationships in the resource topology. A resource has at most one containment parent.

          • logicalResourceGroupId (string) –

            The identifier of the logical resource group that this resource belongs to. Resources that share this identifier are managed as a single unit.

    • nextToken (string) –

      Pagination token.

Exceptions

  • ResilienceHubV2.Client.exceptions.InternalServerException

  • ResilienceHubV2.Client.exceptions.ResourceNotFoundException

  • ResilienceHubV2.Client.exceptions.ValidationException

  • ResilienceHubV2.Client.exceptions.AccessDeniedException