executeProvisionedProductServiceAction method
Executes a self-service action against a provisioned product.
May throw InvalidParametersException. May throw ResourceNotFoundException. May throw InvalidStateException.
Parameter provisionedProductId
:
The identifier of the provisioned product.
Parameter serviceActionId
:
The self-service action identifier. For example,
act-fs7abcd89wxyz
.
Parameter acceptLanguage
:
The language code.
-
en
- English (default) -
jp
- Japanese -
zh
- Chinese
Parameter executeToken
:
An idempotency token that uniquely identifies the execute request.
Parameter parameters
:
A map of all self-service action parameters and their values. If a
provided parameter is of a special type, such as TARGET
, the
provided value will override the default value generated by AWS Service
Catalog. If the parameters field is not provided, no additional parameters
are passed and default values will be used for any special parameters such
as TARGET
.
Implementation
Future<ExecuteProvisionedProductServiceActionOutput>
executeProvisionedProductServiceAction({
required String provisionedProductId,
required String serviceActionId,
String? acceptLanguage,
String? executeToken,
Map<String, List<String>>? parameters,
}) async {
ArgumentError.checkNotNull(provisionedProductId, 'provisionedProductId');
_s.validateStringLength(
'provisionedProductId',
provisionedProductId,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(serviceActionId, 'serviceActionId');
_s.validateStringLength(
'serviceActionId',
serviceActionId,
1,
100,
isRequired: true,
);
_s.validateStringLength(
'acceptLanguage',
acceptLanguage,
0,
100,
);
_s.validateStringLength(
'executeToken',
executeToken,
1,
128,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWS242ServiceCatalogService.ExecuteProvisionedProductServiceAction'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProvisionedProductId': provisionedProductId,
'ServiceActionId': serviceActionId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
'ExecuteToken': executeToken ?? _s.generateIdempotencyToken(),
if (parameters != null) 'Parameters': parameters,
},
);
return ExecuteProvisionedProductServiceActionOutput.fromJson(
jsonResponse.body);
}