
com.amazonaws.services.ram.AWSRAM Maven / Gradle / Ivy
/*
* Copyright 2014-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.ram;
import javax.annotation.Generated;
import com.amazonaws.*;
import com.amazonaws.regions.*;
import com.amazonaws.services.ram.model.*;
/**
* Interface for accessing RAM.
*
* Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
* {@link com.amazonaws.services.ram.AbstractAWSRAM} instead.
*
*
*
* 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.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public interface AWSRAM {
/**
* The region metadata service name for computing region endpoints. You can use this value to retrieve metadata
* (such as supported regions) of the service.
*
* @see RegionUtils#getRegionsForService(String)
*/
String ENDPOINT_PREFIX = "ram";
/**
*
* Accepts an invitation to a resource share from another AWS account.
*
*
* @param acceptResourceShareInvitationRequest
* @return Result of the AcceptResourceShareInvitation operation returned by the service.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ResourceShareInvitationArnNotFoundException
* The Amazon Resource Name (ARN) for an invitation was not found.
* @throws ResourceShareInvitationAlreadyAcceptedException
* The invitation was already accepted.
* @throws ResourceShareInvitationAlreadyRejectedException
* The invitation was already rejected.
* @throws ResourceShareInvitationExpiredException
* The invitation is expired.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.AcceptResourceShareInvitation
* @see AWS API Documentation
*/
AcceptResourceShareInvitationResult acceptResourceShareInvitation(AcceptResourceShareInvitationRequest acceptResourceShareInvitationRequest);
/**
*
* Associates the specified resource share with the specified principals and resources.
*
*
* @param associateResourceShareRequest
* @return Result of the AssociateResourceShare operation returned by the service.
* @throws 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.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws InvalidStateTransitionException
* The requested state transition is not valid.
* @throws ResourceShareLimitExceededException
* The requested resource share exceeds the limit for your account.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidStateTransitionException
* The requested state transition is not valid.
* @throws InvalidClientTokenException
* A client token is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @throws UnknownResourceException
* A specified resource was not found.
* @sample AWSRAM.AssociateResourceShare
* @see AWS API
* Documentation
*/
AssociateResourceShareResult associateResourceShare(AssociateResourceShareRequest associateResourceShareRequest);
/**
*
* Creates a resource share.
*
*
* @param createResourceShareRequest
* @return Result of the CreateResourceShare operation returned by the service.
* @throws 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.
* @throws InvalidStateTransitionException
* The requested state transition is not valid.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidClientTokenException
* A client token is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ResourceShareLimitExceededException
* The requested resource share exceeds the limit for your account.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.CreateResourceShare
* @see AWS API
* Documentation
*/
CreateResourceShareResult createResourceShare(CreateResourceShareRequest createResourceShareRequest);
/**
*
* Deletes the specified resource share.
*
*
* @param deleteResourceShareRequest
* @return Result of the DeleteResourceShare operation returned by the service.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws 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.
* @throws InvalidStateTransitionException
* The requested state transition is not valid.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidClientTokenException
* A client token is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.DeleteResourceShare
* @see AWS API
* Documentation
*/
DeleteResourceShareResult deleteResourceShare(DeleteResourceShareRequest deleteResourceShareRequest);
/**
*
* Disassociates the specified principals or resources from the specified resource share.
*
*
* @param disassociateResourceShareRequest
* @return Result of the DisassociateResourceShare operation returned by the service.
* @throws 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.
* @throws ResourceShareLimitExceededException
* The requested resource share exceeds the limit for your account.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidStateTransitionException
* The requested state transition is not valid.
* @throws InvalidClientTokenException
* A client token is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @throws UnknownResourceException
* A specified resource was not found.
* @sample AWSRAM.DisassociateResourceShare
* @see AWS
* API Documentation
*/
DisassociateResourceShareResult disassociateResourceShare(DisassociateResourceShareRequest disassociateResourceShareRequest);
/**
*
* Enables resource sharing within your organization.
*
*
* @param enableSharingWithAwsOrganizationRequest
* @return Result of the EnableSharingWithAwsOrganization operation returned by the service.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.EnableSharingWithAwsOrganization
* @see AWS API Documentation
*/
EnableSharingWithAwsOrganizationResult enableSharingWithAwsOrganization(EnableSharingWithAwsOrganizationRequest enableSharingWithAwsOrganizationRequest);
/**
*
* Gets the policies for the specifies resources.
*
*
* @param getResourcePoliciesRequest
* @return Result of the GetResourcePolicies operation returned by the service.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidNextTokenException
* The specified value for NextToken is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.GetResourcePolicies
* @see AWS API
* Documentation
*/
GetResourcePoliciesResult getResourcePolicies(GetResourcePoliciesRequest getResourcePoliciesRequest);
/**
*
* Gets the associations for the specified resource share.
*
*
* @param getResourceShareAssociationsRequest
* @return Result of the GetResourceShareAssociations operation returned by the service.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidNextTokenException
* The specified value for NextToken is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.GetResourceShareAssociations
* @see AWS API Documentation
*/
GetResourceShareAssociationsResult getResourceShareAssociations(GetResourceShareAssociationsRequest getResourceShareAssociationsRequest);
/**
*
* Gets the specified invitations for resource sharing.
*
*
* @param getResourceShareInvitationsRequest
* @return Result of the GetResourceShareInvitations operation returned by the service.
* @throws ResourceShareInvitationArnNotFoundException
* The Amazon Resource Name (ARN) for an invitation was not found.
* @throws InvalidMaxResultsException
* The specified value for MaxResults is not valid.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidNextTokenException
* The specified value for NextToken is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.GetResourceShareInvitations
* @see AWS API Documentation
*/
GetResourceShareInvitationsResult getResourceShareInvitations(GetResourceShareInvitationsRequest getResourceShareInvitationsRequest);
/**
*
* Gets the specified resource shares or all of your resource shares.
*
*
* @param getResourceSharesRequest
* @return Result of the GetResourceShares operation returned by the service.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidNextTokenException
* The specified value for NextToken is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.GetResourceShares
* @see AWS API
* Documentation
*/
GetResourceSharesResult getResourceShares(GetResourceSharesRequest getResourceSharesRequest);
/**
*
* Lists the principals with access to the specified resource.
*
*
* @param listPrincipalsRequest
* @return Result of the ListPrincipals operation returned by the service.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws InvalidNextTokenException
* The specified value for NextToken is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.ListPrincipals
* @see AWS API
* Documentation
*/
ListPrincipalsResult listPrincipals(ListPrincipalsRequest listPrincipalsRequest);
/**
*
* Lists the resources that the specified principal can access.
*
*
* @param listResourcesRequest
* @return Result of the ListResources operation returned by the service.
* @throws InvalidResourceTypeException
* The specified resource type is not valid.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidNextTokenException
* The specified value for NextToken is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.ListResources
* @see AWS API
* Documentation
*/
ListResourcesResult listResources(ListResourcesRequest listResourcesRequest);
/**
*
* Rejects an invitation to a resource share from another AWS account.
*
*
* @param rejectResourceShareInvitationRequest
* @return Result of the RejectResourceShareInvitation operation returned by the service.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ResourceShareInvitationArnNotFoundException
* The Amazon Resource Name (ARN) for an invitation was not found.
* @throws ResourceShareInvitationAlreadyAcceptedException
* The invitation was already accepted.
* @throws ResourceShareInvitationAlreadyRejectedException
* The invitation was already rejected.
* @throws ResourceShareInvitationExpiredException
* The invitation is expired.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.RejectResourceShareInvitation
* @see AWS API Documentation
*/
RejectResourceShareInvitationResult rejectResourceShareInvitation(RejectResourceShareInvitationRequest rejectResourceShareInvitationRequest);
/**
*
* Adds the specified tags to the specified resource share.
*
*
* @param tagResourceRequest
* @return Result of the TagResource operation returned by the service.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws TagLimitExceededException
* The requested tags exceed the limit for your account.
* @throws ResourceArnNotFoundException
* An Amazon Resource Name (ARN) was not found.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.TagResource
* @see AWS API
* Documentation
*/
TagResourceResult tagResource(TagResourceRequest tagResourceRequest);
/**
*
* Removes the specified tags from the specified resource share.
*
*
* @param untagResourceRequest
* @return Result of the UntagResource operation returned by the service.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.UntagResource
* @see AWS API
* Documentation
*/
UntagResourceResult untagResource(UntagResourceRequest untagResourceRequest);
/**
*
* Updates the specified resource share.
*
*
* @param updateResourceShareRequest
* @return Result of the UpdateResourceShare operation returned by the service.
* @throws 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.
* @throws MissingRequiredParameterException
* A required input parameter is missing.
* @throws UnknownResourceException
* A specified resource was not found.
* @throws MalformedArnException
* The format of an Amazon Resource Name (ARN) is not valid.
* @throws InvalidClientTokenException
* A client token is not valid.
* @throws InvalidParameterException
* A parameter is not valid.
* @throws OperationNotPermittedException
* The requested operation is not permitted.
* @throws ServerInternalException
* The service could not respond to the request due to an internal problem.
* @throws ServiceUnavailableException
* The service is not available.
* @sample AWSRAM.UpdateResourceShare
* @see AWS API
* Documentation
*/
UpdateResourceShareResult updateResourceShare(UpdateResourceShareRequest updateResourceShareRequest);
/**
* Shuts down this client object, releasing any resources that might be held open. This is an optional method, and
* callers are not expected to call it, but can if they want to explicitly release any open resources. Once a client
* has been shutdown, it should not be used to make any more requests.
*/
void shutdown();
/**
* Returns additional metadata for a previously executed successful request, typically used for debugging issues
* where a service isn't acting as expected. This data isn't considered part of the result data returned by an
* operation, so it's available through this separate, diagnostic interface.
*
* 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 a request.
*
* @param request
* The originally executed request.
*
* @return The response metadata for the specified request, or null if none is available.
*/
ResponseMetadata getCachedResponseMetadata(AmazonWebServiceRequest request);
}