UpdatePackageScope - Amazon OpenSearch Service

UpdatePackageScope

Updates the scope of a package. Scope of the package defines users who can view and associate a package.

Request Syntax

POST /2021-01-01/packages/updateScope HTTP/1.1 Content-type: application/json { "Operation": "string", "PackageID": "string", "PackageUserList": [ "string" ] }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

Operation

The operation to perform on the package scope (e.g., add/remove/override users).

Type: String

Valid Values: ADD | OVERRIDE | REMOVE

Required: Yes

PackageID

ID of the package whose scope is being updated.

Type: String

Pattern: ^([FG][0-9]+)$|^(pkg-[a-f0-9]+)$

Required: Yes

PackageUserList

List of users to be added or removed from the package scope.

Type: Array of strings

Length Constraints: Minimum length of 6. Maximum length of 12.

Pattern: ^[0-9]{12}$|^GLOBAL$

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Operation": "string", "PackageID": "string", "PackageUserList": [ "string" ] }

Response Elements

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

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

Operation

The operation that was performed on the package scope.

Type: String

Valid Values: ADD | OVERRIDE | REMOVE

PackageID

ID of the package whose scope was updated.

Type: String

Pattern: ^([FG][0-9]+)$|^(pkg-[a-f0-9]+)$

PackageUserList

List of users who have access to the package after the scope update.

Type: Array of strings

Length Constraints: Minimum length of 6. Maximum length of 12.

Pattern: ^[0-9]{12}$|^GLOBAL$

Errors

For information about the errors that are common to all actions, see Common Errors.

BaseException

An error occurred while processing the request.

HTTP Status Code: 400

DisabledOperationException

An error occured because the client wanted to access an unsupported operation.

HTTP Status Code: 409

InternalException

Request processing failed because of an unknown error, exception, or internal failure.

HTTP Status Code: 500

ResourceNotFoundException

An exception for accessing or deleting a resource that doesn't exist.

HTTP Status Code: 409

ValidationException

An exception for accessing or deleting a resource that doesn't exist.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: