provisionProduct method
- required String provisionedProductName,
- String? acceptLanguage,
- List<
String> ? notificationArns, - String? pathId,
- String? pathName,
- String? productId,
- String? productName,
- String? provisionToken,
- String? provisioningArtifactId,
- String? provisioningArtifactName,
- List<
ProvisioningParameter> ? provisioningParameters, - ProvisioningPreferences? provisioningPreferences,
- List<
Tag> ? tags,
Provisions the specified product.
A provisioned product is a resourced instance of a product. For example, provisioning a product that's based on an CloudFormation template launches an CloudFormation stack and its underlying resources. You can check the status of this request using DescribeRecord.
If the request contains a tag key with an empty list of values, there's a tag conflict for that key. Don't include conflicted keys as tags, or this will cause the error "Parameter validation failed: Missing required parameter in Tags[N]:Value".
May throw DuplicateResourceException.
May throw InvalidParametersException.
May throw ResourceNotFoundException.
Parameter provisionedProductName :
A user-friendly name for the provisioned product. This value must be
unique for the Amazon Web Services account and cannot be updated after the
product is provisioned.
Parameter acceptLanguage :
The language code.
-
jp- Japanese -
zh- Chinese
Parameter notificationArns :
Passed to CloudFormation. The SNS topic ARNs to which to publish
stack-related events.
Parameter pathId :
The path identifier of the product. This value is optional if the product
has a default path, and required if the product has more than one path. To
list the paths for a product, use ListLaunchPaths. You must provide
the name or ID, but not both.
Parameter pathName :
The name of the path. You must provide the name or ID, but not both.
Parameter productId :
The product identifier. You must provide the name or ID, but not both.
Parameter productName :
The name of the product. You must provide the name or ID, but not both.
Parameter provisionToken :
An idempotency token that uniquely identifies the provisioning request.
Parameter provisioningArtifactId :
The identifier of the provisioning artifact. You must provide the name or
ID, but not both.
Parameter provisioningArtifactName :
The name of the provisioning artifact. You must provide the name or ID,
but not both.
Parameter provisioningParameters :
Parameters specified by the administrator that are required for
provisioning the product.
Parameter provisioningPreferences :
An object that contains information about the provisioning preferences for
a stack set.
Parameter tags :
One or more tags.
Implementation
Future<ProvisionProductOutput> provisionProduct({
required String provisionedProductName,
String? acceptLanguage,
List<String>? notificationArns,
String? pathId,
String? pathName,
String? productId,
String? productName,
String? provisionToken,
String? provisioningArtifactId,
String? provisioningArtifactName,
List<ProvisioningParameter>? provisioningParameters,
ProvisioningPreferences? provisioningPreferences,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWS242ServiceCatalogService.ProvisionProduct'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProvisionedProductName': provisionedProductName,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
if (notificationArns != null) 'NotificationArns': notificationArns,
if (pathId != null) 'PathId': pathId,
if (pathName != null) 'PathName': pathName,
if (productId != null) 'ProductId': productId,
if (productName != null) 'ProductName': productName,
'ProvisionToken': provisionToken ?? _s.generateIdempotencyToken(),
if (provisioningArtifactId != null)
'ProvisioningArtifactId': provisioningArtifactId,
if (provisioningArtifactName != null)
'ProvisioningArtifactName': provisioningArtifactName,
if (provisioningParameters != null)
'ProvisioningParameters': provisioningParameters,
if (provisioningPreferences != null)
'ProvisioningPreferences': provisioningPreferences,
if (tags != null) 'Tags': tags,
},
);
return ProvisionProductOutput.fromJson(jsonResponse.body);
}