@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_METRIC
ENDPOINT_PREFIX
addRequestHandler, addRequestHandler, configureRegion, getClientConfiguration, getEndpointPrefix, getMonitoringListeners, getRequestMetricsCollector, getServiceName, getSignerByURI, getSignerOverride, getSignerRegionOverride, getTimeOffset, makeImmutable, removeRequestHandler, removeRequestHandler, setEndpoint, setEndpoint, setRegion, setServiceNameIntern, setSignerRegionOverride, setTimeOffset, shutdown, withEndpoint, withRegion, withRegion, withTimeOffset
public static AWSRAMClientBuilder builder()
public AcceptResourceShareInvitationResult acceptResourceShareInvitation(AcceptResourceShareInvitationRequest request)
Accepts an invitation to a resource share from another AWS account.
acceptResourceShareInvitation
in interface AWSRAM
acceptResourceShareInvitationRequest
- 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 AWSRAM
associateResourceShareRequest
- 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 AWSRAM
createResourceShareRequest
- 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 AWSRAM
deleteResourceShareRequest
- 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 AWSRAM
disassociateResourceShareRequest
- 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 AWSRAM
enableSharingWithAwsOrganizationRequest
- 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 AWSRAM
getResourcePoliciesRequest
- 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 AWSRAM
getResourceShareAssociationsRequest
- 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 AWSRAM
getResourceShareInvitationsRequest
- 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 AWSRAM
getResourceSharesRequest
- 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 AWSRAM
listPrincipalsRequest
- 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 AWSRAM
listResourcesRequest
- 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 AWSRAM
rejectResourceShareInvitationRequest
- 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 AWSRAM
tagResourceRequest
- 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 AWSRAM
untagResourceRequest
- 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 AWSRAM
updateResourceShareRequest
- 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 AWSRAM
request
- The originally executed requestCopyright © 2013 Amazon Web Services, Inc. All Rights Reserved.