Enables resource sharing for a resource directory.

Usage notes

You can share your resources with all members in your resource directory, all members in a specific folder in your resource directory, or a specific member in your resource directory as a resource owner only after you enable resource sharing for your resource directory.

You can call this API operation only by using the management account of your resource directory or a RAM user or RAM role to which the required permissions are granted within the management account.


You can call this operation up to 10 times per second per account. This operation is globally limited to 500 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes EnableSharingWithResourceDirectory

The operation that you want to perform. Set the value to EnableSharingWithResourceDirectory.

For more information about common request parameters, see Common parameters.

Response parameters

Parameter Type Example Description
RequestId String 2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "RequestId" : "2F23CFB6-A721-4E90-AC1E-0E30FA8B45DA"

Error codes

HTTP status code Error code Error message Description
409 ActionNotPermitted The caller must be the master account for the Resource Directory. The error message returned because only the management account of a resource directory can be used to call this API operation.
409 AlreadyEnabled You have already enabled sharing with the Resource Directory. The error message returned because resource sharing is already enabled for the resource directory.

For a list of error codes, visit the API Error Center.