associateTagOptionWithResource method
Associate the specified TagOption with the specified portfolio or product.
May throw TagOptionNotMigratedException. May throw ResourceNotFoundException. May throw InvalidParametersException. May throw LimitExceededException. May throw DuplicateResourceException. May throw InvalidStateException.
Parameter resourceId
:
The resource identifier.
Parameter tagOptionId
:
The TagOption identifier.
Implementation
Future<void> associateTagOptionWithResource({
required String resourceId,
required String tagOptionId,
}) async {
ArgumentError.checkNotNull(resourceId, 'resourceId');
ArgumentError.checkNotNull(tagOptionId, 'tagOptionId');
_s.validateStringLength(
'tagOptionId',
tagOptionId,
1,
100,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWS242ServiceCatalogService.AssociateTagOptionWithResource'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ResourceId': resourceId,
'TagOptionId': tagOptionId,
},
);
}