Skip to content

RAMClient

Index > RAM > RAMClient

Auto-generated documentation for RAM type annotations stubs module types-aiobotocore-ram.

RAMClient

Type annotations and code completion for session.client("ram") boto3 documentation

Usage example
from aioboto3.session import Session
from types_aiobotocore_ram.client import RAMClient

session = Session()
async with session.client("ram") as client:
    client: RAMClient

Exceptions

aioboto3 client exceptions are generated in runtime. This class provides code completion for session.client("ram").exceptions structure.

Usage example
async with session.client("ram") as client:
    try:
        do_something(client)
    except (
            client.ClientError,
        client.IdempotentParameterMismatchException,
        client.InvalidClientTokenException,
        client.InvalidMaxResultsException,
        client.InvalidNextTokenException,
        client.InvalidParameterException,
        client.InvalidResourceTypeException,
        client.InvalidStateTransitionException,
        client.MalformedArnException,
        client.MissingRequiredParameterException,
        client.OperationNotPermittedException,
        client.ResourceArnNotFoundException,
        client.ResourceShareInvitationAlreadyAcceptedException,
        client.ResourceShareInvitationAlreadyRejectedException,
        client.ResourceShareInvitationArnNotFoundException,
        client.ResourceShareInvitationExpiredException,
        client.ResourceShareLimitExceededException,
        client.ServerInternalException,
        client.ServiceUnavailableException,
        client.TagLimitExceededException,
        client.TagPolicyViolationException,
        client.ThrottlingException,
        client.UnknownResourceException,
    ) as e:
        print(e)
Type checking example
from types_aiobotocore_ram.client import Exceptions

def handle_error(exc: Exceptions.ClientError) -> None:
    ...

Methods

accept_resource_share_invitation

Accepts an invitation to a resource share from another Amazon Web Services account.

Type annotations and code completion for session.client("ram").accept_resource_share_invitation method. boto3 documentation

Method definition
await def accept_resource_share_invitation(
    self,
    *,
    resourceShareInvitationArn: str,
    clientToken: str = ...,
) -> AcceptResourceShareInvitationResponseTypeDef:  # (1)
    ...
  1. See AcceptResourceShareInvitationResponseTypeDef
Usage example with kwargs
kwargs: AcceptResourceShareInvitationRequestRequestTypeDef = {  # (1)
    "resourceShareInvitationArn": ...,
}

parent.accept_resource_share_invitation(**kwargs)
  1. See AcceptResourceShareInvitationRequestRequestTypeDef

associate_resource_share

Adds the specified list of principals and list of resources to a resource share.

Type annotations and code completion for session.client("ram").associate_resource_share method. boto3 documentation

Method definition
await def associate_resource_share(
    self,
    *,
    resourceShareArn: str,
    resourceArns: Sequence[str] = ...,
    principals: Sequence[str] = ...,
    clientToken: str = ...,
) -> AssociateResourceShareResponseTypeDef:  # (1)
    ...
  1. See AssociateResourceShareResponseTypeDef
Usage example with kwargs
kwargs: AssociateResourceShareRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

parent.associate_resource_share(**kwargs)
  1. See AssociateResourceShareRequestRequestTypeDef

associate_resource_share_permission

Adds or replaces the RAM permission for a resource type included in a resource share.

Type annotations and code completion for session.client("ram").associate_resource_share_permission method. boto3 documentation

Method definition
await def associate_resource_share_permission(
    self,
    *,
    resourceShareArn: str,
    permissionArn: str,
    replace: bool = ...,
    clientToken: str = ...,
    permissionVersion: int = ...,
) -> AssociateResourceSharePermissionResponseTypeDef:  # (1)
    ...
  1. See AssociateResourceSharePermissionResponseTypeDef
Usage example with kwargs
kwargs: AssociateResourceSharePermissionRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
    "permissionArn": ...,
}

parent.associate_resource_share_permission(**kwargs)
  1. See AssociateResourceSharePermissionRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for session.client("ram").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

close

