FMS / Client / batch_associate_resource

batch_associate_resource#

FMS.Client.batch_associate_resource(**kwargs)#

Associate resources to a Firewall Manager resource set.

See also: AWS API Documentation

Request Syntax

response = client.batch_associate_resource(
    ResourceSetIdentifier='string',
    Items=[
        'string',
    ]
)
Parameters:
  • ResourceSetIdentifier (string) –

    [REQUIRED]

    A unique identifier for the resource set, used in a TODO to refer to the resource set.

  • Items (list) –

    [REQUIRED]

    The uniform resource identifiers (URIs) of resources that should be associated to the resource set. The URIs must be Amazon Resource Names (ARNs).

    • (string) –

Return type:

dict

Returns:

Response Syntax

{
    'ResourceSetIdentifier': 'string',
    'FailedItems': [
        {
            'URI': 'string',
            'Reason': 'NOT_VALID_ARN'|'NOT_VALID_PARTITION'|'NOT_VALID_REGION'|'NOT_VALID_SERVICE'|'NOT_VALID_RESOURCE_TYPE'|'NOT_VALID_ACCOUNT_ID'
        },
    ]
}

Response Structure

  • (dict) –

    • ResourceSetIdentifier (string) –

      A unique identifier for the resource set, used in a TODO to refer to the resource set.

    • FailedItems (list) –

      The resources that failed to associate to the resource set.

      • (dict) –

        Details of a resource that failed when trying to update it’s association to a resource set.

        • URI (string) –

          The univeral resource indicator (URI) of the resource that failed.

        • Reason (string) –

          The reason the resource’s association could not be updated.

Exceptions

  • FMS.Client.exceptions.InvalidOperationException

  • FMS.Client.exceptions.InternalErrorException

  • FMS.Client.exceptions.InvalidInputException

  • FMS.Client.exceptions.LimitExceededException

  • FMS.Client.exceptions.ResourceNotFoundException