RAM

Table of Contents

Client

class RAM.Client

A low-level client representing AWS Resource Access Manager (RAM):

client = session.create_client('ram')

These are the available methods:

accept_resource_share_invitation(**kwargs)

Accepts an invitation to a resource share from another AWS account.

See also: AWS API Documentation

Request Syntax

response = client.accept_resource_share_invitation(
    resourceShareInvitationArn='string',
    clientToken='string'
)
Parameters
  • resourceShareInvitationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the invitation.

  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'resourceShareInvitation': {
        'resourceShareInvitationArn': 'string',
        'resourceShareName': 'string',
        'resourceShareArn': 'string',
        'senderAccountId': 'string',
        'receiverAccountId': 'string',
        'invitationTimestamp': datetime(2015, 1, 1),
        'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
        'resourceShareAssociations': [
            {
                'resourceShareArn': 'string',
                'associatedEntity': 'string',
                'associationType': 'PRINCIPAL'|'RESOURCE',
                'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
                'statusMessage': 'string',
                'creationTime': datetime(2015, 1, 1),
                'lastUpdatedTime': datetime(2015, 1, 1),
                'external': True|False
            },
        ]
    },
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareInvitation (dict) --

      Information about the invitation.

      • resourceShareInvitationArn (string) --

        The Amazon Resource Name (ARN) of the invitation.

      • resourceShareName (string) --

        The name of the resource share.

      • resourceShareArn (string) --

        The Amazon Resource Name (ARN) of the resource share.

      • senderAccountId (string) --

        The ID of the AWS account that sent the invitation.

      • receiverAccountId (string) --

        The ID of the AWS account that received the invitation.

      • invitationTimestamp (datetime) --

        The date and time when the invitation was sent.

      • status (string) --

        The status of the invitation.

      • resourceShareAssociations (list) --

        The resources associated with the resource share.

        • (dict) --

          Describes an association with a resource share.

          • resourceShareArn (string) --

            The Amazon Resource Name (ARN) of the resource share.

          • associatedEntity (string) --

            The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

          • associationType (string) --

            The association type.

          • status (string) --

            The status of the association.

          • statusMessage (string) --

            A message about the status of the association.

          • creationTime (datetime) --

            The time when the association was created.

          • lastUpdatedTime (datetime) --

            The time when the association was last updated.

          • external (boolean) --

            Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

associate_resource_share(**kwargs)

Associates the specified resource share with the specified principals and resources.

See also: AWS API Documentation

Request Syntax

response = client.associate_resource_share(
    resourceShareArn='string',
    resourceArns=[
        'string',
    ],
    principals=[
        'string',
    ],
    clientToken='string'
)
Parameters
  • resourceShareArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource share.

  • resourceArns (list) --

    The Amazon Resource Names (ARN) of the resources.

    • (string) --
  • principals (list) --

    The principals.

    • (string) --
  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'resourceShareAssociations': [
        {
            'resourceShareArn': 'string',
            'associatedEntity': 'string',
            'associationType': 'PRINCIPAL'|'RESOURCE',
            'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
            'statusMessage': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'external': True|False
        },
    ],
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes an association with a resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • associatedEntity (string) --

          The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

        • associationType (string) --

          The association type.

        • status (string) --

          The status of the association.

        • statusMessage (string) --

          A message about the status of the association.

        • creationTime (datetime) --

          The time when the association was created.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

        • external (boolean) --

          Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

can_paginate(operation_name)

Check if an operation can be paginated.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Returns
True if the operation can be paginated, False otherwise.
create_resource_share(**kwargs)

Creates a resource share.

See also: AWS API Documentation

Request Syntax