Closes underlying endpoint connections.

Type annotations and code completion for session.client("ram").close method. boto3 documentation

Method definition
await def close(
    self,
) -> None:
    ...

create_resource_share

Creates a resource share.

Type annotations and code completion for session.client("ram").create_resource_share method. boto3 documentation

Method definition
await def create_resource_share(
    self,
    *,
    name: str,
    resourceArns: Sequence[str] = ...,
    principals: Sequence[str] = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    allowExternalPrincipals: bool = ...,
    clientToken: str = ...,
    permissionArns: Sequence[str] = ...,
) -> CreateResourceShareResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateResourceShareResponseTypeDef
Usage example with kwargs
kwargs: CreateResourceShareRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.create_resource_share(**kwargs)
  1. See CreateResourceShareRequestRequestTypeDef

delete_resource_share

Deletes the specified resource share.

Type annotations and code completion for session.client("ram").delete_resource_share method. boto3 documentation

Method definition
await def delete_resource_share(
    self,
    *,
    resourceShareArn: str,
    clientToken: str = ...,
) -> DeleteResourceShareResponseTypeDef:  # (1)
    ...
  1. See DeleteResourceShareResponseTypeDef
Usage example with kwargs
kwargs: DeleteResourceShareRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

parent.delete_resource_share(**kwargs)
  1. See DeleteResourceShareRequestRequestTypeDef

disassociate_resource_share

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

Type annotations and code completion for session.client("ram").disassociate_resource_share method. boto3 documentation

Method definition
await def disassociate_resource_share(
    self,
    *,
    resourceShareArn: str,
    resourceArns: Sequence[str] = ...,
    principals: Sequence[str] = ...,
    clientToken: str = ...,
) -> DisassociateResourceShareResponseTypeDef:  # (1)
    ...
  1. See DisassociateResourceShareResponseTypeDef
Usage example with kwargs
kwargs: DisassociateResourceShareRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

parent.disassociate_resource_share(**kwargs)
  1. See DisassociateResourceShareRequestRequestTypeDef

disassociate_resource_share_permission

Disassociates an RAM permission from a resource share.

Type annotations and code completion for session.client("ram").disassociate_resource_share_permission method. boto3 documentation

Method definition
await def disassociate_resource_share_permission(
    self,
    *,
    resourceShareArn: str,
    permissionArn: str,
    clientToken: str = ...,
) -> DisassociateResourceSharePermissionResponseTypeDef:  # (1)
    ...
  1. See DisassociateResourceSharePermissionResponseTypeDef
Usage example with kwargs
kwargs: DisassociateResourceSharePermissionRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
    "permissionArn": ...,
}

parent.disassociate_resource_share_permission(**kwargs)
  1. See DisassociateResourceSharePermissionRequestRequestTypeDef

enable_sharing_with_aws_organization

Enables resource sharing within your organization in Organizations.

Type annotations and code completion for session.client("ram").enable_sharing_with_aws_organization method. boto3 documentation

Method definition
await def enable_sharing_with_aws_organization(
    self,
) -> EnableSharingWithAwsOrganizationResponseTypeDef:  # (1)
    ...
  1. See EnableSharingWithAwsOrganizationResponseTypeDef

generate_presigned_url

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

Type annotations and code completion for session.client("ram").generate_presigned_url method. boto3 documentation

Method definition
await def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_permission

Gets the contents of an RAM permission in JSON format.

Type annotations and code completion for session.client("ram").get_permission method. boto3 documentation

Method definition
await def get_permission(
    self,
    *,
    permissionArn: str,
    permissionVersion: int = ...,
) -> GetPermissionResponseTypeDef:  # (1)
    ...
  1. See GetPermissionResponseTypeDef
Usage example with kwargs
kwargs: GetPermissionRequestRequestTypeDef = {  # (1)
    "permissionArn": ...,
}

parent.get_permission(**kwargs)
  1. See GetPermissionRequestRequestTypeDef

get_resource_policies

Retrieves the resource policies for the specified resources that you own and have shared.

