Jump to Content

This API Documentation is now deprecated

We are excited to announce our new API Documentation.

Class DisassociateResourceShareCommandProtected

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

Example

Use a bare-bones client and the command you need to make an API call.

import { RAMClient, DisassociateResourceShareCommand } from "@aws-sdk/client-ram"; // ES Modules import
// const { RAMClient, DisassociateResourceShareCommand } = require("@aws-sdk/client-ram"); // CommonJS import
const client = new RAMClient(config);
const input = { // DisassociateResourceShareRequest
resourceShareArn: "STRING_VALUE", // required
resourceArns: [ // ResourceArnList
"STRING_VALUE",
],
principals: [ // PrincipalArnOrIdList
"STRING_VALUE",
],
clientToken: "STRING_VALUE",
sources: [ // SourceArnOrAccountList
"STRING_VALUE",
],
};
const command = new DisassociateResourceShareCommand(input);
const response = await client.send(command);
// { // DisassociateResourceShareResponse
// resourceShareAssociations: [ // ResourceShareAssociationList
// { // ResourceShareAssociation
// resourceShareArn: "STRING_VALUE",
// resourceShareName: "STRING_VALUE",
// associatedEntity: "STRING_VALUE",
// associationType: "PRINCIPAL" || "RESOURCE",
// status: "ASSOCIATING" || "ASSOCIATED" || "FAILED" || "DISASSOCIATING" || "DISASSOCIATED",
// statusMessage: "STRING_VALUE",
// creationTime: new Date("TIMESTAMP"),
// lastUpdatedTime: new Date("TIMESTAMP"),
// external: true || false,
// },
// ],
// clientToken: "STRING_VALUE",
// };

Param

DisassociateResourceShareCommandInput

Returns

DisassociateResourceShareCommandOutput

See

Throws

IdempotentParameterMismatchException (client fault)

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.

Throws

InvalidClientTokenException (client fault)

The operation failed because the specified client token isn't valid.

Throws

InvalidParameterException (client fault)

The operation failed because a parameter you specified isn't valid.

Throws

InvalidStateTransitionException (client fault)

The operation failed because the requested operation isn't valid for the resource share in its current state.

Throws

MalformedArnException (client fault)

The operation failed because the specified Amazon Resource Name (ARN) has a format that isn't valid.

Throws

OperationNotPermittedException (client fault)

The operation failed because the requested operation isn't permitted.

Throws

ResourceShareLimitExceededException (client fault)

The operation failed because it would exceed the limit for resource shares for your account. To view the limits for your Amazon Web Services account, see the RAM page in the Service Quotas console.

Throws

ServerInternalException (server fault)

The operation failed because the service could not respond to the request due to an internal problem. Try again later.

Throws

ServiceUnavailableException (server fault)

The operation failed because the service isn't available. Try again later.

Throws

UnknownResourceException (client fault)

The operation failed because a specified resource couldn't be found.

Throws

RAMServiceException

Base exception class for all service exceptions from RAM service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods