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.