Skip to content

RAMClient#

Index > RAM > RAMClient

Auto-generated documentation for RAM type annotations stubs module mypy-boto3-ram.

RAMClient#

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

# RAMClient usage example

from boto3.session import Session
from mypy_boto3_ram.client import RAMClient

def get_ram_client() -> RAMClient:
    return Session().client("ram")

Exceptions#

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

# Exceptions.exceptions usage example

client = boto3.client("ram")

try:
    do_something(client)
except (
    client.exceptions.ClientError,
    client.exceptions.IdempotentParameterMismatchException,
    client.exceptions.InvalidClientTokenException,
    client.exceptions.InvalidMaxResultsException,
    client.exceptions.InvalidNextTokenException,
    client.exceptions.InvalidParameterException,
    client.exceptions.InvalidPolicyException,
    client.exceptions.InvalidResourceTypeException,
    client.exceptions.InvalidStateTransitionException,
    client.exceptions.MalformedArnException,
    client.exceptions.MalformedPolicyTemplateException,
    client.exceptions.MissingRequiredParameterException,
    client.exceptions.OperationNotPermittedException,
    client.exceptions.PermissionAlreadyExistsException,
    client.exceptions.PermissionLimitExceededException,
    client.exceptions.PermissionVersionsLimitExceededException,
    client.exceptions.ResourceArnNotFoundException,
    client.exceptions.ResourceShareInvitationAlreadyAcceptedException,
    client.exceptions.ResourceShareInvitationAlreadyRejectedException,
    client.exceptions.ResourceShareInvitationArnNotFoundException,
    client.exceptions.ResourceShareInvitationExpiredException,
    client.exceptions.ResourceShareLimitExceededException,
    client.exceptions.ServerInternalException,
    client.exceptions.ServiceUnavailableException,
    client.exceptions.TagLimitExceededException,
    client.exceptions.TagPolicyViolationException,
    client.exceptions.ThrottlingException,
    client.exceptions.UnknownResourceException,
    client.exceptions.UnmatchedPolicyPermissionException,
) as e:
    print(e)
# Exceptions.exceptions type checking example

from mypy_boto3_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 boto3.client("ram").accept_resource_share_invitation method. boto3 documentation

# accept_resource_share_invitation method definition

def accept_resource_share_invitation(
    self,
    *,
    resourceShareInvitationArn: str,
    clientToken: str = ...,
) -> AcceptResourceShareInvitationResponseTypeDef:  # (1)
    ...
  1. See AcceptResourceShareInvitationResponseTypeDef
# accept_resource_share_invitation method usage example with argument unpacking

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 boto3.client("ram").associate_resource_share method. boto3 documentation

# associate_resource_share method definition

def associate_resource_share(
    self,
    *,
    resourceShareArn: str,
    resourceArns: Sequence[str] = ...,
    principals: Sequence[str] = ...,
    clientToken: str = ...,
    sources: Sequence[str] = ...,
) -> AssociateResourceShareResponseTypeDef:  # (1)
    ...
  1. See AssociateResourceShareResponseTypeDef
# associate_resource_share method usage example with argument unpacking

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 boto3.client("ram").associate_resource_share_permission method. boto3 documentation

# associate_resource_share_permission method definition

def associate_resource_share_permission(
    self,
    *,
    resourceShareArn: str,
    permissionArn: str,
    replace: bool = ...,
    clientToken: str = ...,
    permissionVersion: int = ...,
) -> AssociateResourceSharePermissionResponseTypeDef:  # (1)
    ...
  1. See AssociateResourceSharePermissionResponseTypeDef
# associate_resource_share_permission method usage example with argument unpacking

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 boto3.client("ram").can_paginate method. boto3 documentation

# can_paginate method definition

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

close#

Closes underlying endpoint connections.

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

# close method definition

def close(
    self,
) -> None:
    ...

create_permission#

Creates a customer managed permission for a specified resource type that you can attach to resource shares.

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

# create_permission method definition

def create_permission(
    self,
    *,
    name: str,
    resourceType: str,
    policyTemplate: str,
    clientToken: str = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
) -> CreatePermissionResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreatePermissionResponseTypeDef
# create_permission method usage example with argument unpacking

kwargs: CreatePermissionRequestRequestTypeDef = {  # (1)
    "name": ...,
    "resourceType": ...,
    "policyTemplate": ...,
}

parent.create_permission(**kwargs)
  1. See CreatePermissionRequestRequestTypeDef

create_permission_version#

Creates a new version of the specified customer managed permission.

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

# create_permission_version method definition