Type annotations and code completion for session.client("ram").get_resource_policies method. boto3 documentation

Method definition
await def get_resource_policies(
    self,
    *,
    resourceArns: Sequence[str],
    principal: str = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetResourcePoliciesResponseTypeDef:  # (1)
    ...
  1. See GetResourcePoliciesResponseTypeDef
Usage example with kwargs
kwargs: GetResourcePoliciesRequestRequestTypeDef = {  # (1)
    "resourceArns": ...,
}

parent.get_resource_policies(**kwargs)
  1. See GetResourcePoliciesRequestRequestTypeDef

get_resource_share_associations

Retrieves the resource and principal associations for resource shares that you own.

Type annotations and code completion for session.client("ram").get_resource_share_associations method. boto3 documentation

Method definition
await def get_resource_share_associations(
    self,
    *,
    associationType: ResourceShareAssociationTypeType,  # (1)
    resourceShareArns: Sequence[str] = ...,
    resourceArn: str = ...,
    principal: str = ...,
    associationStatus: ResourceShareAssociationStatusType = ...,  # (2)
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetResourceShareAssociationsResponseTypeDef:  # (3)
    ...
  1. See ResourceShareAssociationTypeType
  2. See ResourceShareAssociationStatusType
  3. See GetResourceShareAssociationsResponseTypeDef
Usage example with kwargs
kwargs: GetResourceShareAssociationsRequestRequestTypeDef = {  # (1)
    "associationType": ...,
}

parent.get_resource_share_associations(**kwargs)
  1. See GetResourceShareAssociationsRequestRequestTypeDef

get_resource_share_invitations

Retrieves details about invitations that you have received for resource shares.

Type annotations and code completion for session.client("ram").get_resource_share_invitations method. boto3 documentation

Method definition
await def get_resource_share_invitations(
    self,
    *,
    resourceShareInvitationArns: Sequence[str] = ...,
    resourceShareArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> GetResourceShareInvitationsResponseTypeDef:  # (1)
    ...
  1. See GetResourceShareInvitationsResponseTypeDef
Usage example with kwargs
kwargs: GetResourceShareInvitationsRequestRequestTypeDef = {  # (1)
    "resourceShareInvitationArns": ...,
}

parent.get_resource_share_invitations(**kwargs)
  1. See GetResourceShareInvitationsRequestRequestTypeDef

get_resource_shares

Retrieves details about the resource shares that you own or that are shared with you.

Type annotations and code completion for session.client("ram").get_resource_shares method. boto3 documentation

Method definition
await def get_resource_shares(
    self,
    *,
    resourceOwner: ResourceOwnerType,  # (1)
    resourceShareArns: Sequence[str] = ...,
    resourceShareStatus: ResourceShareStatusType = ...,  # (2)
    name: str = ...,
    tagFilters: Sequence[TagFilterTypeDef] = ...,  # (3)
    nextToken: str = ...,
    maxResults: int = ...,
    permissionArn: str = ...,
) -> GetResourceSharesResponseTypeDef:  # (4)
    ...
  1. See ResourceOwnerType
  2. See ResourceShareStatusType
  3. See TagFilterTypeDef
  4. See GetResourceSharesResponseTypeDef
Usage example with kwargs
kwargs: GetResourceSharesRequestRequestTypeDef = {  # (1)
    "resourceOwner": ...,
}

parent.get_resource_shares(**kwargs)
  1. See GetResourceSharesRequestRequestTypeDef

list_pending_invitation_resources

Lists the resources in a resource share that is shared with you but for which the invitation is still PENDING.

Type annotations and code completion for session.client("ram").list_pending_invitation_resources method. boto3 documentation

Method definition
await def list_pending_invitation_resources(
    self,
    *,
    resourceShareInvitationArn: str,
    nextToken: str = ...,
    maxResults: int = ...,
    resourceRegionScope: ResourceRegionScopeFilterType = ...,  # (1)
) -> ListPendingInvitationResourcesResponseTypeDef:  # (2)
    ...
  1. See ResourceRegionScopeFilterType
  2. See ListPendingInvitationResourcesResponseTypeDef
Usage example with kwargs
kwargs: ListPendingInvitationResourcesRequestRequestTypeDef = {  # (1)
    "resourceShareInvitationArn": ...,
}

parent.list_pending_invitation_resources(**kwargs)
  1. See ListPendingInvitationResourcesRequestRequestTypeDef

list_permission_versions

Lists the available versions of the specified RAM permission.

Type annotations and code completion for session.client("ram").list_permission_versions method. boto3 documentation

Method definition
await def list_permission_versions(
    self,
    *,
    permissionArn: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListPermissionVersionsResponseTypeDef:  # (1)
    ...
  1. See ListPermissionVersionsResponseTypeDef
Usage example with kwargs
kwargs: ListPermissionVersionsRequestRequestTypeDef = {  # (1)
    "permissionArn": ...,
}

parent.list_permission_versions(**kwargs)
  1. See ListPermissionVersionsRequestRequestTypeDef

list_permissions

Retrieves a list of available RAM permissions that you can use for the supported resource types.

Type annotations and code completion for session.client("ram").list_permissions method. boto3 documentation

Method definition
await def list_permissions(
    self,
    *,
    resourceType: str = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListPermissionsResponseTypeDef:  # (1)
    ...
  1. See ListPermissionsResponseTypeDef
Usage example with kwargs
kwargs: ListPermissionsRequestRequestTypeDef = {  # (1)
    "resourceType": ...,
}

parent.list_permissions(**kwargs)
  1. See ListPermissionsRequestRequestTypeDef

list_principals

Lists the principals that you are sharing resources with or that are sharing resources with you.

Type annotations and code completion for session.client("ram").list_principals method. boto3 documentation

Method definition
await def list_principals(
    self,
    *,
    resourceOwner: ResourceOwnerType,  # (1)
    resourceArn: str = ...,
    principals: Sequence[str] = ...,
    resourceType: str = ...,
    resourceShareArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListPrincipalsResponseTypeDef:  # (2)
    ...
  1. See ResourceOwnerType
  2. See ListPrincipalsResponseTypeDef
Usage example with kwargs
kwargs: ListPrincipalsRequestRequestTypeDef = {  # (1)
    "resourceOwner": ...,
}

parent.list_principals(**kwargs)
  1. See ListPrincipalsRequestRequestTypeDef

list_resource_share_permissions

Lists the RAM permissions that are associated with a resource share.

Type annotations and code completion for session.client("ram").list_resource_share_permissions method. boto3 documentation

Method definition
await def list_resource_share_permissions(
    self,
    *,
    resourceShareArn: str,
    nextToken: str = ...,
    maxResults: int = ...,
) -> ListResourceSharePermissionsResponseTypeDef:  # (1)
    ...
  1. See ListResourceSharePermissionsResponseTypeDef
Usage example with kwargs
kwargs: ListResourceSharePermissionsRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

parent.list_resource_share_permissions(**kwargs)
  1. See ListResourceSharePermissionsRequestRequestTypeDef

list_resource_types

Lists the resource types that can be shared by RAM.

Type annotations and code completion for session.client("ram").list_resource_types method. boto3 documentation

Method definition
await def list_resource_types(
    self,
    *,
    nextToken: str = ...,
    maxResults: int = ...,
    resourceRegionScope: ResourceRegionScopeFilterType = ...,  # (1)
) -> ListResourceTypesResponseTypeDef:  # (2)
    ...
  1. See ResourceRegionScopeFilterType
  2. See ListResourceTypesResponseTypeDef
Usage example with kwargs
kwargs: ListResourceTypesRequestRequestTypeDef = {  # (1)
    "nextToken": ...,
}

parent.list_resource_types(**kwargs)
  1. See ListResourceTypesRequestRequestTypeDef

list_resources

Lists the resources that you added to a resource share or the resources that are shared with you.

Type annotations and code completion for session.client("ram").list_resources method. boto3 documentation

Method definition
await def list_resources(
    self,
    *,
    resourceOwner: ResourceOwnerType,  # (1)
    principal: str = ...,
    resourceType: str = ...,
    resourceArns: Sequence[str] = ...,
    resourceShareArns: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    resourceRegionScope: ResourceRegionScopeFilterType = ...,  # (2)
) -> ListResourcesResponseTypeDef:  # (3)
    ...
  1. See ResourceOwnerType
  2. See ResourceRegionScopeFilterType
  3. See ListResourcesResponseTypeDef
Usage example with kwargs
kwargs: ListResourcesRequestRequestTypeDef = {  # (1)
    "resourceOwner": ...,
}

parent.list_resources(**kwargs)
  1. See ListResourcesRequestRequestTypeDef

promote_resource_share_created_from_policy

When you attach a resource-based permission policy to a resource, it automatically creates a resource share.

Type annotations and code completion for session.client("ram").promote_resource_share_created_from_policy method. boto3 documentation

Method definition
await def promote_resource_share_created_from_policy(
    self,
    *,
    resourceShareArn: str,
) -> PromoteResourceShareCreatedFromPolicyResponseTypeDef:  # (1)
    ...
  1. See PromoteResourceShareCreatedFromPolicyResponseTypeDef
Usage example with kwargs
kwargs: PromoteResourceShareCreatedFromPolicyRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

parent.promote_resource_share_created_from_policy(**kwargs)
  1. See PromoteResourceShareCreatedFromPolicyRequestRequestTypeDef

reject_resource_share_invitation

Rejects an invitation to a resource share from another Amazon Web Services account.

Type annotations and code completion for session.client("ram").reject_resource_share_invitation method. boto3 documentation

Method definition
await def reject_resource_share_invitation(
    self,
    *,
    resourceShareInvitationArn: str,
    clientToken: str = ...,
) -> RejectResourceShareInvitationResponseTypeDef:  # (1)
    ...
  1. See RejectResourceShareInvitationResponseTypeDef
Usage example with kwargs
kwargs: RejectResourceShareInvitationRequestRequestTypeDef = {  # (1)
    "resourceShareInvitationArn": ...,
}

parent.reject_resource_share_invitation(**kwargs)
  1. See RejectResourceShareInvitationRequestRequestTypeDef

tag_resource

Adds the specified tag keys and values to the specified resource share.

Type annotations and code completion for session.client("ram").tag_resource method. boto3 documentation

Method definition
await def tag_resource(
    self,
    *,
    resourceShareArn: str,
    tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource

Removes the specified tag key and value pairs from the specified resource share.

Type annotations and code completion for session.client("ram").untag_resource method. boto3 documentation

Method definition
await def untag_resource(
    self,
    *,
    resourceShareArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_resource_share

Modifies some of the properties of the specified resource share.

Type annotations and code completion for session.client("ram").update_resource_share method. boto3 documentation

Method definition
await def update_resource_share(
    self,
    *,
    resourceShareArn: str,
    name: str = ...,
    allowExternalPrincipals: bool = ...,
    clientToken: str = ...,
) -> UpdateResourceShareResponseTypeDef:  # (1)
    ...
  1. See UpdateResourceShareResponseTypeDef
Usage example with kwargs
kwargs: UpdateResourceShareRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

parent.update_resource_share(**kwargs)
  1. See UpdateResourceShareRequestRequestTypeDef

__aenter__

Type annotations and code completion for session.client("ram").__aenter__ method. boto3 documentation

Method definition
await def __aenter__(
    self,
) -> RAMClient:
    ...

__aexit__

Type annotations and code completion for session.client("ram").__aexit__ method. boto3 documentation

Method definition
await def __aexit__(
    self,
    exc_type: Any,
    exc_val: Any,
    exc_tb: Any,
) -> Any:
    ...

get_paginator

Type annotations and code completion for session.client("ram").get_paginator method with overloads.