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 based on a CloudFormation template launches a 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 is a
tag conflict for that key. Do not include conflicted keys as tags, or this
causes the error "Parameter validation failed: Missing required parameter
in Tags<i>N</i>
:Value".
May throw InvalidParametersException. May throw ResourceNotFoundException. May throw DuplicateResourceException.
Parameter provisionedProductName
:
A user-friendly name for the provisioned product. This value must be
unique for the AWS account and cannot be updated after the product is
provisioned.
Parameter acceptLanguage
:
The language code.
-
en
- English (default) -
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 {
ArgumentError.checkNotNull(
provisionedProductName, 'provisionedProductName');
_s.validateStringLength(
'provisionedProductName',
provisionedProductName,
1,
128,
isRequired: true,
);
_s.validateStringLength(
'acceptLanguage',
acceptLanguage,
0,
100,
);
_s.validateStringLength(
'pathId',
pathId,
1,
100,
);
_s.validateStringLength(
'pathName',
pathName,
1,
100,
);
_s.validateStringLength(
'productId',
productId,
1,
100,
);
_s.validateStringLength(
'productName',
productName,
0,
8191,
);
_s.validateStringLength(
'provisionToken',
provisionToken,
1,
128,
);
_s.validateStringLength(
'provisioningArtifactId',
provisioningArtifactId,
1,
100,
);
_s.validateStringLength(
'provisioningArtifactName',
provisioningArtifactName,
0,
8192,
);
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);
}