def create_permission_version(
    self,
    *,
    permissionArn: str,
    policyTemplate: str,
    clientToken: str = ...,
) -> CreatePermissionVersionResponseTypeDef:  # (1)
    ...
  1. See CreatePermissionVersionResponseTypeDef
# create_permission_version method usage example with argument unpacking

kwargs: CreatePermissionVersionRequestRequestTypeDef = {  # (1)
    "permissionArn": ...,
    "policyTemplate": ...,
}

parent.create_permission_version(**kwargs)
  1. See CreatePermissionVersionRequestRequestTypeDef

create_resource_share#

Creates a resource share.

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

# create_resource_share method definition

def create_resource_share(
    self,
    *,
    name: str,
    resourceArns: Sequence[str] = ...,
    principals: Sequence[str] = ...,
    tags: Sequence[TagTypeDef] = ...,  # (1)
    allowExternalPrincipals: bool = ...,
    clientToken: str = ...,
    permissionArns: Sequence[str] = ...,
    sources: Sequence[str] = ...,
) -> CreateResourceShareResponseTypeDef:  # (2)
    ...
  1. See TagTypeDef
  2. See CreateResourceShareResponseTypeDef
# create_resource_share method usage example with argument unpacking

kwargs: CreateResourceShareRequestRequestTypeDef = {  # (1)
    "name": ...,
}

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

delete_permission#

Deletes the specified customer managed permission in the Amazon Web Services Region in which you call this operation.

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

# delete_permission method definition

def delete_permission(
    self,
    *,
    permissionArn: str,
    clientToken: str = ...,
) -> DeletePermissionResponseTypeDef:  # (1)
    ...
  1. See DeletePermissionResponseTypeDef
# delete_permission method usage example with argument unpacking

kwargs: DeletePermissionRequestRequestTypeDef = {  # (1)
    "permissionArn": ...,
}

parent.delete_permission(**kwargs)
  1. See DeletePermissionRequestRequestTypeDef

delete_permission_version#

Deletes one version of a customer managed permission.

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

# delete_permission_version method definition

def delete_permission_version(
    self,
    *,
    permissionArn: str,
    permissionVersion: int,
    clientToken: str = ...,
) -> DeletePermissionVersionResponseTypeDef:  # (1)
    ...
  1. See DeletePermissionVersionResponseTypeDef
# delete_permission_version method usage example with argument unpacking

kwargs: DeletePermissionVersionRequestRequestTypeDef = {  # (1)
    "permissionArn": ...,
    "permissionVersion": ...,
}

parent.delete_permission_version(**kwargs)
  1. See DeletePermissionVersionRequestRequestTypeDef

delete_resource_share#

Deletes the specified resource share.

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

# delete_resource_share method definition

def delete_resource_share(
    self,
    *,
    resourceShareArn: str,
    clientToken: str = ...,
) -> DeleteResourceShareResponseTypeDef:  # (1)
    ...
  1. See DeleteResourceShareResponseTypeDef
# delete_resource_share method usage example with argument unpacking

kwargs: DeleteResourceShareRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

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

disassociate_resource_share#

Removes the specified principals or resources from participating in the specified resource share.

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

# disassociate_resource_share method definition

def disassociate_resource_share(
    self,
    *,
    resourceShareArn: str,
    resourceArns: Sequence[str] = ...,
    principals: Sequence[str] = ...,
    clientToken: str = ...,
    sources: Sequence[str] = ...,
) -> DisassociateResourceShareResponseTypeDef:  # (1)
    ...
  1. See DisassociateResourceShareResponseTypeDef
# disassociate_resource_share method usage example with argument unpacking

kwargs: DisassociateResourceShareRequestRequestTypeDef = {  # (1)
    "resourceShareArn": ...,
}

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

disassociate_resource_share_permission#

Removes a managed permission from a resource share.

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

# disassociate_resource_share_permission method definition

def disassociate_resource_share_permission(
    self,
    *,
    resourceShareArn: str,
    permissionArn: str,
    clientToken: str = ...,
) -> DisassociateResourceSharePermissionResponseTypeDef:  # (1)
    ...
  1. See DisassociateResourceSharePermissionResponseTypeDef
# disassociate_resource_share_permission method usage example with argument unpacking

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 boto3.client("ram").enable_sharing_with_aws_organization method. boto3 documentation

# enable_sharing_with_aws_organization method definition

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 boto3.client("ram").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

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

get_permission#

Retrieves the contents of a managed permission in JSON format.

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

# get_permission method definition

def get_permission(
    self,
    *,
    permissionArn: str,
    permissionVersion: int = ...,
) -> GetPermissionResponseTypeDef:  # (1)
    ...
  1. See GetPermissionResponseTypeDef
# get_permission method usage example with argument unpacking

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 boto3.client("ram").get_resource_policies method.