@ThreadSafe @Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class AWSRAMClient extends AmazonWebServiceClient implements AWSRAM
Use AWS Resource Access Manager to share AWS resources between AWS accounts. To share a resource, you create a resource share, associate the resource with the resource share, and specify the principals that can access the resource. The following principals are supported:
The ID of an AWS account
The Amazon Resource Name (ARN) of an OU from AWS Organizations
The Amazon Resource Name (ARN) of an organization from AWS Organizations
If you specify an AWS account that doesn't exist in the same organization as the account that owns the resource share, the owner of the specified account receives an invitation to accept the resource share. After the owner accepts the invitation, they can access the resources in the resource share. An administrator of the specified account can use IAM policies to restrict access resources in the resource share.
LOGGING_AWS_REQUEST_METRICENDPOINT_PREFIXaddRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffsetpublic static AWSRAMClientBuilder builder()
public AcceptResourceShareInvitationResult acceptResourceShareInvitation(AcceptResourceShareInvitationRequest request)
Accepts an invitation to a resource share from another AWS account.
acceptResourceShareInvitation in interface AWSRAMacceptResourceShareInvitationRequest - MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.OperationNotPermittedException - The requested operation is not permitted.ResourceShareInvitationArnNotFoundException - The Amazon Resource Name (ARN) for an invitation was not found.ResourceShareInvitationAlreadyAcceptedException - The invitation was already accepted.ResourceShareInvitationAlreadyRejectedException - The invitation was already rejected.ResourceShareInvitationExpiredException - The invitation is expired.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public AssociateResourceShareResult associateResourceShare(AssociateResourceShareRequest request)
Associates the specified resource share with the specified principals and resources.
associateResourceShare in interface AWSRAMassociateResourceShareRequest - IdempotentParameterMismatchException - A client token input parameter was reused with an operation, but at least one of the other input
parameters is different from the previous call to the operation.UnknownResourceException - A specified resource was not found.InvalidStateTransitionException - The requested state transition is not valid.ResourceShareLimitExceededException - The requested resource share exceeds the limit for your account.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidStateTransitionException - The requested state transition is not valid.InvalidClientTokenException - A client token is not valid.InvalidParameterException - A parameter is not valid.OperationNotPermittedException - The requested operation is not permitted.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.UnknownResourceException - A specified resource was not found.public CreateResourceShareResult createResourceShare(CreateResourceShareRequest request)
Creates a resource share.
createResourceShare in interface AWSRAMcreateResourceShareRequest - IdempotentParameterMismatchException - A client token input parameter was reused with an operation, but at least one of the other input
parameters is different from the previous call to the operation.InvalidStateTransitionException - The requested state transition is not valid.UnknownResourceException - A specified resource was not found.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidClientTokenException - A client token is not valid.InvalidParameterException - A parameter is not valid.OperationNotPermittedException - The requested operation is not permitted.ResourceShareLimitExceededException - The requested resource share exceeds the limit for your account.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public DeleteResourceShareResult deleteResourceShare(DeleteResourceShareRequest request)
Deletes the specified resource share.
deleteResourceShare in interface AWSRAMdeleteResourceShareRequest - OperationNotPermittedException - The requested operation is not permitted.IdempotentParameterMismatchException - A client token input parameter was reused with an operation, but at least one of the other input
parameters is different from the previous call to the operation.InvalidStateTransitionException - The requested state transition is not valid.UnknownResourceException - A specified resource was not found.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidClientTokenException - A client token is not valid.InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public DisassociateResourceShareResult disassociateResourceShare(DisassociateResourceShareRequest request)
Disassociates the specified principals or resources from the specified resource share.
disassociateResourceShare in interface AWSRAMdisassociateResourceShareRequest - IdempotentParameterMismatchException - A client token input parameter was reused with an operation, but at least one of the other input
parameters is different from the previous call to the operation.ResourceShareLimitExceededException - The requested resource share exceeds the limit for your account.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidStateTransitionException - The requested state transition is not valid.InvalidClientTokenException - A client token is not valid.InvalidParameterException - A parameter is not valid.OperationNotPermittedException - The requested operation is not permitted.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.UnknownResourceException - A specified resource was not found.public EnableSharingWithAwsOrganizationResult enableSharingWithAwsOrganization(EnableSharingWithAwsOrganizationRequest request)
Enables resource sharing within your organization.
enableSharingWithAwsOrganization in interface AWSRAMenableSharingWithAwsOrganizationRequest - OperationNotPermittedException - The requested operation is not permitted.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public GetResourcePoliciesResult getResourcePolicies(GetResourcePoliciesRequest request)
Gets the policies for the specifies resources.
getResourcePolicies in interface AWSRAMgetResourcePoliciesRequest - MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidNextTokenException - The specified value for NextToken is not valid.InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public GetResourceShareAssociationsResult getResourceShareAssociations(GetResourceShareAssociationsRequest request)
Gets the associations for the specified resource share.
getResourceShareAssociations in interface AWSRAMgetResourceShareAssociationsRequest - UnknownResourceException - A specified resource was not found.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidNextTokenException - The specified value for NextToken is not valid.InvalidParameterException - A parameter is not valid.OperationNotPermittedException - The requested operation is not permitted.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public GetResourceShareInvitationsResult getResourceShareInvitations(GetResourceShareInvitationsRequest request)
Gets the specified invitations for resource sharing.
getResourceShareInvitations in interface AWSRAMgetResourceShareInvitationsRequest - ResourceShareInvitationArnNotFoundException - The Amazon Resource Name (ARN) for an invitation was not found.InvalidMaxResultsException - The specified value for MaxResults is not valid.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidNextTokenException - The specified value for NextToken is not valid.InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public GetResourceSharesResult getResourceShares(GetResourceSharesRequest request)
Gets the specified resource shares or all of your resource shares.
getResourceShares in interface AWSRAMgetResourceSharesRequest - UnknownResourceException - A specified resource was not found.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidNextTokenException - The specified value for NextToken is not valid.InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public ListPrincipalsResult listPrincipals(ListPrincipalsRequest request)
Lists the principals with access to the specified resource.
listPrincipals in interface AWSRAMlistPrincipalsRequest - MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.UnknownResourceException - A specified resource was not found.InvalidNextTokenException - The specified value for NextToken is not valid.InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public ListResourcesResult listResources(ListResourcesRequest request)
Lists the resources that the specified principal can access.
listResources in interface AWSRAMlistResourcesRequest - InvalidResourceTypeException - The specified resource type is not valid.UnknownResourceException - A specified resource was not found.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidNextTokenException - The specified value for NextToken is not valid.InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public RejectResourceShareInvitationResult rejectResourceShareInvitation(RejectResourceShareInvitationRequest request)
Rejects an invitation to a resource share from another AWS account.
rejectResourceShareInvitation in interface AWSRAMrejectResourceShareInvitationRequest - MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.OperationNotPermittedException - The requested operation is not permitted.ResourceShareInvitationArnNotFoundException - The Amazon Resource Name (ARN) for an invitation was not found.ResourceShareInvitationAlreadyAcceptedException - The invitation was already accepted.ResourceShareInvitationAlreadyRejectedException - The invitation was already rejected.ResourceShareInvitationExpiredException - The invitation is expired.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public TagResourceResult tagResource(TagResourceRequest request)
Adds the specified tags to the specified resource share.
tagResource in interface AWSRAMtagResourceRequest - InvalidParameterException - A parameter is not valid.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.TagLimitExceededException - The requested tags exceed the limit for your account.ResourceArnNotFoundException - An Amazon Resource Name (ARN) was not found.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public UntagResourceResult untagResource(UntagResourceRequest request)
Removes the specified tags from the specified resource share.
untagResource in interface AWSRAMuntagResourceRequest - InvalidParameterException - A parameter is not valid.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public UpdateResourceShareResult updateResourceShare(UpdateResourceShareRequest request)
Updates the specified resource share.
updateResourceShare in interface AWSRAMupdateResourceShareRequest - IdempotentParameterMismatchException - A client token input parameter was reused with an operation, but at least one of the other input
parameters is different from the previous call to the operation.MissingRequiredParameterException - A required input parameter is missing.UnknownResourceException - A specified resource was not found.MalformedArnException - The format of an Amazon Resource Name (ARN) is not valid.InvalidClientTokenException - A client token is not valid.InvalidParameterException - A parameter is not valid.OperationNotPermittedException - The requested operation is not permitted.ServerInternalException - The service could not respond to the request due to an internal problem.ServiceUnavailableException - The service is not available.public ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request)
Response metadata is only cached for a limited period of time, so if you need to access this extra diagnostic information for an executed request, you should use this method to retrieve it as soon as possible after executing the request.
getCachedResponseMetadata in interface AWSRAMrequest - The originally executed requestCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.