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
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.
client = boto3.client("ram")
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)
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
def accept_resource_share_invitation(
self,
*,
resourceShareInvitationArn: str,
clientToken: str = ...,
) -> AcceptResourceShareInvitationResponseTypeDef: # (1)
...
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
def associate_resource_share(
self,
*,
resourceShareArn: str,
resourceArns: Sequence[str] = ...,
principals: Sequence[str] = ...,
clientToken: str = ...,
) -> AssociateResourceShareResponseTypeDef: # (1)
...
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
def associate_resource_share_permission(
self,
*,
resourceShareArn: str,
permissionArn: str,
replace: bool = ...,
clientToken: str = ...,
permissionVersion: int = ...,
) -> AssociateResourceSharePermissionResponseTypeDef: # (1)
...
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
close
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("ram").close
method.
boto3 documentation
create_resource_share
Creates a resource share.
Type annotations and code completion for boto3.client("ram").create_resource_share
method.
boto3 documentation
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)
...
kwargs: CreateResourceShareRequestRequestTypeDef = { # (1)
"name": ...,
}
parent.create_resource_share(**kwargs)
delete_resource_share
Deletes the specified resource share.
Type annotations and code completion for boto3.client("ram").delete_resource_share
method.
boto3 documentation
def delete_resource_share(
self,
*,
resourceShareArn: str,
clientToken: str = ...,
) -> DeleteResourceShareResponseTypeDef: # (1)
...
kwargs: DeleteResourceShareRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
}
parent.delete_resource_share(**kwargs)
disassociate_resource_share
Disassociates the specified principals or resources from the specified resource share.
Type annotations and code completion for boto3.client("ram").disassociate_resource_share
method.
boto3 documentation
def disassociate_resource_share(
self,
*,
resourceShareArn: str,
resourceArns: Sequence[str] = ...,
principals: Sequence[str] = ...,
clientToken: str = ...,
) -> DisassociateResourceShareResponseTypeDef: # (1)
...
kwargs: DisassociateResourceShareRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
}
parent.disassociate_resource_share(**kwargs)
disassociate_resource_share_permission
Disassociates an RAM permission from a resource share.
Type annotations and code completion for boto3.client("ram").disassociate_resource_share_permission
method.
boto3 documentation
def disassociate_resource_share_permission(
self,
*,
resourceShareArn: str,
permissionArn: str,
clientToken: str = ...,
) -> DisassociateResourceSharePermissionResponseTypeDef: # (1)
...
kwargs: DisassociateResourceSharePermissionRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
"permissionArn": ...,
}
parent.disassociate_resource_share_permission(**kwargs)
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
def enable_sharing_with_aws_organization(
self,
) -> EnableSharingWithAwsOrganizationResponseTypeDef: # (1)
...
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
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 boto3.client("ram").get_permission
method.
boto3 documentation
def get_permission(
self,
*,
permissionArn: str,
permissionVersion: int = ...,
) -> GetPermissionResponseTypeDef: # (1)
...
kwargs: GetPermissionRequestRequestTypeDef = { # (1)
"permissionArn": ...,
}
parent.get_permission(**kwargs)
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.
boto3 documentation
def get_resource_policies(
self,
*,
resourceArns: Sequence[str],
principal: str = ...,
nextToken: str = ...,
maxResults: int = ...,
) -> GetResourcePoliciesResponseTypeDef: # (1)
...
kwargs: GetResourcePoliciesRequestRequestTypeDef = { # (1)
"resourceArns": ...,
}
parent.get_resource_policies(**kwargs)
get_resource_share_associations
Retrieves the resource and principal associations for resource shares that you own.
Type annotations and code completion for boto3.client("ram").get_resource_share_associations
method.
boto3 documentation
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)
...
- See ResourceShareAssociationTypeType
- See ResourceShareAssociationStatusType
- See GetResourceShareAssociationsResponseTypeDef
kwargs: GetResourceShareAssociationsRequestRequestTypeDef = { # (1)
"associationType": ...,
}
parent.get_resource_share_associations(**kwargs)
get_resource_share_invitations
Retrieves details about invitations that you have received for resource shares.
Type annotations and code completion for boto3.client("ram").get_resource_share_invitations
method.
boto3 documentation
def get_resource_share_invitations(
self,
*,
resourceShareInvitationArns: Sequence[str] = ...,
resourceShareArns: Sequence[str] = ...,
nextToken: str = ...,
maxResults: int = ...,
) -> GetResourceShareInvitationsResponseTypeDef: # (1)
...
kwargs: GetResourceShareInvitationsRequestRequestTypeDef = { # (1)
"resourceShareInvitationArns": ...,
}
parent.get_resource_share_invitations(**kwargs)
get_resource_shares
Retrieves details about the resource shares that you own or that are shared with you.
Type annotations and code completion for boto3.client("ram").get_resource_shares
method.
boto3 documentation
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)
...
- See ResourceOwnerType
- See ResourceShareStatusType
- See TagFilterTypeDef
- See GetResourceSharesResponseTypeDef
kwargs: GetResourceSharesRequestRequestTypeDef = { # (1)
"resourceOwner": ...,
}
parent.get_resource_shares(**kwargs)
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 boto3.client("ram").list_pending_invitation_resources
method.
boto3 documentation
def list_pending_invitation_resources(
self,
*,
resourceShareInvitationArn: str,
nextToken: str = ...,
maxResults: int = ...,
resourceRegionScope: ResourceRegionScopeFilterType = ..., # (1)
) -> ListPendingInvitationResourcesResponseTypeDef: # (2)
...
kwargs: ListPendingInvitationResourcesRequestRequestTypeDef = { # (1)
"resourceShareInvitationArn": ...,
}
parent.list_pending_invitation_resources(**kwargs)
list_permission_versions
Lists the available versions of the specified RAM permission.
Type annotations and code completion for boto3.client("ram").list_permission_versions
method.
boto3 documentation
def list_permission_versions(
self,
*,
permissionArn: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListPermissionVersionsResponseTypeDef: # (1)
...
kwargs: ListPermissionVersionsRequestRequestTypeDef = { # (1)
"permissionArn": ...,
}
parent.list_permission_versions(**kwargs)
list_permissions
Retrieves a list of available RAM permissions that you can use for the supported resource types.
Type annotations and code completion for boto3.client("ram").list_permissions
method.
boto3 documentation
def list_permissions(
self,
*,
resourceType: str = ...,
nextToken: str = ...,
maxResults: int = ...,
) -> ListPermissionsResponseTypeDef: # (1)
...
kwargs: ListPermissionsRequestRequestTypeDef = { # (1)
"resourceType": ...,
}
parent.list_permissions(**kwargs)
list_principals
Lists the principals that you are sharing resources with or that are sharing resources with you.
Type annotations and code completion for boto3.client("ram").list_principals
method.
boto3 documentation
def list_principals(
self,
*,
resourceOwner: ResourceOwnerType, # (1)
resourceArn: str = ...,
principals: Sequence[str] = ...,
resourceType: str = ...,
resourceShareArns: Sequence[str] = ...,
nextToken: str = ...,
maxResults: int = ...,
) -> ListPrincipalsResponseTypeDef: # (2)
...
kwargs: ListPrincipalsRequestRequestTypeDef = { # (1)
"resourceOwner": ...,
}
parent.list_principals(**kwargs)
list_resource_share_permissions
Lists the RAM permissions that are associated with a resource share.
Type annotations and code completion for boto3.client("ram").list_resource_share_permissions
method.
boto3 documentation
def list_resource_share_permissions(
self,
*,
resourceShareArn: str,
nextToken: str = ...,
maxResults: int = ...,
) -> ListResourceSharePermissionsResponseTypeDef: # (1)
...
kwargs: ListResourceSharePermissionsRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
}
parent.list_resource_share_permissions(**kwargs)
list_resource_types
Lists the resource types that can be shared by RAM.
Type annotations and code completion for boto3.client("ram").list_resource_types
method.
boto3 documentation
def list_resource_types(
self,
*,
nextToken: str = ...,
maxResults: int = ...,
resourceRegionScope: ResourceRegionScopeFilterType = ..., # (1)
) -> ListResourceTypesResponseTypeDef: # (2)
...
kwargs: ListResourceTypesRequestRequestTypeDef = { # (1)
"nextToken": ...,
}
parent.list_resource_types(**kwargs)
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 boto3.client("ram").list_resources
method.
boto3 documentation
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)
...
kwargs: ListResourcesRequestRequestTypeDef = { # (1)
"resourceOwner": ...,
}
parent.list_resources(**kwargs)
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 boto3.client("ram").promote_resource_share_created_from_policy
method.
boto3 documentation
def promote_resource_share_created_from_policy(
self,
*,
resourceShareArn: str,
) -> PromoteResourceShareCreatedFromPolicyResponseTypeDef: # (1)
...
kwargs: PromoteResourceShareCreatedFromPolicyRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
}
parent.promote_resource_share_created_from_policy(**kwargs)
reject_resource_share_invitation
Rejects an invitation to a resource share from another Amazon Web Services account.
Type annotations and code completion for boto3.client("ram").reject_resource_share_invitation
method.
boto3 documentation
def reject_resource_share_invitation(
self,
*,
resourceShareInvitationArn: str,
clientToken: str = ...,
) -> RejectResourceShareInvitationResponseTypeDef: # (1)
...
kwargs: RejectResourceShareInvitationRequestRequestTypeDef = { # (1)
"resourceShareInvitationArn": ...,
}
parent.reject_resource_share_invitation(**kwargs)
tag_resource
Adds the specified tag keys and values to the specified resource share.
Type annotations and code completion for boto3.client("ram").tag_resource
method.
boto3 documentation
def tag_resource(
self,
*,
resourceShareArn: str,
tags: Sequence[TagTypeDef], # (1)
) -> Dict[str, Any]:
...
- See TagTypeDef
kwargs: TagResourceRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
"tags": ...,
}
parent.tag_resource(**kwargs)
untag_resource
Removes the specified tag key and value pairs from the specified resource share.
Type annotations and code completion for boto3.client("ram").untag_resource
method.
boto3 documentation
def untag_resource(
self,
*,
resourceShareArn: str,
tagKeys: Sequence[str],
) -> Dict[str, Any]:
...
kwargs: UntagResourceRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
"tagKeys": ...,
}
parent.untag_resource(**kwargs)
update_resource_share
Modifies some of the properties of the specified resource share.
Type annotations and code completion for boto3.client("ram").update_resource_share
method.
boto3 documentation
def update_resource_share(
self,
*,
resourceShareArn: str,
name: str = ...,
allowExternalPrincipals: bool = ...,
clientToken: str = ...,
) -> UpdateResourceShareResponseTypeDef: # (1)
...
kwargs: UpdateResourceShareRequestRequestTypeDef = { # (1)
"resourceShareArn": ...,
}
parent.update_resource_share(**kwargs)
get_paginator
Type annotations and code completion for boto3.client("ram").get_paginator
method with overloads.
client.get_paginator("get_resource_policies")
-> GetResourcePoliciesPaginatorclient.get_paginator("get_resource_share_associations")
-> GetResourceShareAssociationsPaginatorclient.get_paginator("get_resource_share_invitations")
-> GetResourceShareInvitationsPaginatorclient.get_paginator("get_resource_shares")
-> GetResourceSharesPaginatorclient.get_paginator("list_principals")
-> ListPrincipalsPaginatorclient.get_paginator("list_resources")
-> ListResourcesPaginator