associatePackage method
Associates a package with an Amazon OpenSearch Service domain. For more information, see Custom packages for Amazon OpenSearch Service.
May throw AccessDeniedException.
May throw BaseException.
May throw ConflictException.
May throw InternalException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter domainName :
Name of the domain to associate the package with.
Parameter packageID :
Internal ID of the package to associate with a domain. Use
DescribePackages to find this value.
Parameter associationConfiguration :
The configuration for associating a package with an Amazon OpenSearch
Service domain.
Parameter prerequisitePackageIDList :
A list of package IDs that must be associated with the domain before the
package specified in the request can be associated.
Implementation
Future<AssociatePackageResponse> associatePackage({
required String domainName,
required String packageID,
PackageAssociationConfiguration? associationConfiguration,
List<String>? prerequisitePackageIDList,
}) async {
final $payload = <String, dynamic>{
if (associationConfiguration != null)
'AssociationConfiguration': associationConfiguration,
if (prerequisitePackageIDList != null)
'PrerequisitePackageIDList': prerequisitePackageIDList,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/2021-01-01/packages/associate/${Uri.encodeComponent(packageID)}/${Uri.encodeComponent(domainName)}',
exceptionFnMap: _exceptionFns,
);
return AssociatePackageResponse.fromJson(response);
}