associatePackage method
Associates a package with an Amazon ES domain.
May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw AccessDeniedException. May throw ValidationException. May throw ConflictException.
Parameter domainName
:
Name of the domain that you want to associate the package with.
Parameter packageID
:
Internal ID of the package that you want to associate with a domain. Use
DescribePackages
to find this value.
Implementation
Future<AssociatePackageResponse> associatePackage({
required String domainName,
required String packageID,
}) async {
ArgumentError.checkNotNull(domainName, 'domainName');
_s.validateStringLength(
'domainName',
domainName,
3,
28,
isRequired: true,
);
ArgumentError.checkNotNull(packageID, 'packageID');
final response = await _protocol.send(
payload: null,
method: 'POST',
requestUri:
'/2015-01-01/packages/associate/${Uri.encodeComponent(packageID)}/${Uri.encodeComponent(domainName)}',
exceptionFnMap: _exceptionFns,
);
return AssociatePackageResponse.fromJson(response);
}