

# Actions
<a name="API_Operations"></a>

The following actions are supported:
+  [AcceptResourceShareInvitation](API_AcceptResourceShareInvitation.md) 
+  [AssociateResourceShare](API_AssociateResourceShare.md) 
+  [AssociateResourceSharePermission](API_AssociateResourceSharePermission.md) 
+  [CreatePermission](API_CreatePermission.md) 
+  [CreatePermissionVersion](API_CreatePermissionVersion.md) 
+  [CreateResourceShare](API_CreateResourceShare.md) 
+  [DeletePermission](API_DeletePermission.md) 
+  [DeletePermissionVersion](API_DeletePermissionVersion.md) 
+  [DeleteResourceShare](API_DeleteResourceShare.md) 
+  [DisassociateResourceShare](API_DisassociateResourceShare.md) 
+  [DisassociateResourceSharePermission](API_DisassociateResourceSharePermission.md) 
+  [EnableSharingWithAwsOrganization](API_EnableSharingWithAwsOrganization.md) 
+  [GetPermission](API_GetPermission.md) 
+  [GetResourcePolicies](API_GetResourcePolicies.md) 
+  [GetResourceShareAssociations](API_GetResourceShareAssociations.md) 
+  [GetResourceShareInvitations](API_GetResourceShareInvitations.md) 
+  [GetResourceShares](API_GetResourceShares.md) 
+  [ListPendingInvitationResources](API_ListPendingInvitationResources.md) 
+  [ListPermissionAssociations](API_ListPermissionAssociations.md) 
+  [ListPermissions](API_ListPermissions.md) 
+  [ListPermissionVersions](API_ListPermissionVersions.md) 
+  [ListPrincipals](API_ListPrincipals.md) 
+  [ListReplacePermissionAssociationsWork](API_ListReplacePermissionAssociationsWork.md) 
+  [ListResources](API_ListResources.md) 
+  [ListResourceSharePermissions](API_ListResourceSharePermissions.md) 
+  [ListResourceTypes](API_ListResourceTypes.md) 
+  [ListSourceAssociations](API_ListSourceAssociations.md) 
+  [PromotePermissionCreatedFromPolicy](API_PromotePermissionCreatedFromPolicy.md) 
+  [PromoteResourceShareCreatedFromPolicy](API_PromoteResourceShareCreatedFromPolicy.md) 
+  [RejectResourceShareInvitation](API_RejectResourceShareInvitation.md) 
+  [ReplacePermissionAssociations](API_ReplacePermissionAssociations.md) 
+  [SetDefaultPermissionVersion](API_SetDefaultPermissionVersion.md) 
+  [TagResource](API_TagResource.md) 
+  [UntagResource](API_UntagResource.md) 
+  [UpdateResourceShare](API_UpdateResourceShare.md) 

# AcceptResourceShareInvitation
<a name="API_AcceptResourceShareInvitation"></a>

Accepts an invitation to a resource share from another AWS account. After you accept the invitation, the resources included in the resource share are available to interact with in the relevant AWS Management Consoles and tools.

## Request Syntax
<a name="API_AcceptResourceShareInvitation_RequestSyntax"></a>

```
POST /acceptresourceshareinvitation HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "resourceShareInvitationArn": "string"
}
```

