createProvisionedProductPlan method
- required String planName,
- required ProvisionedProductPlanType planType,
- required String productId,
- required String provisionedProductName,
- required String provisioningArtifactId,
- String? acceptLanguage,
- String? idempotencyToken,
- List<
String> ? notificationArns, - String? pathId,
- List<
UpdateProvisioningParameter> ? provisioningParameters, - List<
Tag> ? tags,
Creates a plan.
A plan includes the list of resources to be created (when provisioning a new product) or modified (when updating a provisioned product) when the plan is executed.
You can create one plan for each provisioned product. To create a plan for an existing provisioned product, the product status must be AVAILABLE or TAINTED.
To view the resource changes in the change set, use DescribeProvisionedProductPlan. To create or modify the provisioned product, use ExecuteProvisionedProductPlan.
May throw InvalidParametersException.
May throw InvalidStateException.
May throw ResourceNotFoundException.
Parameter planName :
The name of the plan.
Parameter planType :
The plan type.
Parameter productId :
The product identifier.
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 provisioningArtifactId :
The identifier of the provisioning artifact.
Parameter acceptLanguage :
The language code.
-
jp- Japanese -
zh- Chinese
Parameter idempotencyToken :
A unique identifier that you provide to ensure idempotency. If multiple
requests differ only by the idempotency token, the same response is
returned for each repeated request.
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.
Parameter provisioningParameters :
Parameters specified by the administrator that are required for
provisioning the product.
Parameter tags :
One or more tags.
If the plan is for an existing provisioned product, the product must have
a RESOURCE_UPDATE constraint with
TagUpdatesOnProvisionedProduct set to ALLOWED to
allow tag updates.
Implementation
Future<CreateProvisionedProductPlanOutput> createProvisionedProductPlan({
required String planName,
required ProvisionedProductPlanType planType,
required String productId,
required String provisionedProductName,
required String provisioningArtifactId,
String? acceptLanguage,
String? idempotencyToken,
List<String>? notificationArns,
String? pathId,
List<UpdateProvisioningParameter>? provisioningParameters,
List<Tag>? tags,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWS242ServiceCatalogService.CreateProvisionedProductPlan'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'PlanName': planName,
'PlanType': planType.value,
'ProductId': productId,
'ProvisionedProductName': provisionedProductName,
'ProvisioningArtifactId': provisioningArtifactId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
if (notificationArns != null) 'NotificationArns': notificationArns,
if (pathId != null) 'PathId': pathId,
if (provisioningParameters != null)
'ProvisioningParameters': provisioningParameters,
if (tags != null) 'Tags': tags,
},
);
return CreateProvisionedProductPlanOutput.fromJson(jsonResponse.body);
}