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)
...
# accept_resource_share_invitation method usage example with argument unpacking
kwargs: AcceptResourceShareInvitationRequestRequestTypeDef = { # (1)
"resourceShareInvitationArn": ...,
}
parent.accept_resource_share_invitation(**kwargs)
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)
...
# associate_resource_share method usage example with argument unpacking
kwargs: AssociateResourceShareRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
}
parent.associate_resource_share(**kwargs)
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)
...
# associate_resource_share_permission method usage example with argument unpacking
kwargs: AssociateResourceSharePermissionRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
"permissionArn": ...,
}
parent.associate_resource_share_permission(**kwargs)
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)
...
# create_permission method usage example with argument unpacking
kwargs: CreatePermissionRequestRequestTypeDef = { # (1)
"name": ...,
"resourceType": ...,
"policyTemplate": ...,
}
parent.create_permission(**kwargs)
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.