## URI Request Parameters
<a name="API_AcceptResourceShareInvitation_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_AcceptResourceShareInvitation_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareInvitationArn](#API_AcceptResourceShareInvitation_RequestSyntax) **   <a name="ram-AcceptResourceShareInvitation-request-resourceShareInvitationArn"></a>
The [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the invitation that you want to accept.  
Type: String  
Required: Yes

 ** [clientToken](#API_AcceptResourceShareInvitation_RequestSyntax) **   <a name="ram-AcceptResourceShareInvitation-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

## Response Syntax
<a name="API_AcceptResourceShareInvitation_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "resourceShareInvitation": { 
      "invitationTimestamp": number,
      "receiverAccountId": "string",
      "receiverArn": "string",
      "resourceShareArn": "string",
      "resourceShareAssociations": [ 
         { 
            "associatedEntity": "string",
            "associationType": "string",
            "creationTime": number,
            "external": boolean,
            "lastUpdatedTime": number,
            "resourceShareArn": "string",
            "resourceShareName": "string",
            "status": "string",
            "statusMessage": "string"
         }
      ],
      "resourceShareInvitationArn": "string",
      "resourceShareName": "string",
      "senderAccountId": "string",
      "status": "string"
   }
}
```

## Response Elements
<a name="API_AcceptResourceShareInvitation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_AcceptResourceShareInvitation_ResponseSyntax) **   <a name="ram-AcceptResourceShareInvitation-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [resourceShareInvitation](#API_AcceptResourceShareInvitation_ResponseSyntax) **   <a name="ram-AcceptResourceShareInvitation-response-resourceShareInvitation"></a>
An object that contains information about the specified invitation.  
Type: [ResourceShareInvitation](API_ResourceShareInvitation.md) object

## Errors
<a name="API_AcceptResourceShareInvitation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ResourceShareInvitationAlreadyAcceptedException **   
The operation failed because the specified invitation was already accepted.  
HTTP Status Code: 400

 ** ResourceShareInvitationAlreadyRejectedException **   
The operation failed because the specified invitation was already rejected.  
HTTP Status Code: 400

 ** ResourceShareInvitationArnNotFoundException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for an invitation was not found.  
HTTP Status Code: 400

 ** ResourceShareInvitationExpiredException **   
The operation failed because the specified invitation is past its expiration date and time.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## Examples
<a name="API_AcceptResourceShareInvitation_Examples"></a>

**Note**  
The examples show the JSON payloads of the request and response pretty printed with white spaces and line breaks for ease for ease of reading.

### 
<a name="API_AcceptResourceShareInvitation_Example_1"></a>

The following example shows the AWS account 111111111111 accepting a resource share invitation for a resource share that is in the AWS Region `us-east-1` and was from 999999999999.

#### Sample Request
<a name="API_AcceptResourceShareInvitation_Example_1_Request"></a>

```
POST /acceptresourceshareinvitation HTTP/1.1
Host: ram.us-east-1.amazonaws.com (http://ram.us-east-1.amazonaws.com/)
X-Amz-Date: 20210922T220735Z
Accept-Encoding: identity
User-Agent: <UserAgentString>
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>>

{"resourceShareInvitationArn": "arn:aws:ram:us-east-1:999999999999:resource-share-invitation/1e3477be-4a95-46b4-bbe0-c400156cd8e6"}
```

#### Sample Response
<a name="API_AcceptResourceShareInvitation_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Date: Wed, 22 Sep 2021 22:07:35 GMT
Content-Type: application/json
Content-Length: <PayloadSizeBytes>

{
    "resourceShareInvitation": {
        "invitationTimestamp": 1632348455.62,
        "receiverAccountId": "111111111111",
        "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2",
        "resourceShareInvitationArn": "arn:aws:ram:us-east-1:999999999999:resource-share-invitation/1e3477be-4a95-46b4-bbe0-c400156cd8e6",
        "resourceShareName": "MyLicenseShare",
        "senderAccountId": "999999999999",
        "status": "ACCEPTED"
    }
}
```

## See Also
<a name="API_AcceptResourceShareInvitation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/AcceptResourceShareInvitation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/AcceptResourceShareInvitation) 

# AssociateResourceShare
<a name="API_AssociateResourceShare"></a>

Adds the specified list of principals, resources, and source constraints to a resource share. Principals that already have access to this resource share immediately receive access to the added resources. Newly added principals immediately receive access to the resources shared in this resource share. 

## Request Syntax
<a name="API_AssociateResourceShare_RequestSyntax"></a>

```
POST /associateresourceshare HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "principals": [ "string" ],
   "resourceArns": [ "string" ],
   "resourceShareArn": "string",
   "sources": [ "string" ]
}
```

## URI Request Parameters
<a name="API_AssociateResourceShare_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_AssociateResourceShare_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareArn](#API_AssociateResourceShare_RequestSyntax) **   <a name="ram-AssociateResourceShare-request-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share that you want to add principals or resources to.  
Type: String  
Required: Yes

 ** [clientToken](#API_AssociateResourceShare_RequestSyntax) **   <a name="ram-AssociateResourceShare-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [principals](#API_AssociateResourceShare_RequestSyntax) **   <a name="ram-AssociateResourceShare-request-principals"></a>
Specifies a list of principals to whom you want to the resource share. This can be `null` if you want to add only resources.  
What the principals can do with the resources in the share is determined by the AWS RAM permissions that you associate with the resource share. See [AssociateResourceSharePermission](API_AssociateResourceSharePermission.md).  
You can include the following values:  
+ An AWS account ID, for example: `123456789012` 
+ An [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of an organization in AWS Organizations, for example: `arn:aws:organizations::123456789012:organization/o-exampleorgid` 
+ An ARN of an organizational unit (OU) in AWS Organizations, for example: `arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123` 
+ An ARN of an IAM role, for example: `arn:aws:iam::123456789012:role/rolename` 
+ An ARN of an IAM user, for example: `arn:aws:iam::123456789012user/username` 
+ A service principal name, for example: `service-id.amazonaws.com` 
Not all resource types can be shared with IAM roles and users. For more information, see [Sharing with IAM roles and users](https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) in the * AWS Resource Access Manager User Guide*.
Type: Array of strings  
Required: No

 ** [resourceArns](#API_AssociateResourceShare_RequestSyntax) **   <a name="ram-AssociateResourceShare-request-resourceArns"></a>
Specifies a list of [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resources that you want to share. This can be `null` if you want to add only principals.  
Type: Array of strings  
Required: No

 ** [sources](#API_AssociateResourceShare_RequestSyntax) **   <a name="ram-AssociateResourceShare-request-sources"></a>
Specifies source constraints (accounts, ARNs, organization IDs, or organization paths) that limit when service principals can access resources in this resource share. When a service principal attempts to access a shared resource, validation is performed to ensure the request originates from one of the specified sources. This helps prevent confused deputy attacks by applying constraints on where service principals can access resources from.  
Type: Array of strings  
Required: No

## Response Syntax
<a name="API_AssociateResourceShare_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "resourceShareAssociations": [ 
      { 
         "associatedEntity": "string",
         "associationType": "string",
         "creationTime": number,
         "external": boolean,
         "lastUpdatedTime": number,
         "resourceShareArn": "string",
         "resourceShareName": "string",
         "status": "string",
         "statusMessage": "string"
      }
   ]
}
```

## Response Elements
<a name="API_AssociateResourceShare_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_AssociateResourceShare_ResponseSyntax) **   <a name="ram-AssociateResourceShare-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [resourceShareAssociations](#API_AssociateResourceShare_ResponseSyntax) **   <a name="ram-AssociateResourceShare-response-resourceShareAssociations"></a>
An array of objects that contain information about the associations.  
Type: Array of [ResourceShareAssociation](API_ResourceShareAssociation.md) objects

## Errors
<a name="API_AssociateResourceShare_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ResourceShareLimitExceededException **   
The operation failed because it would exceed the limit for resource shares for your account. You can associate up to 100 resources per call. To view the limits for your AWS account, see the [AWS RAM page in the Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** ThrottlingException **   
The operation failed because it exceeded the rate at which you are allowed to perform this operation. Please try again later.  
HTTP Status Code: 429

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## Examples
<a name="API_AssociateResourceShare_Examples"></a>

**Note**  
The examples show the JSON payloads of the request and response pretty printed with white spaces and line breaks for ease for ease of reading.

### Example 1: add a principal to a resource share
<a name="API_AssociateResourceShare_Example_1"></a>

The following example illustrates adding an organizational unit (OU) as a principal to a resource share that exists in the AWS Region `us-east-1`. After running this command, all AWS accounts in the specified OU can access the resources in the resource share.

#### Sample Request
<a name="API_AssociateResourceShare_Example_1_Request"></a>

```
POST /associateresourceshare HTTP/1.1
Accept-Encoding: identity
User-Agent: <UserAgentString>
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>>
X-Amz-Date: 20210923T200946Z

{
    "principals": [
        "arn:aws:organizations::999999999999:ou/o-12345abcde/ou-12ab-1234abcd"
    ],
    "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2"
}
```

#### Sample Response
<a name="API_AssociateResourceShare_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Date: Thu, 23 Sep 2021 20:09:46 GMT
Content-Type: application/json
Content-Length: <PayloadSizeBytes>


{
    "resourceShareAssociations": [
        {
            "associatedEntity": "arn:aws:organizations::999999999999:ou/o-12345abcde/ou-12ab-1234abcd",
            "associationType": "PRINCIPAL",
            "external": false,
            "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2",
            "status": "ASSOCIATING"
        }
    ]
}
```

### Example 2: Add a new resource to a resource share
<a name="API_AssociateResourceShare_Example_2"></a>

The following example illustrates adding an additional AWS License Manager configuration to a resource share. After running this command, all AWS accounts that can access the resource share can use the new resource.

#### Sample Request
<a name="API_AssociateResourceShare_Example_2_Request"></a>

```
POST /associateresourceshare HTTP/1.1
Accept-Encoding: identity
User-Agent: <UserAgentString>
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>>
X-Amz-Date: 20210924T190541Z
{
    "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2",
    "resourceArns": [
        "arn:aws:license-manager:us-east-1:999999999999:license-configuration:lic-36be0485f5ae379cc74cf8e9242ab143"
    ]
}
```

#### Sample Response
<a name="API_AssociateResourceShare_Example_2_Response"></a>

```
HTTP/1.1 200 OK
Date: Fri, 24 Sep 2021 19:05:42 GMT
Content-Type: application/json
Content-Length: <PayloadSizeBytes>


{
    "resourceShareAssociations": [
        {
            "associatedEntity": "arn:aws:license-manager:us-east-1:999999999999:license-configuration:lic-36be0485f5ae379cc74cf8e9242ab143",
            "associationType": "RESOURCE",
            "external": false,
            "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2",
            "status": "ASSOCIATING"
        }
    ]
}
```

## See Also
<a name="API_AssociateResourceShare_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/AssociateResourceShare) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/AssociateResourceShare) 

# AssociateResourceSharePermission
<a name="API_AssociateResourceSharePermission"></a>

Adds or replaces the AWS RAM permission for a resource type included in a resource share. You can have exactly one permission associated with each resource type in the resource share. You can add a new AWS RAM permission only if there are currently no resources of that resource type currently in the resource share.

## Request Syntax
<a name="API_AssociateResourceSharePermission_RequestSyntax"></a>

```
POST /associateresourcesharepermission HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "permissionArn": "string",
   "permissionVersion": number,
   "replace": boolean,
   "resourceShareArn": "string"
}
```

## URI Request Parameters
<a name="API_AssociateResourceSharePermission_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_AssociateResourceSharePermission_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [permissionArn](#API_AssociateResourceSharePermission_RequestSyntax) **   <a name="ram-AssociateResourceSharePermission-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the AWS RAM permission to associate with the resource share. To find the ARN for a permission, use either the [ListPermissions](API_ListPermissions.md) operation or go to the [Permissions library](https://console.aws.amazon.com/ram/home#Permissions:) page in the AWS RAM console and then choose the name of the permission. The ARN is displayed on the detail page.  
Type: String  
Required: Yes

 ** [resourceShareArn](#API_AssociateResourceSharePermission_RequestSyntax) **   <a name="ram-AssociateResourceSharePermission-request-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share to which you want to add or replace permissions.  
Type: String  
Required: Yes

 ** [clientToken](#API_AssociateResourceSharePermission_RequestSyntax) **   <a name="ram-AssociateResourceSharePermission-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [permissionVersion](#API_AssociateResourceSharePermission_RequestSyntax) **   <a name="ram-AssociateResourceSharePermission-request-permissionVersion"></a>
Specifies the version of the AWS RAM permission to associate with the resource share. You can specify *only* the version that is currently set as the default version for the permission. If you also set the `replace` pararameter to `true`, then this operation updates an outdated version of the permission to the current default version.  
You don't need to specify this parameter because the default behavior is to use the version that is currently set as the default version for the permission. This parameter is supported for backwards compatibility.
Type: Integer  
Required: No

 ** [replace](#API_AssociateResourceSharePermission_RequestSyntax) **   <a name="ram-AssociateResourceSharePermission-request-replace"></a>
Specifies whether the specified permission should replace the existing permission associated with the resource share. Use `true` to replace the current permissions. Use `false` to add the permission to a resource share that currently doesn't have a permission. The default value is `false`.  
A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set `replace` to `true` then the operation returns an error. This helps prevent accidental overwriting of a permission.
Type: Boolean  
Required: No

## Response Syntax
<a name="API_AssociateResourceSharePermission_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "returnValue": boolean
}
```

## Response Elements
<a name="API_AssociateResourceSharePermission_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_AssociateResourceSharePermission_ResponseSyntax) **   <a name="ram-AssociateResourceSharePermission-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [returnValue](#API_AssociateResourceSharePermission_ResponseSyntax) **   <a name="ram-AssociateResourceSharePermission-response-returnValue"></a>
A return value of `true` indicates that the request succeeded. A value of `false` indicates that the request failed.  
Type: Boolean

## Errors
<a name="API_AssociateResourceSharePermission_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## Examples
<a name="API_AssociateResourceSharePermission_Examples"></a>

**Note**  
The examples show the JSON payloads of the request and response pretty printed with white spaces and line breaks for ease for ease of reading.

### Example
<a name="API_AssociateResourceSharePermission_Example_1"></a>

The following example command replaces the permission for the relevant resource type in the specified resource share. You don't need to specify the resource type, it is automatically inferred from the specified permission.

#### Sample Request
<a name="API_AssociateResourceSharePermission_Example_1_Request"></a>

```
            POST /associateresourcesharepermission HTTP/1.1
X-Amz-Date: 20210924T194101Z
Accept-Encoding: identity
User-Agent: <UserAgentString>
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>>

{
    "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19dedEXAMPLE",
    "permissionArn": "arn:aws:ram::aws:permission/AWSRAMPermissionGlueDatabaseReadWrite",
    "replace": true
}
```

#### Sample Response
<a name="API_AssociateResourceSharePermission_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Date: Fri, 24 Sep 2021 19:41:02 GMT
Content-Type: application/json
Content-Length: <PayloadSizeBytes>


{
    "returnValue":true
}
```

## See Also
<a name="API_AssociateResourceSharePermission_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/AssociateResourceSharePermission) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/AssociateResourceSharePermission) 

# CreatePermission
<a name="API_CreatePermission"></a>

Creates a customer managed permission for a specified resource type that you can attach to resource shares. It is created in the AWS Region in which you call the operation.

## Request Syntax
<a name="API_CreatePermission_RequestSyntax"></a>

```
POST /createpermission HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "name": "string",
   "policyTemplate": "string",
   "resourceType": "string",
   "tags": [ 
      { 
         "key": "string",
         "value": "string"
      }
   ]
}
```

## URI Request Parameters
<a name="API_CreatePermission_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_CreatePermission_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [name](#API_CreatePermission_RequestSyntax) **   <a name="ram-CreatePermission-request-name"></a>
Specifies the name of the customer managed permission. The name must be unique within the AWS Region.  
Type: String  
Length Constraints: Minimum length of 1. Maximum length of 36.  
Pattern: `[\w.-]*`   
Required: Yes

 ** [policyTemplate](#API_CreatePermission_RequestSyntax) **   <a name="ram-CreatePermission-request-policyTemplate"></a>
A string in JSON format string that contains the following elements of a resource-based policy:  
+  **Effect**: must be set to `ALLOW`.
+  **Action**: specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see [Actions, resources, and condition keys for AWS services](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) in the * AWS Identity and Access Management User Guide*.
+  **Condition**: (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see [IAM policies: Condition element](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the * AWS Identity and Access Management User Guide*.
This template can't include either the `Resource` or `Principal` elements. Those are both filled in by AWS RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The `Resource` comes from the ARN of the specific resource that you are sharing. The `Principal` comes from the list of identities added to the resource share.  
Type: String  
Required: Yes

 ** [resourceType](#API_CreatePermission_RequestSyntax) **   <a name="ram-CreatePermission-request-resourceType"></a>
Specifies the name of the resource type that this customer managed permission applies to.  
The format is ` <service-code>:<resource-type> ` and is case sensitive. For example, to specify an Amazon EC2 Subnet, you can use the string `ec2:Subnet`. To see the list of valid values for this parameter, query the [ListResourceTypes](API_ListResourceTypes.md) operation. This value must match the display name of the resource (available in `ListResourceTypes`).  
Type: String  
Required: Yes

 ** [clientToken](#API_CreatePermission_RequestSyntax) **   <a name="ram-CreatePermission-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [tags](#API_CreatePermission_RequestSyntax) **   <a name="ram-CreatePermission-request-tags"></a>
Specifies a list of one or more tag key and value pairs to attach to the permission.  
Type: Array of [Tag](API_Tag.md) objects  
Required: No

## Response Syntax
<a name="API_CreatePermission_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "permission": { 
      "arn": "string",
      "creationTime": number,
      "defaultVersion": boolean,
      "featureSet": "string",
      "isResourceTypeDefault": boolean,
      "lastUpdatedTime": number,
      "name": "string",
      "permissionType": "string",
      "resourceType": "string",
      "status": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ],
      "version": "string"
   }
}
```

## Response Elements
<a name="API_CreatePermission_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_CreatePermission_ResponseSyntax) **   <a name="ram-CreatePermission-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [permission](#API_CreatePermission_ResponseSyntax) **   <a name="ram-CreatePermission-response-permission"></a>
A structure with information about this customer managed permission.  
Type: [ResourceSharePermissionSummary](API_ResourceSharePermissionSummary.md) object

## Errors
<a name="API_CreatePermission_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidPolicyException **   
The operation failed because a policy you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedPolicyTemplateException **   
The operation failed because the policy template that you provided isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** PermissionAlreadyExistsException **   
The operation failed because a permission with the specified name already exists in the requested AWS Region. Choose a different name.  
HTTP Status Code: 409

 ** PermissionLimitExceededException **   
The operation failed because it would exceed the maximum number of permissions you can create in each AWS Region. To view the limits for your AWS account, see the [AWS RAM page in the Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_CreatePermission_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/CreatePermission) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/CreatePermission) 

# CreatePermissionVersion
<a name="API_CreatePermissionVersion"></a>

Creates a new version of the specified customer managed permission. The new version is automatically set as the default version of the customer managed permission. New resource shares automatically use the default permission. Existing resource shares continue to use their original permission versions, but you can use [ReplacePermissionAssociations](API_ReplacePermissionAssociations.md) to update them.

If the specified customer managed permission already has the maximum of 5 versions, then you must delete one of the existing versions before you can create a new one.

## Request Syntax
<a name="API_CreatePermissionVersion_RequestSyntax"></a>

```
POST /createpermissionversion HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "permissionArn": "string",
   "policyTemplate": "string"
}
```

## URI Request Parameters
<a name="API_CreatePermissionVersion_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_CreatePermissionVersion_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [permissionArn](#API_CreatePermissionVersion_RequestSyntax) **   <a name="ram-CreatePermissionVersion-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the customer managed permission you're creating a new version for.  
Type: String  
Required: Yes

 ** [policyTemplate](#API_CreatePermissionVersion_RequestSyntax) **   <a name="ram-CreatePermissionVersion-request-policyTemplate"></a>
A string in JSON format string that contains the following elements of a resource-based policy:  
+  **Effect**: must be set to `ALLOW`.
+  **Action**: specifies the actions that are allowed by this customer managed permission. The list must contain only actions that are supported by the specified resource type. For a list of all actions supported by each resource type, see [Actions, resources, and condition keys for AWS services](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html) in the * AWS Identity and Access Management User Guide*.
+  **Condition**: (optional) specifies conditional parameters that must evaluate to true when a user attempts an action for that action to be allowed. For more information about the Condition element, see [IAM policies: Condition element](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_condition.html) in the * AWS Identity and Access Management User Guide*.
This template can't include either the `Resource` or `Principal` elements. Those are both filled in by AWS RAM when it instantiates the resource-based policy on each resource shared using this managed permission. The `Resource` comes from the ARN of the specific resource that you are sharing. The `Principal` comes from the list of identities added to the resource share.  
Type: String  
Required: Yes

 ** [clientToken](#API_CreatePermissionVersion_RequestSyntax) **   <a name="ram-CreatePermissionVersion-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

## Response Syntax
<a name="API_CreatePermissionVersion_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "permission": { 
      "arn": "string",
      "creationTime": number,
      "defaultVersion": boolean,
      "featureSet": "string",
      "isResourceTypeDefault": boolean,
      "lastUpdatedTime": number,
      "name": "string",
      "permission": "string",
      "permissionType": "string",
      "resourceType": "string",
      "status": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ],
      "version": "string"
   }
}
```

## Response Elements
<a name="API_CreatePermissionVersion_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_CreatePermissionVersion_ResponseSyntax) **   <a name="ram-CreatePermissionVersion-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [permission](#API_CreatePermissionVersion_ResponseSyntax) **   <a name="ram-CreatePermissionVersion-response-permission"></a>
Information about a AWS RAM managed permission.  
Type: [ResourceSharePermissionDetail](API_ResourceSharePermissionDetail.md) object

## Errors
<a name="API_CreatePermissionVersion_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidPolicyException **   
The operation failed because a policy you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** MalformedPolicyTemplateException **   
The operation failed because the policy template that you provided isn't valid.  
HTTP Status Code: 400

 ** PermissionVersionsLimitExceededException **   
The operation failed because it would exceed the limit for the number of versions you can have for a permission. To view the limits for your AWS account, see the [AWS RAM page in the Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_CreatePermissionVersion_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/CreatePermissionVersion) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/CreatePermissionVersion) 

# CreateResourceShare
<a name="API_CreateResourceShare"></a>

Creates a resource share. You can provide a list of the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for the resources that you want to share, a list of principals you want to share the resources with, the permissions to grant those principals, and optionally source constraints to enhance security for service principal sharing.

**Note**  
Sharing a resource makes it available for use by principals outside of the AWS account that created the resource. Sharing doesn't change any permissions or quotas that apply to the resource in the account that created it.

## Request Syntax
<a name="API_CreateResourceShare_RequestSyntax"></a>

```
POST /createresourceshare HTTP/1.1
Content-type: application/json

{
   "allowExternalPrincipals": boolean,
   "clientToken": "string",
   "name": "string",
   "permissionArns": [ "string" ],
   "principals": [ "string" ],
   "resourceArns": [ "string" ],
   "resourceShareConfiguration": { 
      "retainSharingOnAccountLeaveOrganization": boolean
   },
   "sources": [ "string" ],
   "tags": [ 
      { 
         "key": "string",
         "value": "string"
      }
   ]
}
```

## URI Request Parameters
<a name="API_CreateResourceShare_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_CreateResourceShare_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [name](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-name"></a>
Specifies the name of the resource share.  
Type: String  
Required: Yes

 ** [allowExternalPrincipals](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-allowExternalPrincipals"></a>
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share. A value of `true` lets you share with individual AWS accounts that are *not* in your organization. A value of `false` only has meaning if your account is a member of an AWS Organization. The default value is `true`.  
Type: Boolean  
Required: No

 ** [clientToken](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [permissionArns](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-permissionArns"></a>
Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the AWS RAM permission to associate with the resource share. If you do not specify an ARN for the permission, AWS RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.  
Type: Array of strings  
Required: No

 ** [principals](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-principals"></a>
Specifies a list of one or more principals to associate with the resource share.  
You can include the following values:  
+ An AWS account ID, for example: `123456789012` 
+ An [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of an organization in AWS Organizations, for example: `arn:aws:organizations::123456789012:organization/o-exampleorgid` 
+ An ARN of an organizational unit (OU) in AWS Organizations, for example: `arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123` 
+ An ARN of an IAM role, for example: `arn:aws:iam::123456789012:role/rolename` 
+ An ARN of an IAM user, for example: `arn:aws:iam::123456789012user/username` 
+ A service principal name, for example: `service-id.amazonaws.com` 
Not all resource types can be shared with IAM roles and users. For more information, see [Sharing with IAM roles and users](https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) in the * AWS Resource Access Manager User Guide*.
Type: Array of strings  
Required: No

 ** [resourceArns](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-resourceArns"></a>
Specifies a list of one or more ARNs of the resources to associate with the resource share.  
Type: Array of strings  
Required: No

 ** [resourceShareConfiguration](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-resourceShareConfiguration"></a>
Specifies the configuration of this resource share.  
Type: [ResourceShareConfiguration](API_ResourceShareConfiguration.md) object  
Required: No

 ** [sources](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-sources"></a>
Specifies source constraints (accounts, ARNs, organization IDs, or organization paths) that limit when service principals can access resources in this resource share. When a service principal attempts to access a shared resource, validation is performed to ensure the request originates from one of the specified sources. This helps prevent confused deputy attacks by applying constraints on where service principals can access resources from.  
Type: Array of strings  
Required: No

 ** [tags](#API_CreateResourceShare_RequestSyntax) **   <a name="ram-CreateResourceShare-request-tags"></a>
Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.  
Type: Array of [Tag](API_Tag.md) objects  
Required: No

## Response Syntax
<a name="API_CreateResourceShare_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "resourceShare": { 
      "allowExternalPrincipals": boolean,
      "creationTime": number,
      "featureSet": "string",
      "lastUpdatedTime": number,
      "name": "string",
      "owningAccountId": "string",
      "resourceShareArn": "string",
      "resourceShareConfiguration": { 
         "retainSharingOnAccountLeaveOrganization": boolean
      },
      "status": "string",
      "statusMessage": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_CreateResourceShare_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_CreateResourceShare_ResponseSyntax) **   <a name="ram-CreateResourceShare-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [resourceShare](#API_CreateResourceShare_ResponseSyntax) **   <a name="ram-CreateResourceShare-response-resourceShare"></a>
An object with information about the new resource share.  
Type: [ResourceShare](API_ResourceShare.md) object

## Errors
<a name="API_CreateResourceShare_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ResourceShareLimitExceededException **   
The operation failed because it would exceed the limit for resource shares for your account. You can associate up to 100 resources per call. To view the limits for your AWS account, see the [AWS RAM page in the Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** TagLimitExceededException **   
The operation failed because it would exceed the limit for tags for your AWS account.  
HTTP Status Code: 400

 ** TagPolicyViolationException **   
The operation failed because the specified tag key is a reserved word and can't be used.  
HTTP Status Code: 400

 ** ThrottlingException **   
The operation failed because it exceeded the rate at which you are allowed to perform this operation. Please try again later.  
HTTP Status Code: 429

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_CreateResourceShare_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/CreateResourceShare) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/CreateResourceShare) 

# DeletePermission
<a name="API_DeletePermission"></a>

Deletes the specified customer managed permission in the AWS Region in which you call this operation. You can delete a customer managed permission only if it isn't attached to any resource share. The operation deletes all versions associated with the customer managed permission.

## Request Syntax
<a name="API_DeletePermission_RequestSyntax"></a>

```
DELETE /deletepermission?clientToken=clientToken&permissionArn=permissionArn HTTP/1.1
```

## URI Request Parameters
<a name="API_DeletePermission_RequestParameters"></a>

The request uses the following URI parameters.

 ** [clientToken](#API_DeletePermission_RequestSyntax) **   <a name="ram-DeletePermission-request-uri-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.

 ** [permissionArn](#API_DeletePermission_RequestSyntax) **   <a name="ram-DeletePermission-request-uri-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the customer managed permission that you want to delete.  
Required: Yes

## Request Body
<a name="API_DeletePermission_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DeletePermission_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "permissionStatus": "string",
   "returnValue": boolean
}
```

## Response Elements
<a name="API_DeletePermission_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_DeletePermission_ResponseSyntax) **   <a name="ram-DeletePermission-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [permissionStatus](#API_DeletePermission_ResponseSyntax) **   <a name="ram-DeletePermission-response-permissionStatus"></a>
This operation is performed asynchronously, and this response parameter indicates the current status.  
Type: String  
Valid Values: `ATTACHABLE | UNATTACHABLE | DELETING | DELETED` 

 ** [returnValue](#API_DeletePermission_ResponseSyntax) **   <a name="ram-DeletePermission-response-returnValue"></a>
A boolean that indicates whether the delete operations succeeded.  
Type: Boolean

## Errors
<a name="API_DeletePermission_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_DeletePermission_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/DeletePermission) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/DeletePermission) 

# DeletePermissionVersion
<a name="API_DeletePermissionVersion"></a>

Deletes one version of a customer managed permission. The version you specify must not be attached to any resource share and must not be the default version for the permission.

If a customer managed permission has the maximum of 5 versions, then you must delete at least one version before you can create another.

## Request Syntax
<a name="API_DeletePermissionVersion_RequestSyntax"></a>

```
DELETE /deletepermissionversion?clientToken=clientToken&permissionArn=permissionArn&permissionVersion=permissionVersion HTTP/1.1
```

## URI Request Parameters
<a name="API_DeletePermissionVersion_RequestParameters"></a>

The request uses the following URI parameters.

 ** [clientToken](#API_DeletePermissionVersion_RequestSyntax) **   <a name="ram-DeletePermissionVersion-request-uri-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.

 ** [permissionArn](#API_DeletePermissionVersion_RequestSyntax) **   <a name="ram-DeletePermissionVersion-request-uri-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the permission with the version you want to delete.  
Required: Yes

 ** [permissionVersion](#API_DeletePermissionVersion_RequestSyntax) **   <a name="ram-DeletePermissionVersion-request-uri-permissionVersion"></a>
Specifies the version number to delete.  
You can't delete the default version for a customer managed permission.  
You can't delete a version if it's the only version of the permission. You must either first create another version, or delete the permission completely.  
You can't delete a version if it is attached to any resource shares. If the version is the default, you must first use [SetDefaultPermissionVersion](API_SetDefaultPermissionVersion.md) to set a different version as the default for the customer managed permission, and then use [AssociateResourceSharePermission](API_AssociateResourceSharePermission.md) to update your resource shares to use the new default version.  
Required: Yes

## Request Body
<a name="API_DeletePermissionVersion_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DeletePermissionVersion_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "permissionStatus": "string",
   "returnValue": boolean
}
```

## Response Elements
<a name="API_DeletePermissionVersion_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_DeletePermissionVersion_ResponseSyntax) **   <a name="ram-DeletePermissionVersion-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [permissionStatus](#API_DeletePermissionVersion_ResponseSyntax) **   <a name="ram-DeletePermissionVersion-response-permissionStatus"></a>
This operation is performed asynchronously, and this response parameter indicates the current status.  
Type: String  
Valid Values: `ATTACHABLE | UNATTACHABLE | DELETING | DELETED` 

 ** [returnValue](#API_DeletePermissionVersion_ResponseSyntax) **   <a name="ram-DeletePermissionVersion-response-returnValue"></a>
A boolean value that indicates whether the operation is successful.  
Type: Boolean

## Errors
<a name="API_DeletePermissionVersion_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_DeletePermissionVersion_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/DeletePermissionVersion) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/DeletePermissionVersion) 

# DeleteResourceShare
<a name="API_DeleteResourceShare"></a>

Deletes the specified resource share.

**Important**  
This doesn't delete any of the resources that were associated with the resource share; it only stops the sharing of those resources through this resource share.

## Request Syntax
<a name="API_DeleteResourceShare_RequestSyntax"></a>

```
DELETE /deleteresourceshare?clientToken=clientToken&resourceShareArn=resourceShareArn HTTP/1.1
```

## URI Request Parameters
<a name="API_DeleteResourceShare_RequestParameters"></a>

The request uses the following URI parameters.

 ** [clientToken](#API_DeleteResourceShare_RequestSyntax) **   <a name="ram-DeleteResourceShare-request-uri-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.

 ** [resourceShareArn](#API_DeleteResourceShare_RequestSyntax) **   <a name="ram-DeleteResourceShare-request-uri-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share to delete.  
Required: Yes

## Request Body
<a name="API_DeleteResourceShare_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_DeleteResourceShare_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "returnValue": boolean
}
```

## Response Elements
<a name="API_DeleteResourceShare_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_DeleteResourceShare_ResponseSyntax) **   <a name="ram-DeleteResourceShare-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [returnValue](#API_DeleteResourceShare_ResponseSyntax) **   <a name="ram-DeleteResourceShare-response-returnValue"></a>
A return value of `true` indicates that the request succeeded. A value of `false` indicates that the request failed.  
Type: Boolean

## Errors
<a name="API_DeleteResourceShare_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** ThrottlingException **   
The operation failed because it exceeded the rate at which you are allowed to perform this operation. Please try again later.  
HTTP Status Code: 429

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_DeleteResourceShare_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/DeleteResourceShare) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/DeleteResourceShare) 

# DisassociateResourceShare
<a name="API_DisassociateResourceShare"></a>

Removes the specified principals, resources, or source constraints from participating in the specified resource share.

## Request Syntax
<a name="API_DisassociateResourceShare_RequestSyntax"></a>

```
POST /disassociateresourceshare HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "principals": [ "string" ],
   "resourceArns": [ "string" ],
   "resourceShareArn": "string",
   "sources": [ "string" ]
}
```

## URI Request Parameters
<a name="API_DisassociateResourceShare_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_DisassociateResourceShare_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareArn](#API_DisassociateResourceShare_RequestSyntax) **   <a name="ram-DisassociateResourceShare-request-resourceShareArn"></a>
Specifies [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share that you want to remove resources or principals from.  
Type: String  
Required: Yes

 ** [clientToken](#API_DisassociateResourceShare_RequestSyntax) **   <a name="ram-DisassociateResourceShare-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [principals](#API_DisassociateResourceShare_RequestSyntax) **   <a name="ram-DisassociateResourceShare-request-principals"></a>
Specifies a list of one or more principals that no longer are to have access to the resources in this resource share.  
You can include the following values:  
+ An AWS account ID, for example: `123456789012` 
+ An [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of an organization in AWS Organizations, for example: `arn:aws:organizations::123456789012:organization/o-exampleorgid` 
+ An ARN of an organizational unit (OU) in AWS Organizations, for example: `arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123` 
+ An ARN of an IAM role, for example: `arn:aws:iam::123456789012:role/rolename` 
+ An ARN of an IAM user, for example: `arn:aws:iam::123456789012user/username` 
+ A service principal name, for example: `service-id.amazonaws.com` 
Not all resource types can be shared with IAM roles and users. For more information, see [Sharing with IAM roles and users](https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) in the * AWS Resource Access Manager User Guide*.
Type: Array of strings  
Required: No

 ** [resourceArns](#API_DisassociateResourceShare_RequestSyntax) **   <a name="ram-DisassociateResourceShare-request-resourceArns"></a>
Specifies a list of [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals associated with the resource share.  
Type: Array of strings  
Required: No

 ** [sources](#API_DisassociateResourceShare_RequestSyntax) **   <a name="ram-DisassociateResourceShare-request-sources"></a>
Specifies source constraints (accounts, ARNs, organization IDs, or organization paths) to remove from the resource share. This enables granular management of source constraints while maintaining service principal associations. At least one source must remain when service principals are present.  
Type: Array of strings  
Required: No

## Response Syntax
<a name="API_DisassociateResourceShare_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "resourceShareAssociations": [ 
      { 
         "associatedEntity": "string",
         "associationType": "string",
         "creationTime": number,
         "external": boolean,
         "lastUpdatedTime": number,
         "resourceShareArn": "string",
         "resourceShareName": "string",
         "status": "string",
         "statusMessage": "string"
      }
   ]
}
```

## Response Elements
<a name="API_DisassociateResourceShare_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_DisassociateResourceShare_ResponseSyntax) **   <a name="ram-DisassociateResourceShare-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [resourceShareAssociations](#API_DisassociateResourceShare_ResponseSyntax) **   <a name="ram-DisassociateResourceShare-response-resourceShareAssociations"></a>
An array of objects with information about the updated associations for this resource share.  
Type: Array of [ResourceShareAssociation](API_ResourceShareAssociation.md) objects

## Errors
<a name="API_DisassociateResourceShare_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ResourceShareLimitExceededException **   
The operation failed because it would exceed the limit for resource shares for your account. You can associate up to 100 resources per call. To view the limits for your AWS account, see the [AWS RAM page in the Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** ThrottlingException **   
The operation failed because it exceeded the rate at which you are allowed to perform this operation. Please try again later.  
HTTP Status Code: 429

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_DisassociateResourceShare_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/DisassociateResourceShare) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/DisassociateResourceShare) 

# DisassociateResourceSharePermission
<a name="API_DisassociateResourceSharePermission"></a>

Removes a managed permission from a resource share. Permission changes take effect immediately. You can remove a managed permission from a resource share only if there are currently no resources of the relevant resource type currently attached to the resource share.

## Request Syntax
<a name="API_DisassociateResourceSharePermission_RequestSyntax"></a>

```
POST /disassociateresourcesharepermission HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "permissionArn": "string",
   "resourceShareArn": "string"
}
```

## URI Request Parameters
<a name="API_DisassociateResourceSharePermission_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_DisassociateResourceSharePermission_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [permissionArn](#API_DisassociateResourceSharePermission_RequestSyntax) **   <a name="ram-DisassociateResourceSharePermission-request-permissionArn"></a>
The [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the managed permission to disassociate from the resource share. Changes to permissions take effect immediately.  
Type: String  
Required: Yes

 ** [resourceShareArn](#API_DisassociateResourceSharePermission_RequestSyntax) **   <a name="ram-DisassociateResourceSharePermission-request-resourceShareArn"></a>
The [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share that you want to remove the managed permission from.  
Type: String  
Required: Yes

 ** [clientToken](#API_DisassociateResourceSharePermission_RequestSyntax) **   <a name="ram-DisassociateResourceSharePermission-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

## Response Syntax
<a name="API_DisassociateResourceSharePermission_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "returnValue": boolean
}
```

## Response Elements
<a name="API_DisassociateResourceSharePermission_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_DisassociateResourceSharePermission_ResponseSyntax) **   <a name="ram-DisassociateResourceSharePermission-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [returnValue](#API_DisassociateResourceSharePermission_ResponseSyntax) **   <a name="ram-DisassociateResourceSharePermission-response-returnValue"></a>
A return value of `true` indicates that the request succeeded. A value of `false` indicates that the request failed.  
Type: Boolean

## Errors
<a name="API_DisassociateResourceSharePermission_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_DisassociateResourceSharePermission_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/DisassociateResourceSharePermission) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/DisassociateResourceSharePermission) 

# EnableSharingWithAwsOrganization
<a name="API_EnableSharingWithAwsOrganization"></a>

Enables resource sharing within your organization in AWS Organizations. This operation creates a service-linked role called `AWSServiceRoleForResourceAccessManager` that has the IAM managed policy named AWSResourceAccessManagerServiceRolePolicy attached. This role permits AWS RAM to retrieve information about the organization and its structure. This lets you share resources with all of the accounts in the calling account's organization by specifying the organization ID, or all of the accounts in an organizational unit (OU) by specifying the OU ID. Until you enable sharing within the organization, you can specify only individual AWS accounts, or for supported resource types, IAM roles and users.

You must call this operation from an IAM role or user in the organization's management account.



## Request Syntax
<a name="API_EnableSharingWithAwsOrganization_RequestSyntax"></a>

```
POST /enablesharingwithawsorganization HTTP/1.1
```

## URI Request Parameters
<a name="API_EnableSharingWithAwsOrganization_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_EnableSharingWithAwsOrganization_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_EnableSharingWithAwsOrganization_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "returnValue": boolean
}
```

## Response Elements
<a name="API_EnableSharingWithAwsOrganization_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [returnValue](#API_EnableSharingWithAwsOrganization_ResponseSyntax) **   <a name="ram-EnableSharingWithAwsOrganization-response-returnValue"></a>
A return value of `true` indicates that the request succeeded. A value of `false` indicates that the request failed.  
Type: Boolean

## Errors
<a name="API_EnableSharingWithAwsOrganization_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_EnableSharingWithAwsOrganization_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/EnableSharingWithAwsOrganization) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/EnableSharingWithAwsOrganization) 

# GetPermission
<a name="API_GetPermission"></a>

Retrieves the contents of a managed permission in JSON format.

## Request Syntax
<a name="API_GetPermission_RequestSyntax"></a>

```
POST /getpermission HTTP/1.1
Content-type: application/json

{
   "permissionArn": "string",
   "permissionVersion": number
}
```

## URI Request Parameters
<a name="API_GetPermission_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetPermission_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [permissionArn](#API_GetPermission_RequestSyntax) **   <a name="ram-GetPermission-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the [ListPermissions](API_ListPermissions.md) operation or go to the [Permissions library](https://console.aws.amazon.com/ram/home#Permissions:) page in the AWS RAM console and then choose the name of the permission. The ARN is displayed on the detail page.  
Type: String  
Required: Yes

 ** [permissionVersion](#API_GetPermission_RequestSyntax) **   <a name="ram-GetPermission-request-permissionVersion"></a>
Specifies the version number of the AWS RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.  
To see the list of available versions, use [ListPermissionVersions](API_ListPermissionVersions.md).  
Type: Integer  
Required: No

## Response Syntax
<a name="API_GetPermission_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "permission": { 
      "arn": "string",
      "creationTime": number,
      "defaultVersion": boolean,
      "featureSet": "string",
      "isResourceTypeDefault": boolean,
      "lastUpdatedTime": number,
      "name": "string",
      "permission": "string",
      "permissionType": "string",
      "resourceType": "string",
      "status": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ],
      "version": "string"
   }
}
```

## Response Elements
<a name="API_GetPermission_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [permission](#API_GetPermission_ResponseSyntax) **   <a name="ram-GetPermission-response-permission"></a>
An object with details about the permission.  
Type: [ResourceSharePermissionDetail](API_ResourceSharePermissionDetail.md) object

## Errors
<a name="API_GetPermission_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_GetPermission_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/GetPermission) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/GetPermission) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/GetPermission) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/GetPermission) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/GetPermission) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/GetPermission) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/GetPermission) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/GetPermission) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/GetPermission) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/GetPermission) 

# GetResourcePolicies
<a name="API_GetResourcePolicies"></a>

Retrieves the resource policies for the specified resources that you own and have shared.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_GetResourcePolicies_RequestSyntax"></a>

```
POST /getresourcepolicies HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "principal": "string",
   "resourceArns": [ "string" ]
}
```

## URI Request Parameters
<a name="API_GetResourcePolicies_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetResourcePolicies_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceArns](#API_GetResourcePolicies_RequestSyntax) **   <a name="ram-GetResourcePolicies-request-resourceArns"></a>
Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resources whose policies you want to retrieve.  
Type: Array of strings  
Required: Yes

 ** [maxResults](#API_GetResourcePolicies_RequestSyntax) **   <a name="ram-GetResourcePolicies-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_GetResourcePolicies_RequestSyntax) **   <a name="ram-GetResourcePolicies-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [principal](#API_GetResourcePolicies_RequestSyntax) **   <a name="ram-GetResourcePolicies-request-principal"></a>
Specifies the principal.  
Type: String  
Required: No

## Response Syntax
<a name="API_GetResourcePolicies_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "policies": [ "string" ]
}
```

## Response Elements
<a name="API_GetResourcePolicies_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_GetResourcePolicies_ResponseSyntax) **   <a name="ram-GetResourcePolicies-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [policies](#API_GetResourcePolicies_ResponseSyntax) **   <a name="ram-GetResourcePolicies-response-policies"></a>
An array of resource policy documents in JSON format.  
Type: Array of strings

## Errors
<a name="API_GetResourcePolicies_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ResourceArnNotFoundException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) was not found.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_GetResourcePolicies_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/GetResourcePolicies) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/GetResourcePolicies) 

# GetResourceShareAssociations
<a name="API_GetResourceShareAssociations"></a>

Retrieves the lists of resources and principals that associated for resource shares that you own.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_GetResourceShareAssociations_RequestSyntax"></a>

```
POST /getresourceshareassociations HTTP/1.1
Content-type: application/json

{
   "associationStatus": "string",
   "associationType": "string",
   "maxResults": number,
   "nextToken": "string",
   "principal": "string",
   "resourceArn": "string",
   "resourceShareArns": [ "string" ]
}
```

## URI Request Parameters
<a name="API_GetResourceShareAssociations_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetResourceShareAssociations_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [associationType](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-associationType"></a>
Specifies whether you want to retrieve the associations that involve a specified resource or principal.  
+  `PRINCIPAL` – list the principals whose associations you want to see.
+  `RESOURCE` – list the resources whose associations you want to see.
Type: String  
Valid Values: `PRINCIPAL | RESOURCE | SOURCE`   
Required: Yes

 ** [associationStatus](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-associationStatus"></a>
Specifies that you want to retrieve only associations that have this status.  
Type: String  
Valid Values: `ASSOCIATING | ASSOCIATED | FAILED | DISASSOCIATING | DISASSOCIATED | SUSPENDED | SUSPENDING | RESTORING`   
Required: No

 ** [maxResults](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [principal](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-principal"></a>
Specifies the ID of the principal whose resource shares you want to retrieve. This can be an AWS account ID, an organization ID, an organizational unit ID, or the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of an individual IAM role or user.  
You cannot specify this parameter if the association type is `RESOURCE`.  
Type: String  
Required: No

 ** [resourceArn](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-resourceArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of a resource whose resource shares you want to retrieve.  
You cannot specify this parameter if the association type is `PRINCIPAL`.  
Type: String  
Required: No

 ** [resourceShareArns](#API_GetResourceShareAssociations_RequestSyntax) **   <a name="ram-GetResourceShareAssociations-request-resourceShareArns"></a>
Specifies a list of [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share whose associations you want to retrieve.  
Type: Array of strings  
Required: No

## Response Syntax
<a name="API_GetResourceShareAssociations_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "resourceShareAssociations": [ 
      { 
         "associatedEntity": "string",
         "associationType": "string",
         "creationTime": number,
         "external": boolean,
         "lastUpdatedTime": number,
         "resourceShareArn": "string",
         "resourceShareName": "string",
         "status": "string",
         "statusMessage": "string"
      }
   ]
}
```

## Response Elements
<a name="API_GetResourceShareAssociations_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_GetResourceShareAssociations_ResponseSyntax) **   <a name="ram-GetResourceShareAssociations-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [resourceShareAssociations](#API_GetResourceShareAssociations_ResponseSyntax) **   <a name="ram-GetResourceShareAssociations-response-resourceShareAssociations"></a>
An array of objects that contain the details about the associations.  
Type: Array of [ResourceShareAssociation](API_ResourceShareAssociation.md) objects

## Errors
<a name="API_GetResourceShareAssociations_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_GetResourceShareAssociations_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/GetResourceShareAssociations) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/GetResourceShareAssociations) 

# GetResourceShareInvitations
<a name="API_GetResourceShareInvitations"></a>

Retrieves details about invitations that you have received for resource shares.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_GetResourceShareInvitations_RequestSyntax"></a>

```
POST /getresourceshareinvitations HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "resourceShareArns": [ "string" ],
   "resourceShareInvitationArns": [ "string" ]
}
```

## URI Request Parameters
<a name="API_GetResourceShareInvitations_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetResourceShareInvitations_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [maxResults](#API_GetResourceShareInvitations_RequestSyntax) **   <a name="ram-GetResourceShareInvitations-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_GetResourceShareInvitations_RequestSyntax) **   <a name="ram-GetResourceShareInvitations-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [resourceShareArns](#API_GetResourceShareInvitations_RequestSyntax) **   <a name="ram-GetResourceShareInvitations-request-resourceShareArns"></a>
Specifies that you want details about invitations only for the resource shares described by this list of [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html)   
Type: Array of strings  
Required: No

 ** [resourceShareInvitationArns](#API_GetResourceShareInvitations_RequestSyntax) **   <a name="ram-GetResourceShareInvitations-request-resourceShareInvitationArns"></a>
Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share invitations you want information about.  
Type: Array of strings  
Required: No

## Response Syntax
<a name="API_GetResourceShareInvitations_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "resourceShareInvitations": [ 
      { 
         "invitationTimestamp": number,
         "receiverAccountId": "string",
         "receiverArn": "string",
         "resourceShareArn": "string",
         "resourceShareAssociations": [ 
            { 
               "associatedEntity": "string",
               "associationType": "string",
               "creationTime": number,
               "external": boolean,
               "lastUpdatedTime": number,
               "resourceShareArn": "string",
               "resourceShareName": "string",
               "status": "string",
               "statusMessage": "string"
            }
         ],
         "resourceShareInvitationArn": "string",
         "resourceShareName": "string",
         "senderAccountId": "string",
         "status": "string"
      }
   ]
}
```

## Response Elements
<a name="API_GetResourceShareInvitations_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_GetResourceShareInvitations_ResponseSyntax) **   <a name="ram-GetResourceShareInvitations-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [resourceShareInvitations](#API_GetResourceShareInvitations_ResponseSyntax) **   <a name="ram-GetResourceShareInvitations-response-resourceShareInvitations"></a>
An array of objects that contain the details about the invitations.  
Type: Array of [ResourceShareInvitation](API_ResourceShareInvitation.md) objects

## Errors
<a name="API_GetResourceShareInvitations_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidMaxResultsException **   
The operation failed because the specified value for `MaxResults` isn't valid.  
HTTP Status Code: 400

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ResourceShareInvitationArnNotFoundException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for an invitation was not found.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## Examples
<a name="API_GetResourceShareInvitations_Examples"></a>

**Note**  
The examples show the JSON payloads of the request and response pretty printed with white spaces and line breaks for ease for ease of reading.

### Example
<a name="API_GetResourceShareInvitations_Example_1"></a>

The following example shows an AWS account 111111111111 retrieving a list of its currently available invitations in the `us-east-1` Region. The response includes one `PENDING` invitation from AWS account 999999999999.

#### Sample Request
<a name="API_GetResourceShareInvitations_Example_1_Request"></a>

```
POST /getresourceshareinvitations HTTP/1.1
Host: ram.us-east-1.amazonaws.com
Accept-Encoding: identity
User-Agent: <UserAgentString>
Content-Length: <PayloadSizeBytes>
Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature>>
```

#### Sample Response
<a name="API_GetResourceShareInvitations_Example_1_Response"></a>

```
HTTP/1.1 200 OK
Date: Wed, 22 Sep 2021 21:11:46 GMT
Content-Type: application/json
Content-Length: <PayloadSizeBytes>

{
    "resourceShareInvitations": [
        {
            "invitationTimestamp": 1632342984.382,
            "receiverAccountId": "111111111111",
            "resourceShareArn": "arn:aws:ram:us-east-1:999999999999:resource-share/27d09b4b-5e12-41d1-a4f2-19ded10982e2",
            "resourceShareInvitationArn": "arn:aws:ram:us-east-1:999999999999:resource-share-invitation/1e3477be-4a95-46b4-bbe0-c400156cd8e6",
            "resourceShareName": "MyLicenseShare",
            "senderAccountId": "999999999999",
            "status": "PENDING"
        }
    ]
}
```

## See Also
<a name="API_GetResourceShareInvitations_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/GetResourceShareInvitations) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/GetResourceShareInvitations) 

# GetResourceShares
<a name="API_GetResourceShares"></a>

Retrieves details about the resource shares that you own or that are shared with you.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_GetResourceShares_RequestSyntax"></a>

```
POST /getresourceshares HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "name": "string",
   "nextToken": "string",
   "permissionArn": "string",
   "permissionVersion": number,
   "resourceOwner": "string",
   "resourceShareArns": [ "string" ],
   "resourceShareStatus": "string",
   "tagFilters": [ 
      { 
         "tagKey": "string",
         "tagValues": [ "string" ]
      }
   ]
}
```

## URI Request Parameters
<a name="API_GetResourceShares_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_GetResourceShares_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceOwner](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-resourceOwner"></a>
Specifies that you want to retrieve details of only those resource shares that match the following:  
+  ** `SELF` ** – resource shares that your account shares with other accounts
+  ** `OTHER-ACCOUNTS` ** – resource shares that other accounts share with your account
Type: String  
Valid Values: `SELF | OTHER-ACCOUNTS`   
Required: Yes

 ** [maxResults](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [name](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-name"></a>
Specifies the name of an individual resource share that you want to retrieve details about.  
Type: String  
Required: No

 ** [nextToken](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [permissionArn](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-permissionArn"></a>
Specifies that you want to retrieve details of only those resource shares that use the managed permission with this [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).  
Type: String  
Required: No

 ** [permissionVersion](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-permissionVersion"></a>
Specifies that you want to retrieve details for only those resource shares that use the specified version of the managed permission.  
Type: Integer  
Required: No

 ** [resourceShareArns](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-resourceShareArns"></a>
Specifies the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of individual resource shares that you want information about.  
Type: Array of strings  
Required: No

 ** [resourceShareStatus](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-resourceShareStatus"></a>
Specifies that you want to retrieve details of only those resource shares that have this status.  
Type: String  
Valid Values: `PENDING | ACTIVE | FAILED | DELETING | DELETED`   
Required: No

 ** [tagFilters](#API_GetResourceShares_RequestSyntax) **   <a name="ram-GetResourceShares-request-tagFilters"></a>
Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.  
Type: Array of [TagFilter](API_TagFilter.md) objects  
Required: No

## Response Syntax
<a name="API_GetResourceShares_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "resourceShares": [ 
      { 
         "allowExternalPrincipals": boolean,
         "creationTime": number,
         "featureSet": "string",
         "lastUpdatedTime": number,
         "name": "string",
         "owningAccountId": "string",
         "resourceShareArn": "string",
         "resourceShareConfiguration": { 
            "retainSharingOnAccountLeaveOrganization": boolean
         },
         "status": "string",
         "statusMessage": "string",
         "tags": [ 
            { 
               "key": "string",
               "value": "string"
            }
         ]
      }
   ]
}
```

## Response Elements
<a name="API_GetResourceShares_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_GetResourceShares_ResponseSyntax) **   <a name="ram-GetResourceShares-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [resourceShares](#API_GetResourceShares_ResponseSyntax) **   <a name="ram-GetResourceShares-response-resourceShares"></a>
An array of objects that contain the information about the resource shares.  
Type: Array of [ResourceShare](API_ResourceShare.md) objects

## Errors
<a name="API_GetResourceShares_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_GetResourceShares_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/GetResourceShares) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/GetResourceShares) 

# ListPendingInvitationResources
<a name="API_ListPendingInvitationResources"></a>

Lists the resources in a resource share that is shared with you but for which the invitation is still `PENDING`. That means that you haven't accepted or rejected the invitation and the invitation hasn't expired.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListPendingInvitationResources_RequestSyntax"></a>

```
POST /listpendinginvitationresources HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "resourceRegionScope": "string",
   "resourceShareInvitationArn": "string"
}
```

## URI Request Parameters
<a name="API_ListPendingInvitationResources_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListPendingInvitationResources_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareInvitationArn](#API_ListPendingInvitationResources_RequestSyntax) **   <a name="ram-ListPendingInvitationResources-request-resourceShareInvitationArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the invitation. You can use [GetResourceShareInvitations](API_GetResourceShareInvitations.md) to find the ARN of the invitation.  
Type: String  
Required: Yes

 ** [maxResults](#API_ListPendingInvitationResources_RequestSyntax) **   <a name="ram-ListPendingInvitationResources-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListPendingInvitationResources_RequestSyntax) **   <a name="ram-ListPendingInvitationResources-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [resourceRegionScope](#API_ListPendingInvitationResources_RequestSyntax) **   <a name="ram-ListPendingInvitationResources-request-resourceRegionScope"></a>
Specifies that you want the results to include only resources that have the specified scope.  
+  `ALL` – the results include both global and regional resources or resource types.
+  `GLOBAL` – the results include only global resources or resource types.
+  `REGIONAL` – the results include only regional resources or resource types.
The default value is `ALL`.  
Type: String  
Valid Values: `ALL | REGIONAL | GLOBAL`   
Required: No

## Response Syntax
<a name="API_ListPendingInvitationResources_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "resources": [ 
      { 
         "arn": "string",
         "creationTime": number,
         "lastUpdatedTime": number,
         "resourceGroupArn": "string",
         "resourceRegionScope": "string",
         "resourceShareArn": "string",
         "status": "string",
         "statusMessage": "string",
         "type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPendingInvitationResources_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListPendingInvitationResources_ResponseSyntax) **   <a name="ram-ListPendingInvitationResources-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [resources](#API_ListPendingInvitationResources_ResponseSyntax) **   <a name="ram-ListPendingInvitationResources-response-resources"></a>
An array of objects that contain the information about the resources included the specified resource share.  
Type: Array of [Resource](API_Resource.md) objects

## Errors
<a name="API_ListPendingInvitationResources_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** MissingRequiredParameterException **   
The operation failed because a required input parameter is missing.  
HTTP Status Code: 400

 ** ResourceShareInvitationAlreadyRejectedException **   
The operation failed because the specified invitation was already rejected.  
HTTP Status Code: 400

 ** ResourceShareInvitationArnNotFoundException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for an invitation was not found.  
HTTP Status Code: 400

 ** ResourceShareInvitationExpiredException **   
The operation failed because the specified invitation is past its expiration date and time.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_ListPendingInvitationResources_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListPendingInvitationResources) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListPendingInvitationResources) 

# ListPermissionAssociations
<a name="API_ListPermissionAssociations"></a>

Lists information about the managed permission and its associations to any resource shares that use this managed permission. This lets you see which resource shares use which versions of the specified managed permission.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListPermissionAssociations_RequestSyntax"></a>

```
POST /listpermissionassociations HTTP/1.1
Content-type: application/json

{
   "associationStatus": "string",
   "defaultVersion": boolean,
   "featureSet": "string",
   "maxResults": number,
   "nextToken": "string",
   "permissionArn": "string",
   "permissionVersion": number,
   "resourceType": "string"
}
```

## URI Request Parameters
<a name="API_ListPermissionAssociations_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListPermissionAssociations_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [associationStatus](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-associationStatus"></a>
Specifies that you want to list only those associations with resource shares that match this status.  
Type: String  
Valid Values: `ASSOCIATING | ASSOCIATED | FAILED | DISASSOCIATING | DISASSOCIATED | SUSPENDED | SUSPENDING | RESTORING`   
Required: No

 ** [defaultVersion](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-defaultVersion"></a>
When `true`, specifies that you want to list only those associations with resource shares that use the default version of the specified managed permission.  
When `false` (the default value), lists associations with resource shares that use any version of the specified managed permission.  
Type: Boolean  
Required: No

 ** [featureSet](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-featureSet"></a>
Specifies that you want to list only those associations with resource shares that have a `featureSet` with this value.  
Type: String  
Valid Values: `CREATED_FROM_POLICY | PROMOTING_TO_STANDARD | STANDARD`   
Required: No

 ** [maxResults](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [permissionArn](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the managed permission.  
Type: String  
Required: No

 ** [permissionVersion](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-permissionVersion"></a>
Specifies that you want to list only those associations with resource shares that use this version of the managed permission. If you don't provide a value for this parameter, then the operation returns information about associations with resource shares that use any version of the managed permission.  
Type: Integer  
Required: No

 ** [resourceType](#API_ListPermissionAssociations_RequestSyntax) **   <a name="ram-ListPermissionAssociations-request-resourceType"></a>
Specifies that you want to list only those associations with resource shares that include at least one resource of this resource type.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListPermissionAssociations_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "permissions": [ 
      { 
         "arn": "string",
         "defaultVersion": boolean,
         "featureSet": "string",
         "lastUpdatedTime": number,
         "permissionVersion": "string",
         "resourceShareArn": "string",
         "resourceType": "string",
         "status": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPermissionAssociations_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListPermissionAssociations_ResponseSyntax) **   <a name="ram-ListPermissionAssociations-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [permissions](#API_ListPermissionAssociations_ResponseSyntax) **   <a name="ram-ListPermissionAssociations-response-permissions"></a>
A structure with information about this customer managed permission.  
Type: Array of [AssociatedPermission](API_AssociatedPermission.md) objects

## Errors
<a name="API_ListPermissionAssociations_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_ListPermissionAssociations_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListPermissionAssociations) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListPermissionAssociations) 

# ListPermissions
<a name="API_ListPermissions"></a>

Retrieves a list of available AWS RAM permissions that you can use for the supported resource types. 

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListPermissions_RequestSyntax"></a>

```
POST /listpermissions HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "permissionType": "string",
   "resourceType": "string"
}
```

## URI Request Parameters
<a name="API_ListPermissions_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListPermissions_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [maxResults](#API_ListPermissions_RequestSyntax) **   <a name="ram-ListPermissions-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListPermissions_RequestSyntax) **   <a name="ram-ListPermissions-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [permissionType](#API_ListPermissions_RequestSyntax) **   <a name="ram-ListPermissions-request-permissionType"></a>
Specifies that you want to list only permissions of this type:  
+  `AWS` – returns only AWS managed permissions.
+  `LOCAL` – returns only customer managed permissions
+  `ALL` – returns both AWS managed permissions and customer managed permissions.
If you don't specify this parameter, the default is `All`.  
Type: String  
Valid Values: `ALL | AWS_MANAGED | CUSTOMER_MANAGED`   
Required: No

 ** [resourceType](#API_ListPermissions_RequestSyntax) **   <a name="ram-ListPermissions-request-resourceType"></a>
Specifies that you want to list only those permissions that apply to the specified resource type. This parameter is not case sensitive.  
For example, to list only permissions that apply to Amazon EC2 subnets, specify `ec2:subnet`. You can use the [ListResourceTypes](API_ListResourceTypes.md) operation to get the specific string required.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListPermissions_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "permissions": [ 
      { 
         "arn": "string",
         "creationTime": number,
         "defaultVersion": boolean,
         "featureSet": "string",
         "isResourceTypeDefault": boolean,
         "lastUpdatedTime": number,
         "name": "string",
         "permissionType": "string",
         "resourceType": "string",
         "status": "string",
         "tags": [ 
            { 
               "key": "string",
               "value": "string"
            }
         ],
         "version": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPermissions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListPermissions_ResponseSyntax) **   <a name="ram-ListPermissions-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [permissions](#API_ListPermissions_ResponseSyntax) **   <a name="ram-ListPermissions-response-permissions"></a>
An array of objects with information about the permissions.  
Type: Array of [ResourceSharePermissionSummary](API_ResourceSharePermissionSummary.md) objects

## Errors
<a name="API_ListPermissions_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_ListPermissions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListPermissions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListPermissions) 

# ListPermissionVersions
<a name="API_ListPermissionVersions"></a>

Lists the available versions of the specified AWS RAM permission.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListPermissionVersions_RequestSyntax"></a>

```
POST /listpermissionversions HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "permissionArn": "string"
}
```

## URI Request Parameters
<a name="API_ListPermissionVersions_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListPermissionVersions_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [permissionArn](#API_ListPermissionVersions_RequestSyntax) **   <a name="ram-ListPermissionVersions-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the AWS RAM permission whose versions you want to list. You can use the `permissionVersion` parameter on the [AssociateResourceSharePermission](API_AssociateResourceSharePermission.md) operation to specify a non-default version to attach.  
Type: String  
Required: Yes

 ** [maxResults](#API_ListPermissionVersions_RequestSyntax) **   <a name="ram-ListPermissionVersions-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListPermissionVersions_RequestSyntax) **   <a name="ram-ListPermissionVersions-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListPermissionVersions_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "permissions": [ 
      { 
         "arn": "string",
         "creationTime": number,
         "defaultVersion": boolean,
         "featureSet": "string",
         "isResourceTypeDefault": boolean,
         "lastUpdatedTime": number,
         "name": "string",
         "permissionType": "string",
         "resourceType": "string",
         "status": "string",
         "tags": [ 
            { 
               "key": "string",
               "value": "string"
            }
         ],
         "version": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPermissionVersions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListPermissionVersions_ResponseSyntax) **   <a name="ram-ListPermissionVersions-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [permissions](#API_ListPermissionVersions_ResponseSyntax) **   <a name="ram-ListPermissionVersions-response-permissions"></a>
An array of objects that contain details for each of the available versions.  
Type: Array of [ResourceSharePermissionSummary](API_ResourceSharePermissionSummary.md) objects

## Errors
<a name="API_ListPermissionVersions_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_ListPermissionVersions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListPermissionVersions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListPermissionVersions) 

# ListPrincipals
<a name="API_ListPrincipals"></a>

Lists the principals that you are sharing resources with or that are sharing resources with you.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListPrincipals_RequestSyntax"></a>

```
POST /listprincipals HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "principals": [ "string" ],
   "resourceArn": "string",
   "resourceOwner": "string",
   "resourceShareArns": [ "string" ],
   "resourceType": "string"
}
```

## URI Request Parameters
<a name="API_ListPrincipals_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListPrincipals_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceOwner](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-resourceOwner"></a>
Specifies that you want to list information for only resource shares that match the following:  
+  ** `SELF` ** – principals that your account is sharing resources with
+  ** `OTHER-ACCOUNTS` ** – principals that are sharing resources with your account
Type: String  
Valid Values: `SELF | OTHER-ACCOUNTS`   
Required: Yes

 ** [maxResults](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [principals](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-principals"></a>
Specifies that you want to list information for only the listed principals.  
You can include the following values:  
+ An AWS account ID, for example: `123456789012` 
+ An [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of an organization in AWS Organizations, for example: `arn:aws:organizations::123456789012:organization/o-exampleorgid` 
+ An ARN of an organizational unit (OU) in AWS Organizations, for example: `arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123` 
+ An ARN of an IAM role, for example: `arn:aws:iam::123456789012:role/rolename` 
+ An ARN of an IAM user, for example: `arn:aws:iam::123456789012user/username` 
+ A service principal name, for example: `service-id.amazonaws.com` 
Not all resource types can be shared with IAM roles and users. For more information, see [Sharing with IAM roles and users](https://docs.aws.amazon.com/ram/latest/userguide/permissions.html#permissions-rbp-supported-resource-types) in the * AWS Resource Access Manager User Guide*.
Type: Array of strings  
Required: No

 ** [resourceArn](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-resourceArn"></a>
Specifies that you want to list principal information for the resource share with the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).  
Type: String  
Required: No

 ** [resourceShareArns](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-resourceShareArns"></a>
Specifies that you want to list information for only principals associated with the resource shares specified by a list the [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).  
Type: Array of strings  
Required: No

 ** [resourceType](#API_ListPrincipals_RequestSyntax) **   <a name="ram-ListPrincipals-request-resourceType"></a>
Specifies that you want to list information for only principals associated with resource shares that include the specified resource type.  
For a list of valid values, query the [ListResourceTypes](API_ListResourceTypes.md) operation.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListPrincipals_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "principals": [ 
      { 
         "creationTime": number,
         "external": boolean,
         "id": "string",
         "lastUpdatedTime": number,
         "resourceShareArn": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListPrincipals_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListPrincipals_ResponseSyntax) **   <a name="ram-ListPrincipals-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [principals](#API_ListPrincipals_ResponseSyntax) **   <a name="ram-ListPrincipals-response-principals"></a>
An array of objects that contain the details about the principals.  
Type: Array of [Principal](API_Principal.md) objects

## Errors
<a name="API_ListPrincipals_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_ListPrincipals_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListPrincipals) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListPrincipals) 

# ListReplacePermissionAssociationsWork
<a name="API_ListReplacePermissionAssociationsWork"></a>

Retrieves the current status of the asynchronous tasks performed by AWS RAM when you perform the [ReplacePermissionAssociationsWork](API_ReplacePermissionAssociationsWork.md) operation.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListReplacePermissionAssociationsWork_RequestSyntax"></a>

```
POST /listreplacepermissionassociationswork HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "status": "string",
   "workIds": [ "string" ]
}
```

## URI Request Parameters
<a name="API_ListReplacePermissionAssociationsWork_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListReplacePermissionAssociationsWork_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [maxResults](#API_ListReplacePermissionAssociationsWork_RequestSyntax) **   <a name="ram-ListReplacePermissionAssociationsWork-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListReplacePermissionAssociationsWork_RequestSyntax) **   <a name="ram-ListReplacePermissionAssociationsWork-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [status](#API_ListReplacePermissionAssociationsWork_RequestSyntax) **   <a name="ram-ListReplacePermissionAssociationsWork-request-status"></a>
Specifies that you want to see only the details about requests with a status that matches this value.  
Type: String  
Valid Values: `IN_PROGRESS | COMPLETED | FAILED`   
Required: No

 ** [workIds](#API_ListReplacePermissionAssociationsWork_RequestSyntax) **   <a name="ram-ListReplacePermissionAssociationsWork-request-workIds"></a>
A list of IDs. These values come from the `id`field of the `replacePermissionAssociationsWork`structure returned by the [ReplacePermissionAssociations](API_ReplacePermissionAssociations.md) operation.   
Type: Array of strings  
Required: No

## Response Syntax
<a name="API_ListReplacePermissionAssociationsWork_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "replacePermissionAssociationsWorks": [ 
      { 
         "creationTime": number,
         "fromPermissionArn": "string",
         "fromPermissionVersion": "string",
         "id": "string",
         "lastUpdatedTime": number,
         "status": "string",
         "statusMessage": "string",
         "toPermissionArn": "string",
         "toPermissionVersion": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListReplacePermissionAssociationsWork_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListReplacePermissionAssociationsWork_ResponseSyntax) **   <a name="ram-ListReplacePermissionAssociationsWork-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [replacePermissionAssociationsWorks](#API_ListReplacePermissionAssociationsWork_ResponseSyntax) **   <a name="ram-ListReplacePermissionAssociationsWork-response-replacePermissionAssociationsWorks"></a>
An array of data structures that provide details of the matching work IDs.  
Type: Array of [ReplacePermissionAssociationsWork](API_ReplacePermissionAssociationsWork.md) objects

## Errors
<a name="API_ListReplacePermissionAssociationsWork_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_ListReplacePermissionAssociationsWork_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListReplacePermissionAssociationsWork) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListReplacePermissionAssociationsWork) 

# ListResources
<a name="API_ListResources"></a>

Lists the resources that you added to a resource share or the resources that are shared with you.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListResources_RequestSyntax"></a>

```
POST /listresources HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "principal": "string",
   "resourceArns": [ "string" ],
   "resourceOwner": "string",
   "resourceRegionScope": "string",
   "resourceShareArns": [ "string" ],
   "resourceType": "string"
}
```

## URI Request Parameters
<a name="API_ListResources_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListResources_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceOwner](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-resourceOwner"></a>
Specifies that you want to list only the resource shares that match the following:  
+  ** `SELF` ** – resources that your account shares with other accounts
+  ** `OTHER-ACCOUNTS` ** – resources that other accounts share with your account
Type: String  
Valid Values: `SELF | OTHER-ACCOUNTS`   
Required: Yes

 ** [maxResults](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [principal](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-principal"></a>
Specifies that you want to list only the resource shares that are associated with the specified principal.  
Type: String  
Required: No

 ** [resourceArns](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-resourceArns"></a>
Specifies that you want to list only the resource shares that include resources with the specified [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).  
Type: Array of strings  
Required: No

 ** [resourceRegionScope](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-resourceRegionScope"></a>
Specifies that you want the results to include only resources that have the specified scope.  
+  `ALL` – the results include both global and regional resources or resource types.
+  `GLOBAL` – the results include only global resources or resource types.
+  `REGIONAL` – the results include only regional resources or resource types.
The default value is `ALL`.  
Type: String  
Valid Values: `ALL | REGIONAL | GLOBAL`   
Required: No

 ** [resourceShareArns](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-resourceShareArns"></a>
Specifies that you want to list only resources in the resource shares identified by the specified [Amazon Resource Names (ARNs)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).  
Type: Array of strings  
Required: No

 ** [resourceType](#API_ListResources_RequestSyntax) **   <a name="ram-ListResources-request-resourceType"></a>
Specifies that you want to list only the resource shares that include resources of the specified resource type.  
For valid values, query the [ListResourceTypes](API_ListResourceTypes.md) operation.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListResources_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "resources": [ 
      { 
         "arn": "string",
         "creationTime": number,
         "lastUpdatedTime": number,
         "resourceGroupArn": "string",
         "resourceRegionScope": "string",
         "resourceShareArn": "string",
         "status": "string",
         "statusMessage": "string",
         "type": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListResources_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListResources_ResponseSyntax) **   <a name="ram-ListResources-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [resources](#API_ListResources_ResponseSyntax) **   <a name="ram-ListResources-response-resources"></a>
An array of objects that contain information about the resources.  
Type: Array of [Resource](API_Resource.md) objects

## Errors
<a name="API_ListResources_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidResourceTypeException **   
The operation failed because the specified resource type isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_ListResources_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListResources) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListResources) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListResources) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListResources) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListResources) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListResources) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListResources) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListResources) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListResources) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListResources) 

# ListResourceSharePermissions
<a name="API_ListResourceSharePermissions"></a>

Lists the AWS RAM permissions that are associated with a resource share.

**Note**  
Always check the `NextToken` response parameter for a `null` value when calling a paginated operation. These operations can occasionally return an empty set of results even when there are more results available. The `NextToken` response parameter value is `null` *only* when there are no more results to display.

## Request Syntax
<a name="API_ListResourceSharePermissions_RequestSyntax"></a>

```
POST /listresourcesharepermissions HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "resourceShareArn": "string"
}
```

## URI Request Parameters
<a name="API_ListResourceSharePermissions_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListResourceSharePermissions_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareArn](#API_ListResourceSharePermissions_RequestSyntax) **   <a name="ram-ListResourceSharePermissions-request-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share for which you want to retrieve the associated permissions.  
Type: String  
Required: Yes

 ** [maxResults](#API_ListResourceSharePermissions_RequestSyntax) **   <a name="ram-ListResourceSharePermissions-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListResourceSharePermissions_RequestSyntax) **   <a name="ram-ListResourceSharePermissions-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListResourceSharePermissions_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "permissions": [ 
      { 
         "arn": "string",
         "creationTime": number,
         "defaultVersion": boolean,
         "featureSet": "string",
         "isResourceTypeDefault": boolean,
         "lastUpdatedTime": number,
         "name": "string",
         "permissionType": "string",
         "resourceType": "string",
         "status": "string",
         "tags": [ 
            { 
               "key": "string",
               "value": "string"
            }
         ],
         "version": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListResourceSharePermissions_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListResourceSharePermissions_ResponseSyntax) **   <a name="ram-ListResourceSharePermissions-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [permissions](#API_ListResourceSharePermissions_ResponseSyntax) **   <a name="ram-ListResourceSharePermissions-response-permissions"></a>
An array of objects that describe the permissions associated with the resource share.  
Type: Array of [ResourceSharePermissionSummary](API_ResourceSharePermissionSummary.md) objects

## Errors
<a name="API_ListResourceSharePermissions_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_ListResourceSharePermissions_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListResourceSharePermissions) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListResourceSharePermissions) 

# ListResourceTypes
<a name="API_ListResourceTypes"></a>

Lists the resource types that can be shared by AWS RAM.

## Request Syntax
<a name="API_ListResourceTypes_RequestSyntax"></a>

```
POST /listresourcetypes HTTP/1.1
Content-type: application/json

{
   "maxResults": number,
   "nextToken": "string",
   "resourceRegionScope": "string"
}
```

## URI Request Parameters
<a name="API_ListResourceTypes_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListResourceTypes_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [maxResults](#API_ListResourceTypes_RequestSyntax) **   <a name="ram-ListResourceTypes-request-maxResults"></a>
Specifies the total number of results that you want included on each page of the response. If you do not include this parameter, it defaults to a value that is specific to the operation. If additional items exist beyond the number you specify, the `NextToken` response element is returned with a value (not null). Include the specified value as the `NextToken` request parameter in the next call to the operation to get the next part of the results. Note that the service might return fewer results than the maximum even when there are more results available. You should check `NextToken` after every operation to ensure that you receive all of the results.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListResourceTypes_RequestSyntax) **   <a name="ram-ListResourceTypes-request-nextToken"></a>
Specifies that you want to receive the next page of results. Valid only if you received a `NextToken` response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value provided by the previous call's `NextToken` response to request the next page of results.  
Type: String  
Required: No

 ** [resourceRegionScope](#API_ListResourceTypes_RequestSyntax) **   <a name="ram-ListResourceTypes-request-resourceRegionScope"></a>
Specifies that you want the results to include only resources that have the specified scope.  
+  `ALL` – the results include both global and regional resources or resource types.
+  `GLOBAL` – the results include only global resources or resource types.
+  `REGIONAL` – the results include only regional resources or resource types.
The default value is `ALL`.  
Type: String  
Valid Values: `ALL | REGIONAL | GLOBAL`   
Required: No

## Response Syntax
<a name="API_ListResourceTypes_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "resourceTypes": [ 
      { 
         "resourceRegionScope": "string",
         "resourceType": "string",
         "serviceName": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListResourceTypes_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListResourceTypes_ResponseSyntax) **   <a name="ram-ListResourceTypes-response-nextToken"></a>
If present, this value indicates that more output is available than is included in the current response. Use this value in the `NextToken` request parameter in a subsequent call to the operation to get the next part of the output. You should repeat this until the `NextToken` response element comes back as `null`. This indicates that this is the last page of results.  
Type: String

 ** [resourceTypes](#API_ListResourceTypes_ResponseSyntax) **   <a name="ram-ListResourceTypes-response-resourceTypes"></a>
An array of objects that contain information about the resource types that can be shared using AWS RAM.  
Type: Array of [ServiceNameAndResourceType](API_ServiceNameAndResourceType.md) objects

## Errors
<a name="API_ListResourceTypes_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_ListResourceTypes_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListResourceTypes) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListResourceTypes) 

# ListSourceAssociations
<a name="API_ListSourceAssociations"></a>

Lists source associations for resource shares. Source associations control which sources can be used with service principals in resource shares. This operation provides visibility into source associations for resource share owners.

You can filter the results by resource share Amazon Resource Name (ARN), source ID, source type, or association status. We recommend using pagination to ensure that the operation returns quickly and successfully.

## Request Syntax
<a name="API_ListSourceAssociations_RequestSyntax"></a>

```
POST /listsourceassociations HTTP/1.1
Content-type: application/json

{
   "associationStatus": "string",
   "maxResults": number,
   "nextToken": "string",
   "resourceShareArns": [ "string" ],
   "sourceId": "string",
   "sourceType": "string"
}
```

## URI Request Parameters
<a name="API_ListSourceAssociations_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ListSourceAssociations_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [associationStatus](#API_ListSourceAssociations_RequestSyntax) **   <a name="ram-ListSourceAssociations-request-associationStatus"></a>
The status of the source associations that you want to retrieve.  
Type: String  
Valid Values: `ASSOCIATING | ASSOCIATED | FAILED | DISASSOCIATING | DISASSOCIATED | SUSPENDED | SUSPENDING | RESTORING`   
Required: No

 ** [maxResults](#API_ListSourceAssociations_RequestSyntax) **   <a name="ram-ListSourceAssociations-request-maxResults"></a>
The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned `nextToken` value.  
Type: Integer  
Valid Range: Minimum value of 1. Maximum value of 500.  
Required: No

 ** [nextToken](#API_ListSourceAssociations_RequestSyntax) **   <a name="ram-ListSourceAssociations-request-nextToken"></a>
The pagination token that indicates the next set of results to retrieve.  
Type: String  
Required: No

 ** [resourceShareArns](#API_ListSourceAssociations_RequestSyntax) **   <a name="ram-ListSourceAssociations-request-resourceShareArns"></a>
The Amazon Resource Names (ARNs) of the resource shares for which you want to retrieve source associations.  
Type: Array of strings  
Required: No

 ** [sourceId](#API_ListSourceAssociations_RequestSyntax) **   <a name="ram-ListSourceAssociations-request-sourceId"></a>
The identifier of the source for which you want to retrieve associations. This can be an account ID, Amazon Resource Name (ARN), organization ID, or organization path.  
Type: String  
Required: No

 ** [sourceType](#API_ListSourceAssociations_RequestSyntax) **   <a name="ram-ListSourceAssociations-request-sourceType"></a>
The type of source for which you want to retrieve associations.  
Type: String  
Required: No

## Response Syntax
<a name="API_ListSourceAssociations_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "nextToken": "string",
   "sourceAssociations": [ 
      { 
         "creationTime": number,
         "lastUpdatedTime": number,
         "resourceShareArn": "string",
         "sourceId": "string",
         "sourceType": "string",
         "status": "string",
         "statusMessage": "string"
      }
   ]
}
```

## Response Elements
<a name="API_ListSourceAssociations_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [nextToken](#API_ListSourceAssociations_ResponseSyntax) **   <a name="ram-ListSourceAssociations-response-nextToken"></a>
The pagination token to use to retrieve the next page of results. This value is `null` when there are no more results to return.  
Type: String

 ** [sourceAssociations](#API_ListSourceAssociations_ResponseSyntax) **   <a name="ram-ListSourceAssociations-response-sourceAssociations"></a>
Information about the source associations.  
Type: Array of [AssociatedSource](API_AssociatedSource.md) objects

## Errors
<a name="API_ListSourceAssociations_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidNextTokenException **   
The operation failed because the specified value for `NextToken` isn't valid. You must specify a value you received in the `NextToken` response of a previous call to this operation.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_ListSourceAssociations_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ListSourceAssociations) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ListSourceAssociations) 

# PromotePermissionCreatedFromPolicy
<a name="API_PromotePermissionCreatedFromPolicy"></a>

When you attach a resource-based policy to a resource, AWS RAM automatically creates a resource share of `featureSet`=`CREATED_FROM_POLICY` with a managed permission that has the same IAM permissions as the original resource-based policy. However, this type of managed permission is visible to only the resource share owner, and the associated resource share can't be modified by using AWS RAM.

This operation creates a separate, fully manageable customer managed permission that has the same IAM permissions as the original resource-based policy. You can associate this customer managed permission to any resource shares.

Before you use [PromoteResourceShareCreatedFromPolicy](API_PromoteResourceShareCreatedFromPolicy.md), you should first run this operation to ensure that you have an appropriate customer managed permission that can be associated with the promoted resource share.

**Note**  
The original `CREATED_FROM_POLICY` policy isn't deleted, and resource shares using that original policy aren't automatically updated.
You can't modify a `CREATED_FROM_POLICY` resource share so you can't associate the new customer managed permission by using `ReplacePermsissionAssociations`. However, if you use [PromoteResourceShareCreatedFromPolicy](API_PromoteResourceShareCreatedFromPolicy.md), that operation automatically associates the fully manageable customer managed permission to the newly promoted `STANDARD` resource share.
After you promote a resource share, if the original `CREATED_FROM_POLICY` managed permission has no other associations to A resource share, then AWS RAM automatically deletes it.

## Request Syntax
<a name="API_PromotePermissionCreatedFromPolicy_RequestSyntax"></a>

```
POST /promotepermissioncreatedfrompolicy HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "name": "string",
   "permissionArn": "string"
}
```

## URI Request Parameters
<a name="API_PromotePermissionCreatedFromPolicy_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_PromotePermissionCreatedFromPolicy_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [name](#API_PromotePermissionCreatedFromPolicy_RequestSyntax) **   <a name="ram-PromotePermissionCreatedFromPolicy-request-name"></a>
Specifies a name for the promoted customer managed permission.  
Type: String  
Required: Yes

 ** [permissionArn](#API_PromotePermissionCreatedFromPolicy_RequestSyntax) **   <a name="ram-PromotePermissionCreatedFromPolicy-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the `CREATED_FROM_POLICY` permission that you want to promote. You can get this [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) by calling the [ListResourceSharePermissions](API_ListResourceSharePermissions.md) operation.  
Type: String  
Required: Yes

 ** [clientToken](#API_PromotePermissionCreatedFromPolicy_RequestSyntax) **   <a name="ram-PromotePermissionCreatedFromPolicy-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

## Response Syntax
<a name="API_PromotePermissionCreatedFromPolicy_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "permission": { 
      "arn": "string",
      "creationTime": number,
      "defaultVersion": boolean,
      "featureSet": "string",
      "isResourceTypeDefault": boolean,
      "lastUpdatedTime": number,
      "name": "string",
      "permissionType": "string",
      "resourceType": "string",
      "status": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ],
      "version": "string"
   }
}
```

## Response Elements
<a name="API_PromotePermissionCreatedFromPolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_PromotePermissionCreatedFromPolicy_ResponseSyntax) **   <a name="ram-PromotePermissionCreatedFromPolicy-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [permission](#API_PromotePermissionCreatedFromPolicy_ResponseSyntax) **   <a name="ram-PromotePermissionCreatedFromPolicy-response-permission"></a>
Information about an AWS RAM permission.  
Type: [ResourceSharePermissionSummary](API_ResourceSharePermissionSummary.md) object

## Errors
<a name="API_PromotePermissionCreatedFromPolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidPolicyException **   
The operation failed because a policy you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** MissingRequiredParameterException **   
The operation failed because a required input parameter is missing.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_PromotePermissionCreatedFromPolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/PromotePermissionCreatedFromPolicy) 

# PromoteResourceShareCreatedFromPolicy
<a name="API_PromoteResourceShareCreatedFromPolicy"></a>

When you attach a resource-based policy to a resource, AWS RAM automatically creates a resource share of `featureSet`=`CREATED_FROM_POLICY` with a managed permission that has the same IAM permissions as the original resource-based policy. However, this type of managed permission is visible to only the resource share owner, and the associated resource share can't be modified by using AWS RAM.

This operation promotes the resource share to a `STANDARD` resource share that is fully manageable in AWS RAM. When you promote a resource share, you can then manage the resource share in AWS RAM and it becomes visible to all of the principals you shared it with.

**Important**  
Before you perform this operation, you should first run [PromotePermissionCreatedFromPolicy](API_PromotePermissionCreatedFromPolicy.md)to ensure that you have an appropriate customer managed permission that can be associated with this resource share after its is promoted. If this operation can't find a managed permission that exactly matches the existing `CREATED_FROM_POLICY` permission, then this operation fails.

## Request Syntax
<a name="API_PromoteResourceShareCreatedFromPolicy_RequestSyntax"></a>

```
POST /promoteresourcesharecreatedfrompolicy?resourceShareArn=resourceShareArn HTTP/1.1
```

## URI Request Parameters
<a name="API_PromoteResourceShareCreatedFromPolicy_RequestParameters"></a>

The request uses the following URI parameters.

 ** [resourceShareArn](#API_PromoteResourceShareCreatedFromPolicy_RequestSyntax) **   <a name="ram-PromoteResourceShareCreatedFromPolicy-request-uri-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share to promote.  
Required: Yes

## Request Body
<a name="API_PromoteResourceShareCreatedFromPolicy_RequestBody"></a>

The request does not have a request body.

## Response Syntax
<a name="API_PromoteResourceShareCreatedFromPolicy_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "returnValue": boolean
}
```

## Response Elements
<a name="API_PromoteResourceShareCreatedFromPolicy_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [returnValue](#API_PromoteResourceShareCreatedFromPolicy_ResponseSyntax) **   <a name="ram-PromoteResourceShareCreatedFromPolicy-response-returnValue"></a>
A return value of `true` indicates that the request succeeded. A value of `false` indicates that the request failed.  
Type: Boolean

## Errors
<a name="API_PromoteResourceShareCreatedFromPolicy_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** InvalidStateTransitionException **   
The operation failed because the requested operation isn't valid for the resource share in its current state.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** MissingRequiredParameterException **   
The operation failed because a required input parameter is missing.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ResourceShareLimitExceededException **   
The operation failed because it would exceed the limit for resource shares for your account. You can associate up to 100 resources per call. To view the limits for your AWS account, see the [AWS RAM page in the Service Quotas console](https://console.aws.amazon.com/servicequotas/home/services/ram/quotas).  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

 ** UnmatchedPolicyPermissionException **   
There isn't an existing managed permission defined in AWS RAM that has the same IAM permissions as the resource-based policy attached to the resource. You should first run [PromotePermissionCreatedFromPolicy](API_PromotePermissionCreatedFromPolicy.md) to create that managed permission.  
HTTP Status Code: 400

## See Also
<a name="API_PromoteResourceShareCreatedFromPolicy_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/PromoteResourceShareCreatedFromPolicy) 

# RejectResourceShareInvitation
<a name="API_RejectResourceShareInvitation"></a>

Rejects an invitation to a resource share from another AWS account.

## Request Syntax
<a name="API_RejectResourceShareInvitation_RequestSyntax"></a>

```
POST /rejectresourceshareinvitation HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "resourceShareInvitationArn": "string"
}
```

## URI Request Parameters
<a name="API_RejectResourceShareInvitation_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_RejectResourceShareInvitation_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareInvitationArn](#API_RejectResourceShareInvitation_RequestSyntax) **   <a name="ram-RejectResourceShareInvitation-request-resourceShareInvitationArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the invitation that you want to reject.  
Type: String  
Required: Yes

 ** [clientToken](#API_RejectResourceShareInvitation_RequestSyntax) **   <a name="ram-RejectResourceShareInvitation-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

## Response Syntax
<a name="API_RejectResourceShareInvitation_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "resourceShareInvitation": { 
      "invitationTimestamp": number,
      "receiverAccountId": "string",
      "receiverArn": "string",
      "resourceShareArn": "string",
      "resourceShareAssociations": [ 
         { 
            "associatedEntity": "string",
            "associationType": "string",
            "creationTime": number,
            "external": boolean,
            "lastUpdatedTime": number,
            "resourceShareArn": "string",
            "resourceShareName": "string",
            "status": "string",
            "statusMessage": "string"
         }
      ],
      "resourceShareInvitationArn": "string",
      "resourceShareName": "string",
      "senderAccountId": "string",
      "status": "string"
   }
}
```

## Response Elements
<a name="API_RejectResourceShareInvitation_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_RejectResourceShareInvitation_ResponseSyntax) **   <a name="ram-RejectResourceShareInvitation-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [resourceShareInvitation](#API_RejectResourceShareInvitation_ResponseSyntax) **   <a name="ram-RejectResourceShareInvitation-response-resourceShareInvitation"></a>
An object that contains the details about the rejected invitation.  
Type: [ResourceShareInvitation](API_ResourceShareInvitation.md) object

## Errors
<a name="API_RejectResourceShareInvitation_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ResourceShareInvitationAlreadyAcceptedException **   
The operation failed because the specified invitation was already accepted.  
HTTP Status Code: 400

 ** ResourceShareInvitationAlreadyRejectedException **   
The operation failed because the specified invitation was already rejected.  
HTTP Status Code: 400

 ** ResourceShareInvitationArnNotFoundException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for an invitation was not found.  
HTTP Status Code: 400

 ** ResourceShareInvitationExpiredException **   
The operation failed because the specified invitation is past its expiration date and time.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

## See Also
<a name="API_RejectResourceShareInvitation_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/RejectResourceShareInvitation) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/RejectResourceShareInvitation) 

# ReplacePermissionAssociations
<a name="API_ReplacePermissionAssociations"></a>

Updates all resource shares that use a managed permission to a different managed permission. This operation always applies the default version of the target managed permission. You can optionally specify that the update applies to only resource shares that currently use a specified version. This enables you to update to the latest version, without changing the which managed permission is used.

You can use this operation to update all of your resource shares to use the current default version of the permission by specifying the same value for the `fromPermissionArn` and `toPermissionArn` parameters.

You can use the optional `fromPermissionVersion` parameter to update only those resources that use a specified version of the managed permission to the new managed permission.

**Important**  
To successfully perform this operation, you must have permission to update the resource-based policy on all affected resource types.

## Request Syntax
<a name="API_ReplacePermissionAssociations_RequestSyntax"></a>

```
POST /replacepermissionassociations HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "fromPermissionArn": "string",
   "fromPermissionVersion": number,
   "toPermissionArn": "string"
}
```

## URI Request Parameters
<a name="API_ReplacePermissionAssociations_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_ReplacePermissionAssociations_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [fromPermissionArn](#API_ReplacePermissionAssociations_RequestSyntax) **   <a name="ram-ReplacePermissionAssociations-request-fromPermissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the managed permission that you want to replace.  
Type: String  
Required: Yes

 ** [toPermissionArn](#API_ReplacePermissionAssociations_RequestSyntax) **   <a name="ram-ReplacePermissionAssociations-request-toPermissionArn"></a>
Specifies the ARN of the managed permission that you want to associate with resource shares in place of the one specified by `fromPerssionArn` and `fromPermissionVersion`.  
The operation always associates the version that is currently the default for the specified managed permission.  
Type: String  
Required: Yes

 ** [clientToken](#API_ReplacePermissionAssociations_RequestSyntax) **   <a name="ram-ReplacePermissionAssociations-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [fromPermissionVersion](#API_ReplacePermissionAssociations_RequestSyntax) **   <a name="ram-ReplacePermissionAssociations-request-fromPermissionVersion"></a>
Specifies that you want to updated the permissions for only those resource shares that use the specified version of the managed permission.  
Type: Integer  
Required: No

## Response Syntax
<a name="API_ReplacePermissionAssociations_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "replacePermissionAssociationsWork": { 
      "creationTime": number,
      "fromPermissionArn": "string",
      "fromPermissionVersion": "string",
      "id": "string",
      "lastUpdatedTime": number,
      "status": "string",
      "statusMessage": "string",
      "toPermissionArn": "string",
      "toPermissionVersion": "string"
   }
}
```

## Response Elements
<a name="API_ReplacePermissionAssociations_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_ReplacePermissionAssociations_ResponseSyntax) **   <a name="ram-ReplacePermissionAssociations-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [replacePermissionAssociationsWork](#API_ReplacePermissionAssociations_ResponseSyntax) **   <a name="ram-ReplacePermissionAssociations-response-replacePermissionAssociationsWork"></a>
Specifies a data structure that you can use to track the asynchronous tasks that AWS RAM performs to complete this operation. You can use the [ListReplacePermissionAssociationsWork](API_ListReplacePermissionAssociationsWork.md) operation and pass the `id` value returned in this structure.  
Type: [ReplacePermissionAssociationsWork](API_ReplacePermissionAssociationsWork.md) object

## Errors
<a name="API_ReplacePermissionAssociations_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_ReplacePermissionAssociations_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/ReplacePermissionAssociations) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/ReplacePermissionAssociations) 

# SetDefaultPermissionVersion
<a name="API_SetDefaultPermissionVersion"></a>

Designates the specified version number as the default version for the specified customer managed permission. New resource shares automatically use this new default permission. Existing resource shares continue to use their original permission version, but you can use [ReplacePermissionAssociations](API_ReplacePermissionAssociations.md) to update them.

## Request Syntax
<a name="API_SetDefaultPermissionVersion_RequestSyntax"></a>

```
POST /setdefaultpermissionversion HTTP/1.1
Content-type: application/json

{
   "clientToken": "string",
   "permissionArn": "string",
   "permissionVersion": number
}
```

## URI Request Parameters
<a name="API_SetDefaultPermissionVersion_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_SetDefaultPermissionVersion_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [permissionArn](#API_SetDefaultPermissionVersion_RequestSyntax) **   <a name="ram-SetDefaultPermissionVersion-request-permissionArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the customer managed permission whose default version you want to change.  
Type: String  
Required: Yes

 ** [permissionVersion](#API_SetDefaultPermissionVersion_RequestSyntax) **   <a name="ram-SetDefaultPermissionVersion-request-permissionVersion"></a>
Specifies the version number that you want to designate as the default for customer managed permission. To see a list of all available version numbers, use [ListPermissionVersions](API_ListPermissionVersions.md).  
Type: Integer  
Required: Yes

 ** [clientToken](#API_SetDefaultPermissionVersion_RequestSyntax) **   <a name="ram-SetDefaultPermissionVersion-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

## Response Syntax
<a name="API_SetDefaultPermissionVersion_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "returnValue": boolean
}
```

## Response Elements
<a name="API_SetDefaultPermissionVersion_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_SetDefaultPermissionVersion_ResponseSyntax) **   <a name="ram-SetDefaultPermissionVersion-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [returnValue](#API_SetDefaultPermissionVersion_ResponseSyntax) **   <a name="ram-SetDefaultPermissionVersion-response-returnValue"></a>
A boolean value that indicates whether the operation was successful.  
Type: Boolean

## Errors
<a name="API_SetDefaultPermissionVersion_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_SetDefaultPermissionVersion_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/SetDefaultPermissionVersion) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/SetDefaultPermissionVersion) 

# TagResource
<a name="API_TagResource"></a>

Adds the specified tag keys and values to a resource share or managed permission. If you choose a resource share, the tags are attached to only the resource share, not to the resources that are in the resource share.

The tags on a managed permission are the same for all versions of the managed permission.

## Request Syntax
<a name="API_TagResource_RequestSyntax"></a>

```
POST /tagresource HTTP/1.1
Content-type: application/json

{
   "resourceArn": "string",
   "resourceShareArn": "string",
   "tags": [ 
      { 
         "key": "string",
         "value": "string"
      }
   ]
}
```

## URI Request Parameters
<a name="API_TagResource_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_TagResource_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [tags](#API_TagResource_RequestSyntax) **   <a name="ram-TagResource-request-tags"></a>
A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.  
Type: Array of [Tag](API_Tag.md) objects  
Required: Yes

 ** [resourceArn](#API_TagResource_RequestSyntax) **   <a name="ram-TagResource-request-resourceArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the managed permission that you want to add tags to. You must specify *either* `resourceArn`, or `resourceShareArn`, but not both.  
Type: String  
Required: No

 ** [resourceShareArn](#API_TagResource_RequestSyntax) **   <a name="ram-TagResource-request-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share that you want to add tags to. You must specify *either* `resourceShareArn`, or `resourceArn`, but not both.  
Type: String  
Required: No

## Response Syntax
<a name="API_TagResource_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_TagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_TagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ResourceArnNotFoundException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) was not found.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** TagLimitExceededException **   
The operation failed because it would exceed the limit for tags for your AWS account.  
HTTP Status Code: 400

 ** TagPolicyViolationException **   
The operation failed because the specified tag key is a reserved word and can't be used.  
HTTP Status Code: 400

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_TagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/TagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/TagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/TagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/TagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/TagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/TagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/TagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/TagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/TagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/TagResource) 

# UntagResource
<a name="API_UntagResource"></a>

Removes the specified tag key and value pairs from the specified resource share or managed permission.

## Request Syntax
<a name="API_UntagResource_RequestSyntax"></a>

```
POST /untagresource HTTP/1.1
Content-type: application/json

{
   "resourceArn": "string",
   "resourceShareArn": "string",
   "tagKeys": [ "string" ]
}
```

## URI Request Parameters
<a name="API_UntagResource_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UntagResource_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [tagKeys](#API_UntagResource_RequestSyntax) **   <a name="ram-UntagResource-request-tagKeys"></a>
Specifies a list of one or more tag keys that you want to remove.  
Type: Array of strings  
Required: Yes

 ** [resourceArn](#API_UntagResource_RequestSyntax) **   <a name="ram-UntagResource-request-resourceArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the managed permission that you want to remove tags from. You must specify either `resourceArn`, or `resourceShareArn`, but not both.  
Type: String  
Required: No

 ** [resourceShareArn](#API_UntagResource_RequestSyntax) **   <a name="ram-UntagResource-request-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share. You must specify either `resourceShareArn`, or `resourceArn`, but not both.  
Type: String  
Required: No

## Response Syntax
<a name="API_UntagResource_ResponseSyntax"></a>

```
HTTP/1.1 200
```

## Response Elements
<a name="API_UntagResource_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.

## Errors
<a name="API_UntagResource_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_UntagResource_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/UntagResource) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/UntagResource) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/UntagResource) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/UntagResource) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/UntagResource) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/UntagResource) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/UntagResource) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/UntagResource) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/UntagResource) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/UntagResource) 

# UpdateResourceShare
<a name="API_UpdateResourceShare"></a>

Modifies some of the properties of the specified resource share.

## Request Syntax
<a name="API_UpdateResourceShare_RequestSyntax"></a>

```
POST /updateresourceshare HTTP/1.1
Content-type: application/json

{
   "allowExternalPrincipals": boolean,
   "clientToken": "string",
   "name": "string",
   "resourceShareArn": "string"
}
```

## URI Request Parameters
<a name="API_UpdateResourceShare_RequestParameters"></a>

The request does not use any URI parameters.

## Request Body
<a name="API_UpdateResourceShare_RequestBody"></a>

The request accepts the following data in JSON format.

 ** [resourceShareArn](#API_UpdateResourceShare_RequestSyntax) **   <a name="ram-UpdateResourceShare-request-resourceShareArn"></a>
Specifies the [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of the resource share that you want to modify.  
Type: String  
Required: Yes

 ** [allowExternalPrincipals](#API_UpdateResourceShare_RequestSyntax) **   <a name="ram-UpdateResourceShare-request-allowExternalPrincipals"></a>
Specifies whether principals outside your organization in AWS Organizations can be associated with a resource share.  
Type: Boolean  
Required: No

 ** [clientToken](#API_UpdateResourceShare_RequestSyntax) **   <a name="ram-UpdateResourceShare-request-clientToken"></a>
Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other parameters. We recommend that you use a [UUID type of value.](https://wikipedia.org/wiki/Universally_unique_identifier).  
If you don't provide this value, then AWS generates a random one for you.  
If you retry the operation with the same `ClientToken`, but with different parameters, the retry fails with an `IdempotentParameterMismatch` error.  
Type: String  
Required: No

 ** [name](#API_UpdateResourceShare_RequestSyntax) **   <a name="ram-UpdateResourceShare-request-name"></a>
If specified, the new name that you want to attach to the resource share.  
Type: String  
Required: No

## Response Syntax
<a name="API_UpdateResourceShare_ResponseSyntax"></a>

```
HTTP/1.1 200
Content-type: application/json

{
   "clientToken": "string",
   "resourceShare": { 
      "allowExternalPrincipals": boolean,
      "creationTime": number,
      "featureSet": "string",
      "lastUpdatedTime": number,
      "name": "string",
      "owningAccountId": "string",
      "resourceShareArn": "string",
      "resourceShareConfiguration": { 
         "retainSharingOnAccountLeaveOrganization": boolean
      },
      "status": "string",
      "statusMessage": "string",
      "tags": [ 
         { 
            "key": "string",
            "value": "string"
         }
      ]
   }
}
```

## Response Elements
<a name="API_UpdateResourceShare_ResponseElements"></a>

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

 ** [clientToken](#API_UpdateResourceShare_ResponseSyntax) **   <a name="ram-UpdateResourceShare-response-clientToken"></a>
The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the `clientToken` request parameter of that later call. All other parameters must also have the same values that you used in the first call.  
Type: String

 ** [resourceShare](#API_UpdateResourceShare_ResponseSyntax) **   <a name="ram-UpdateResourceShare-response-resourceShare"></a>
Information about the resource share.  
Type: [ResourceShare](API_ResourceShare.md) object

## Errors
<a name="API_UpdateResourceShare_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** IdempotentParameterMismatchException **   
The operation failed because the client token input parameter matched one that was used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.  
HTTP Status Code: 400

 ** InvalidClientTokenException **   
The operation failed because the specified client token isn't valid.  
HTTP Status Code: 400

 ** InvalidParameterException **   
The operation failed because a parameter you specified isn't valid.  
HTTP Status Code: 400

 ** MalformedArnException **   
The operation failed because the specified [Amazon Resource Name (ARN)](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) has a format that isn't valid.  
HTTP Status Code: 400

 ** MissingRequiredParameterException **   
The operation failed because a required input parameter is missing.  
HTTP Status Code: 400

 ** OperationNotPermittedException **   
The operation failed because the requested operation isn't permitted.  
HTTP Status Code: 400

 ** ServerInternalException **   
The operation failed because the service could not respond to the request due to an internal problem. Try again later.  
HTTP Status Code: 500

 ** ServiceUnavailableException **   
The operation failed because the service isn't available. Try again later.  
HTTP Status Code: 503

 ** UnknownResourceException **   
The operation failed because a specified resource couldn't be found.  
HTTP Status Code: 400

## See Also
<a name="API_UpdateResourceShare_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/ram-2018-01-04/UpdateResourceShare) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/ram-2018-01-04/UpdateResourceShare) 