response = client.create_resource_share(
    name='string',
    resourceArns=[
        'string',
    ],
    principals=[
        'string',
    ],
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ],
    allowExternalPrincipals=True|False,
    clientToken='string'
)
Parameters
  • name (string) --

    [REQUIRED]

    The name of the resource share.

  • resourceArns (list) --

    The Amazon Resource Names (ARN) of the resources to associate with the resource share.

    • (string) --
  • principals (list) --

    The principals to associate with the resource share. The possible values are IDs of AWS accounts, the ARN of an OU or organization from AWS Organizations.

    • (string) --
  • tags (list) --

    One or more tags.

    • (dict) --

      Information about a tag.

      • key (string) --

        The key of the tag.

      • value (string) --

        The value of the tag.

  • allowExternalPrincipals (boolean) -- Indicates whether principals outside your organization can be associated with a resource share.
  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'resourceShare': {
        'resourceShareArn': 'string',
        'name': 'string',
        'owningAccountId': 'string',
        'allowExternalPrincipals': True|False,
        'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
        'statusMessage': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'creationTime': datetime(2015, 1, 1),
        'lastUpdatedTime': datetime(2015, 1, 1)
    },
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShare (dict) --

      Information about the resource share.

      • resourceShareArn (string) --

        The Amazon Resource Name (ARN) of the resource share.

      • name (string) --

        The name of the resource share.

      • owningAccountId (string) --

        The ID of the AWS account that owns the resource share.

      • allowExternalPrincipals (boolean) --

        Indicates whether principals outside your organization can be associated with a resource share.

      • status (string) --

        The status of the resource share.

      • statusMessage (string) --

        A message about the status of the resource share.

      • tags (list) --

        The tags for the resource share.

        • (dict) --

          Information about a tag.

          • key (string) --

            The key of the tag.

          • value (string) --

            The value of the tag.

      • creationTime (datetime) --

        The time when the resource share was created.

      • lastUpdatedTime (datetime) --

        The time when the resource share was last updated.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

delete_resource_share(**kwargs)

Deletes the specified resource share.

See also: AWS API Documentation

Request Syntax

response = client.delete_resource_share(
    resourceShareArn='string',
    clientToken='string'
)
Parameters
  • resourceShareArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource share.

  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'returnValue': True|False,
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • returnValue (boolean) --

      Indicates whether the request succeeded.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

disassociate_resource_share(**kwargs)

Disassociates the specified principals or resources from the specified resource share.

See also: AWS API Documentation

Request Syntax

response = client.disassociate_resource_share(
    resourceShareArn='string',
    resourceArns=[
        'string',
    ],
    principals=[
        'string',
    ],
    clientToken='string'
)
Parameters
  • resourceShareArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource share.

  • resourceArns (list) --

    The Amazon Resource Names (ARN) of the resources.

    • (string) --
  • principals (list) --

    The principals.

    • (string) --
  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'resourceShareAssociations': [
        {
            'resourceShareArn': 'string',
            'associatedEntity': 'string',
            'associationType': 'PRINCIPAL'|'RESOURCE',
            'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
            'statusMessage': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'external': True|False
        },
    ],
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareAssociations (list) --

      Information about the associations.

      • (dict) --

        Describes an association with a resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • associatedEntity (string) --

          The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

        • associationType (string) --

          The association type.

        • status (string) --

          The status of the association.

        • statusMessage (string) --

          A message about the status of the association.

        • creationTime (datetime) --

          The time when the association was created.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

        • external (boolean) --

          Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

enable_sharing_with_aws_organization()

Enables resource sharing within your organization.

See also: AWS API Documentation

Request Syntax

response = client.enable_sharing_with_aws_organization()
Return type
dict
Returns
Response Syntax
{
    'returnValue': True|False
}

Response Structure

  • (dict) --
    • returnValue (boolean) --

      Indicates whether the request succeeded.

generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)

Generate a presigned url given a client, its method, and arguments

Parameters
  • ClientMethod (string) -- The client method to presign for
  • Params (dict) -- The parameters normally passed to ClientMethod.
  • ExpiresIn (int) -- The number of seconds the presigned url is valid for. By default it expires in an hour (3600 seconds)
  • HttpMethod (string) -- The http method to use on the generated url. By default, the http method is whatever is used in the method's model.
Returns

The presigned url

get_paginator(operation_name)

Create a paginator for an operation.

