Skip to main content

packages

Creates, updates, deletes, gets or lists a packages resource.

Overview

Namepackages
TypeResource
Idaws.opensearch.packages

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
next_tokenstringWhen nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Send the request again using the returned token to retrieve the next page.
package_details_listarrayBasic information about a package.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_packagesselectregionDescribes all packages available to OpenSearch Service. For more information, see Custom packages for Amazon OpenSearch Service.
create_packageinsertregion, PackageName, PackageType, PackageSourceCreates a package for use with Amazon OpenSearch Service domains. For more information, see Custom packages for Amazon OpenSearch Service.
associate_packageupdatepackage_id, domain_name, regionAssociates a package with an Amazon OpenSearch Service domain. For more information, see Custom packages for Amazon OpenSearch Service.
associate_packagesupdateregion, PackageList, DomainNameOperation in the Amazon OpenSearch Service API for associating multiple packages with a domain simultaneously.
update_packageupdateregion, PackageID, PackageSourceUpdates a package for use with Amazon OpenSearch Service domains. For more information, see Custom packages for Amazon OpenSearch Service.
update_package_scopeupdateregion, PackageID, PackageUserListUpdates the scope of a package. Scope of the package defines users who can view and associate a package.
delete_packagedeletepackage_id, regionDeletes an Amazon OpenSearch Service package. For more information, see Custom packages for Amazon OpenSearch Service.
dissociate_packageexecpackage_id, domain_name, regionRemoves a package from the specified Amazon OpenSearch Service domain. The package can't be in use with any OpenSearch index for the dissociation to succeed. The package is still available in OpenSearch Service for association later. For more information, see Custom packages for Amazon OpenSearch Service.
dissociate_packagesexecregion, PackageList, DomainNameDissociates multiple packages from a domain simultaneously.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
domain_namestringName of the domain to dissociate the package from.
package_idstringInternal ID of the package to dissociate from the domain. Use ListPackagesForDomain to find this value.
regionstringAWS region (default: us-east-1)

SELECT examples

Describes all packages available to OpenSearch Service. For more information, see Custom packages for Amazon OpenSearch Service.

SELECT
next_token,
package_details_list
FROM aws.opensearch.packages
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a package for use with Amazon OpenSearch Service domains. For more information, see Custom packages for Amazon OpenSearch Service.

INSERT INTO aws.opensearch.packages (
PackageName,
PackageType,
PackageDescription,
PackageSource,
PackageConfiguration,
EngineVersion,
PackageVendingOptions,
PackageEncryptionOptions,
region
)
SELECT
'{{ PackageName }}' /* required */,
'{{ PackageType }}' /* required */,
'{{ PackageDescription }}',
'{{ PackageSource }}' /* required */,
'{{ PackageConfiguration }}',
'{{ EngineVersion }}',
'{{ PackageVendingOptions }}',
'{{ PackageEncryptionOptions }}',
'{{ region }}'
RETURNING
package_details
;

UPDATE examples

Associates a package with an Amazon OpenSearch Service domain. For more information, see Custom packages for Amazon OpenSearch Service.

UPDATE aws.opensearch.packages
SET
PrerequisitePackageIDList = '{{ PrerequisitePackageIDList }}',
AssociationConfiguration = '{{ AssociationConfiguration }}'
WHERE
package_id = '{{ package_id }}' --required
AND domain_name = '{{ domain_name }}' --required
AND region = '{{ region }}' --required
RETURNING
domain_package_details;

DELETE examples

Deletes an Amazon OpenSearch Service package. For more information, see Custom packages for Amazon OpenSearch Service.

DELETE FROM aws.opensearch.packages
WHERE package_id = '{{ package_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Removes a package from the specified Amazon OpenSearch Service domain. The package can't be in use with any OpenSearch index for the dissociation to succeed. The package is still available in OpenSearch Service for association later. For more information, see Custom packages for Amazon OpenSearch Service.

EXEC aws.opensearch.packages.dissociate_package
@package_id='{{ package_id }}' --required,
@domain_name='{{ domain_name }}' --required,
@region='{{ region }}' --required
;