Parameters
operation_name (string) -- The operation name. This is the same name as the method name on the client. For example, if the method name is create_foo, and you'd normally invoke the operation as client.create_foo(**kwargs), if the create_foo operation can be paginated, you can use the call client.get_paginator("create_foo").
Raises OperationNotPageableError
Raised if the operation is not pageable. You can use the client.can_paginate method to check if an operation is pageable.
Return type
L{botocore.paginate.Paginator}
Returns
A paginator object.
get_resource_policies(**kwargs)

Gets the policies for the specifies resources.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_policies(
    resourceArns=[
        'string',
    ],
    principal='string',
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceArns (list) --

    [REQUIRED]

    The Amazon Resource Names (ARN) of the resources.

    • (string) --
  • principal (string) -- The principal.
  • nextToken (string) -- The token for the next page of results.
  • maxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'policies': [
        'string',
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • policies (list) --

      A key policy document, in JSON format.

      • (string) --
    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

get_resource_share_associations(**kwargs)

Gets the associations for the specified resource share.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_share_associations(
    associationType='PRINCIPAL'|'RESOURCE',
    resourceShareArns=[
        'string',
    ],
    resourceArn='string',
    principal='string',
    associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
    nextToken='string',
    maxResults=123
)
Parameters
  • associationType (string) --

    [REQUIRED]

    The association type.

  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • resourceArn (string) -- The Amazon Resource Name (ARN) of the resource.
  • principal (string) -- The principal.
  • associationStatus (string) -- The status of the association.
  • nextToken (string) -- The token for the next page of results.
  • maxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'resourceShareAssociations': [
        {
            'resourceShareArn': 'string',
            'associatedEntity': 'string',
            'associationType': 'PRINCIPAL'|'RESOURCE',
            'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
            'statusMessage': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'external': True|False
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareAssociations (list) --

      Information about the association.

      • (dict) --

        Describes an association with a resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • associatedEntity (string) --

          The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

        • associationType (string) --

          The association type.

        • status (string) --

          The status of the association.

        • statusMessage (string) --

          A message about the status of the association.

        • creationTime (datetime) --

          The time when the association was created.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

        • external (boolean) --

          Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

get_resource_share_invitations(**kwargs)

Gets the specified invitations for resource sharing.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_share_invitations(
    resourceShareInvitationArns=[
        'string',
    ],
    resourceShareArns=[
        'string',
    ],
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceShareInvitationArns (list) --

    The Amazon Resource Names (ARN) of the invitations.

    • (string) --
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • nextToken (string) -- The token for the next page of results.
  • maxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'resourceShareInvitations': [
        {
            'resourceShareInvitationArn': 'string',
            'resourceShareName': 'string',
            'resourceShareArn': 'string',
            'senderAccountId': 'string',
            'receiverAccountId': 'string',
            'invitationTimestamp': datetime(2015, 1, 1),
            'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
            'resourceShareAssociations': [
                {
                    'resourceShareArn': 'string',
                    'associatedEntity': 'string',
                    'associationType': 'PRINCIPAL'|'RESOURCE',
                    'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
                    'statusMessage': 'string',
                    'creationTime': datetime(2015, 1, 1),
                    'lastUpdatedTime': datetime(2015, 1, 1),
                    'external': True|False
                },
            ]
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareInvitations (list) --

      Information about the invitations.

      • (dict) --

        Describes an invitation to join a resource share.

        • resourceShareInvitationArn (string) --

          The Amazon Resource Name (ARN) of the invitation.

        • resourceShareName (string) --

          The name of the resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • senderAccountId (string) --

          The ID of the AWS account that sent the invitation.

        • receiverAccountId (string) --

          The ID of the AWS account that received the invitation.

        • invitationTimestamp (datetime) --

          The date and time when the invitation was sent.

        • status (string) --

          The status of the invitation.

        • resourceShareAssociations (list) --

          The resources associated with the resource share.

          • (dict) --

            Describes an association with a resource share.

            • resourceShareArn (string) --

              The Amazon Resource Name (ARN) of the resource share.

            • associatedEntity (string) --

              The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

            • associationType (string) --

              The association type.

            • status (string) --

              The status of the association.

            • statusMessage (string) --

              A message about the status of the association.

            • creationTime (datetime) --

              The time when the association was created.

            • lastUpdatedTime (datetime) --

              The time when the association was last updated.

            • external (boolean) --

              Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

get_resource_shares(**kwargs)

Gets the specified resource shares or all of your resource shares.

See also: AWS API Documentation

Request Syntax

response = client.get_resource_shares(
    resourceShareArns=[
        'string',
    ],
    resourceShareStatus='PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
    resourceOwner='SELF'|'OTHER-ACCOUNTS',
    name='string',
    tagFilters=[
        {
            'tagKey': 'string',
            'tagValues': [
                'string',
            ]
        },
    ],
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • resourceShareStatus (string) -- The status of the resource share.
  • resourceOwner (string) --

    [REQUIRED]

    The type of owner.

  • name (string) -- The name of the resource share.
  • tagFilters (list) --

    One or more tag filters.

    • (dict) --

      Used to filter information based on tags.

      • tagKey (string) --

        The tag key.

      • tagValues (list) --

        The tag values.

        • (string) --
  • nextToken (string) -- The token for the next page of results.
  • maxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'resourceShares': [
        {
            'resourceShareArn': 'string',
            'name': 'string',
            'owningAccountId': 'string',
            'allowExternalPrincipals': True|False,
            'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
            'statusMessage': 'string',
            'tags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShares (list) --

      Information about the resource shares.

      • (dict) --

        Describes a resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • name (string) --

          The name of the resource share.

        • owningAccountId (string) --

          The ID of the AWS account that owns the resource share.

        • allowExternalPrincipals (boolean) --

          Indicates whether principals outside your organization can be associated with a resource share.

        • status (string) --

          The status of the resource share.

        • statusMessage (string) --

          A message about the status of the resource share.

        • tags (list) --

          The tags for the resource share.

          • (dict) --

            Information about a tag.

            • key (string) --

              The key of the tag.

            • value (string) --

              The value of the tag.

        • creationTime (datetime) --

          The time when the resource share was created.

        • lastUpdatedTime (datetime) --

          The time when the resource share was last updated.

    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

get_waiter(waiter_name)

Returns an object that can wait for some condition.

Parameters
waiter_name (str) -- The name of the waiter to get. See the waiters section of the service docs for a list of available waiters.
Returns
The specified waiter object.
Return type
botocore.waiter.Waiter
list_principals(**kwargs)

Lists the principals with access to the specified resource.

See also: AWS API Documentation

Request Syntax

response = client.list_principals(
    resourceOwner='SELF'|'OTHER-ACCOUNTS',
    resourceArn='string',
    principals=[
        'string',
    ],
    resourceType='string',
    resourceShareArns=[
        'string',
    ],
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceOwner (string) --

    [REQUIRED]

    The type of owner.

  • resourceArn (string) -- The Amazon Resource Name (ARN) of the resource.
  • principals (list) --

    The principals.

    • (string) --
  • resourceType (string) -- The resource type.
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • nextToken (string) -- The token for the next page of results.
  • maxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'principals': [
        {
            'id': 'string',
            'resourceShareArn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'external': True|False
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • principals (list) --

      The principals.

      • (dict) --

        Describes a principal for use with AWS Resource Access Manager.

        • id (string) --

          The ID of the principal.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • creationTime (datetime) --

          The time when the principal was associated with the resource share.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

        • external (boolean) --

          Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

list_resources(**kwargs)

Lists the resources that the specified principal can access.

See also: AWS API Documentation

Request Syntax

response = client.list_resources(
    resourceOwner='SELF'|'OTHER-ACCOUNTS',
    principal='string',
    resourceType='string',
    resourceArns=[
        'string',
    ],
    resourceShareArns=[
        'string',
    ],
    nextToken='string',
    maxResults=123
)
Parameters
  • resourceOwner (string) --

    [REQUIRED]

    The type of owner.

  • principal (string) -- The principal.
  • resourceType (string) -- The resource type.
  • resourceArns (list) --

    The Amazon Resource Names (ARN) of the resources.

    • (string) --
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • nextToken (string) -- The token for the next page of results.
  • maxResults (integer) -- The maximum number of results to return with a single call. To retrieve the remaining results, make another call with the returned nextToken value.
Return type

dict

Returns

Response Syntax

{
    'resources': [
        {
            'arn': 'string',
            'type': 'string',
            'resourceShareArn': 'string',
            'status': 'AVAILABLE'|'ZONAL_RESOURCE_INACCESSIBLE'|'LIMIT_EXCEEDED'|'UNAVAILABLE',
            'statusMessage': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • resources (list) --

      Information about the resources.

      • (dict) --

        Describes a resource associated with a resource share.

        • arn (string) --

          The Amazon Resource Name (ARN) of the resource.

        • type (string) --

          The resource type.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • status (string) --

          The status of the resource.

        • statusMessage (string) --

          A message about the status of the resource.

        • creationTime (datetime) --

          The time when the resource was associated with the resource share.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

    • nextToken (string) --

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

reject_resource_share_invitation(**kwargs)

Rejects an invitation to a resource share from another AWS account.

See also: AWS API Documentation

Request Syntax

response = client.reject_resource_share_invitation(
    resourceShareInvitationArn='string',
    clientToken='string'
)
Parameters
  • resourceShareInvitationArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the invitation.

  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'resourceShareInvitation': {
        'resourceShareInvitationArn': 'string',
        'resourceShareName': 'string',
        'resourceShareArn': 'string',
        'senderAccountId': 'string',
        'receiverAccountId': 'string',
        'invitationTimestamp': datetime(2015, 1, 1),
        'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
        'resourceShareAssociations': [
            {
                'resourceShareArn': 'string',
                'associatedEntity': 'string',
                'associationType': 'PRINCIPAL'|'RESOURCE',
                'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
                'statusMessage': 'string',
                'creationTime': datetime(2015, 1, 1),
                'lastUpdatedTime': datetime(2015, 1, 1),
                'external': True|False
            },
        ]
    },
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareInvitation (dict) --

      Information about the invitation.

      • resourceShareInvitationArn (string) --

        The Amazon Resource Name (ARN) of the invitation.

      • resourceShareName (string) --

        The name of the resource share.

      • resourceShareArn (string) --

        The Amazon Resource Name (ARN) of the resource share.

      • senderAccountId (string) --

        The ID of the AWS account that sent the invitation.

      • receiverAccountId (string) --

        The ID of the AWS account that received the invitation.

      • invitationTimestamp (datetime) --

        The date and time when the invitation was sent.

      • status (string) --

        The status of the invitation.

      • resourceShareAssociations (list) --

        The resources associated with the resource share.

        • (dict) --

          Describes an association with a resource share.

          • resourceShareArn (string) --

            The Amazon Resource Name (ARN) of the resource share.

          • associatedEntity (string) --

            The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

          • associationType (string) --

            The association type.

          • status (string) --

            The status of the association.

          • statusMessage (string) --

            A message about the status of the association.

          • creationTime (datetime) --

            The time when the association was created.

          • lastUpdatedTime (datetime) --

            The time when the association was last updated.

          • external (boolean) --

            Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

tag_resource(**kwargs)

Adds the specified tags to the specified resource share.

See also: AWS API Documentation

Request Syntax

response = client.tag_resource(
    resourceShareArn='string',
    tags=[
        {
            'key': 'string',
            'value': 'string'
        },
    ]
)
Parameters
  • resourceShareArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource share.

  • tags (list) --

    [REQUIRED]

    One or more tags.

    • (dict) --

      Information about a tag.

      • key (string) --

        The key of the tag.

      • value (string) --

        The value of the tag.

Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

untag_resource(**kwargs)

Removes the specified tags from the specified resource share.

See also: AWS API Documentation

Request Syntax

response = client.untag_resource(
    resourceShareArn='string',
    tagKeys=[
        'string',
    ]
)
Parameters
  • resourceShareArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource share.

  • tagKeys (list) --

    [REQUIRED]

    The tag keys of the tags to remove.

    • (string) --
Return type

dict

Returns

Response Syntax

{}

Response Structure

  • (dict) --

update_resource_share(**kwargs)

Updates the specified resource share.

See also: AWS API Documentation

Request Syntax

response = client.update_resource_share(
    resourceShareArn='string',
    name='string',
    allowExternalPrincipals=True|False,
    clientToken='string'
)
Parameters
  • resourceShareArn (string) --

    [REQUIRED]

    The Amazon Resource Name (ARN) of the resource share.

  • name (string) -- The name of the resource share.
  • allowExternalPrincipals (boolean) -- Indicates whether principals outside your organization can be associated with a resource share.
  • clientToken (string) -- A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Return type

dict

Returns

Response Syntax

{
    'resourceShare': {
        'resourceShareArn': 'string',
        'name': 'string',
        'owningAccountId': 'string',
        'allowExternalPrincipals': True|False,
        'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
        'statusMessage': 'string',
        'tags': [
            {
                'key': 'string',
                'value': 'string'
            },
        ],
        'creationTime': datetime(2015, 1, 1),
        'lastUpdatedTime': datetime(2015, 1, 1)
    },
    'clientToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShare (dict) --

      Information about the resource share.

      • resourceShareArn (string) --

        The Amazon Resource Name (ARN) of the resource share.

      • name (string) --

        The name of the resource share.

      • owningAccountId (string) --

        The ID of the AWS account that owns the resource share.

      • allowExternalPrincipals (boolean) --

        Indicates whether principals outside your organization can be associated with a resource share.

      • status (string) --

        The status of the resource share.

      • statusMessage (string) --

        A message about the status of the resource share.

      • tags (list) --

        The tags for the resource share.

        • (dict) --

          Information about a tag.

          • key (string) --

            The key of the tag.

          • value (string) --

            The value of the tag.

      • creationTime (datetime) --

        The time when the resource share was created.

      • lastUpdatedTime (datetime) --

        The time when the resource share was last updated.

    • clientToken (string) --

      A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

Paginators

The available paginators are:

class RAM.Paginator.GetResourcePolicies
paginator = client.get_paginator('get_resource_policies')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RAM.Client.get_resource_policies().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    resourceArns=[
        'string',
    ],
    principal='string',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • resourceArns (list) --

    [REQUIRED]

    The Amazon Resource Names (ARN) of the resources.

    • (string) --
  • principal (string) -- The principal.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'policies': [
        'string',
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • policies (list) --

      A key policy document, in JSON format.

      • (string) --
    • NextToken (string) --

      A token to resume pagination.

class RAM.Paginator.GetResourceShareAssociations
paginator = client.get_paginator('get_resource_share_associations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RAM.Client.get_resource_share_associations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    associationType='PRINCIPAL'|'RESOURCE',
    resourceShareArns=[
        'string',
    ],
    resourceArn='string',
    principal='string',
    associationStatus='ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • associationType (string) --

    [REQUIRED]

    The association type.

  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • resourceArn (string) -- The Amazon Resource Name (ARN) of the resource.
  • principal (string) -- The principal.
  • associationStatus (string) -- The status of the association.
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'resourceShareAssociations': [
        {
            'resourceShareArn': 'string',
            'associatedEntity': 'string',
            'associationType': 'PRINCIPAL'|'RESOURCE',
            'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
            'statusMessage': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'external': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareAssociations (list) --

      Information about the association.

      • (dict) --

        Describes an association with a resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • associatedEntity (string) --

          The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

        • associationType (string) --

          The association type.

        • status (string) --

          The status of the association.

        • statusMessage (string) --

          A message about the status of the association.

        • creationTime (datetime) --

          The time when the association was created.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

        • external (boolean) --

          Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • NextToken (string) --

      A token to resume pagination.

class RAM.Paginator.GetResourceShareInvitations
paginator = client.get_paginator('get_resource_share_invitations')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RAM.Client.get_resource_share_invitations().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    resourceShareInvitationArns=[
        'string',
    ],
    resourceShareArns=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • resourceShareInvitationArns (list) --

    The Amazon Resource Names (ARN) of the invitations.

    • (string) --
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'resourceShareInvitations': [
        {
            'resourceShareInvitationArn': 'string',
            'resourceShareName': 'string',
            'resourceShareArn': 'string',
            'senderAccountId': 'string',
            'receiverAccountId': 'string',
            'invitationTimestamp': datetime(2015, 1, 1),
            'status': 'PENDING'|'ACCEPTED'|'REJECTED'|'EXPIRED',
            'resourceShareAssociations': [
                {
                    'resourceShareArn': 'string',
                    'associatedEntity': 'string',
                    'associationType': 'PRINCIPAL'|'RESOURCE',
                    'status': 'ASSOCIATING'|'ASSOCIATED'|'FAILED'|'DISASSOCIATING'|'DISASSOCIATED',
                    'statusMessage': 'string',
                    'creationTime': datetime(2015, 1, 1),
                    'lastUpdatedTime': datetime(2015, 1, 1),
                    'external': True|False
                },
            ]
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShareInvitations (list) --

      Information about the invitations.

      • (dict) --

        Describes an invitation to join a resource share.

        • resourceShareInvitationArn (string) --

          The Amazon Resource Name (ARN) of the invitation.

        • resourceShareName (string) --

          The name of the resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • senderAccountId (string) --

          The ID of the AWS account that sent the invitation.

        • receiverAccountId (string) --

          The ID of the AWS account that received the invitation.

        • invitationTimestamp (datetime) --

          The date and time when the invitation was sent.

        • status (string) --

          The status of the invitation.

        • resourceShareAssociations (list) --

          The resources associated with the resource share.

          • (dict) --

            Describes an association with a resource share.

            • resourceShareArn (string) --

              The Amazon Resource Name (ARN) of the resource share.

            • associatedEntity (string) --

              The associated entity. For resource associations, this is the ARN of the resource. For principal associations, this is the ID of an AWS account or the ARN of an OU or organization from AWS Organizations.

            • associationType (string) --

              The association type.

            • status (string) --

              The status of the association.

            • statusMessage (string) --

              A message about the status of the association.

            • creationTime (datetime) --

              The time when the association was created.

            • lastUpdatedTime (datetime) --

              The time when the association was last updated.

            • external (boolean) --

              Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • NextToken (string) --

      A token to resume pagination.

class RAM.Paginator.GetResourceShares
paginator = client.get_paginator('get_resource_shares')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RAM.Client.get_resource_shares().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    resourceShareArns=[
        'string',
    ],
    resourceShareStatus='PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
    resourceOwner='SELF'|'OTHER-ACCOUNTS',
    name='string',
    tagFilters=[
        {
            'tagKey': 'string',
            'tagValues': [
                'string',
            ]
        },
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • resourceShareStatus (string) -- The status of the resource share.
  • resourceOwner (string) --

    [REQUIRED]

    The type of owner.

  • name (string) -- The name of the resource share.
  • tagFilters (list) --

    One or more tag filters.

    • (dict) --

      Used to filter information based on tags.

      • tagKey (string) --

        The tag key.

      • tagValues (list) --

        The tag values.

        • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'resourceShares': [
        {
            'resourceShareArn': 'string',
            'name': 'string',
            'owningAccountId': 'string',
            'allowExternalPrincipals': True|False,
            'status': 'PENDING'|'ACTIVE'|'FAILED'|'DELETING'|'DELETED',
            'statusMessage': 'string',
            'tags': [
                {
                    'key': 'string',
                    'value': 'string'
                },
            ],
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • resourceShares (list) --

      Information about the resource shares.

      • (dict) --

        Describes a resource share.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • name (string) --

          The name of the resource share.

        • owningAccountId (string) --

          The ID of the AWS account that owns the resource share.

        • allowExternalPrincipals (boolean) --

          Indicates whether principals outside your organization can be associated with a resource share.

        • status (string) --

          The status of the resource share.

        • statusMessage (string) --

          A message about the status of the resource share.

        • tags (list) --

          The tags for the resource share.

          • (dict) --

            Information about a tag.

            • key (string) --

              The key of the tag.

            • value (string) --

              The value of the tag.

        • creationTime (datetime) --

          The time when the resource share was created.

        • lastUpdatedTime (datetime) --

          The time when the resource share was last updated.

    • NextToken (string) --

      A token to resume pagination.

class RAM.Paginator.ListPrincipals
paginator = client.get_paginator('list_principals')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RAM.Client.list_principals().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    resourceOwner='SELF'|'OTHER-ACCOUNTS',
    resourceArn='string',
    principals=[
        'string',
    ],
    resourceType='string',
    resourceShareArns=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • resourceOwner (string) --

    [REQUIRED]

    The type of owner.

  • resourceArn (string) -- The Amazon Resource Name (ARN) of the resource.
  • principals (list) --

    The principals.

    • (string) --
  • resourceType (string) -- The resource type.
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'principals': [
        {
            'id': 'string',
            'resourceShareArn': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1),
            'external': True|False
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • principals (list) --

      The principals.

      • (dict) --

        Describes a principal for use with AWS Resource Access Manager.

        • id (string) --

          The ID of the principal.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • creationTime (datetime) --

          The time when the principal was associated with the resource share.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

        • external (boolean) --

          Indicates whether the principal belongs to the same organization as the AWS account that owns the resource share.

    • NextToken (string) --

      A token to resume pagination.

class RAM.Paginator.ListResources
paginator = client.get_paginator('list_resources')
paginate(**kwargs)

Creates an iterator that will paginate through responses from RAM.Client.list_resources().

See also: AWS API Documentation

Request Syntax

response_iterator = paginator.paginate(
    resourceOwner='SELF'|'OTHER-ACCOUNTS',
    principal='string',
    resourceType='string',
    resourceArns=[
        'string',
    ],
    resourceShareArns=[
        'string',
    ],
    PaginationConfig={
        'MaxItems': 123,
        'PageSize': 123,
        'StartingToken': 'string'
    }
)
Parameters
  • resourceOwner (string) --

    [REQUIRED]

    The type of owner.

  • principal (string) -- The principal.
  • resourceType (string) -- The resource type.
  • resourceArns (list) --

    The Amazon Resource Names (ARN) of the resources.

    • (string) --
  • resourceShareArns (list) --

    The Amazon Resource Names (ARN) of the resource shares.

    • (string) --
  • PaginationConfig (dict) --

    A dictionary that provides parameters to control pagination.

    • MaxItems (integer) --

      The total number of items to return. If the total number of items available is more than the value specified in max-items then a NextToken will be provided in the output that you can use to resume pagination.

    • PageSize (integer) --

      The size of each page.

    • StartingToken (string) --

      A token to specify where to start paginating. This is the NextToken from a previous response.

Return type

dict

Returns

Response Syntax

{
    'resources': [
        {
            'arn': 'string',
            'type': 'string',
            'resourceShareArn': 'string',
            'status': 'AVAILABLE'|'ZONAL_RESOURCE_INACCESSIBLE'|'LIMIT_EXCEEDED'|'UNAVAILABLE',
            'statusMessage': 'string',
            'creationTime': datetime(2015, 1, 1),
            'lastUpdatedTime': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • resources (list) --

      Information about the resources.

      • (dict) --

        Describes a resource associated with a resource share.

        • arn (string) --

          The Amazon Resource Name (ARN) of the resource.

        • type (string) --

          The resource type.

        • resourceShareArn (string) --

          The Amazon Resource Name (ARN) of the resource share.

        • status (string) --

          The status of the resource.

        • statusMessage (string) --

          A message about the status of the resource.

        • creationTime (datetime) --

          The time when the resource was associated with the resource share.

        • lastUpdatedTime (datetime) --

          The time when the association was last updated.

    • NextToken (string) --

      A token to resume pagination.