updateProvisioningArtifact method

Future<UpdateProvisioningArtifactOutput> updateProvisioningArtifact({
  1. required String productId,
  2. required String provisioningArtifactId,
  3. String? acceptLanguage,
  4. bool? active,
  5. String? description,
  6. ProvisioningArtifactGuidance? guidance,
  7. String? name,
})

Updates the specified provisioning artifact (also known as a version) for the specified product.

You cannot update a provisioning artifact for a product that was shared with you.

May throw ResourceNotFoundException. May throw InvalidParametersException.

Parameter productId : The product identifier.

Parameter provisioningArtifactId : The identifier of the provisioning artifact.

Parameter acceptLanguage : The language code.

  • en - English (default)
  • jp - Japanese
  • zh - Chinese

Parameter active : Indicates whether the product version is active.

Inactive provisioning artifacts are invisible to end users. End users cannot launch or update a provisioned product from an inactive provisioning artifact.

Parameter description : The updated description of the provisioning artifact.

Parameter guidance : Information set by the administrator to provide guidance to end users about which provisioning artifacts to use.

The DEFAULT value indicates that the product version is active.

The administrator can set the guidance to DEPRECATED to inform users that the product version is deprecated. Users are able to make updates to a provisioned product of a deprecated version but cannot launch new provisioned products using a deprecated version.

Parameter name : The updated name of the provisioning artifact.

Implementation

Future<UpdateProvisioningArtifactOutput> updateProvisioningArtifact({
  required String productId,
  required String provisioningArtifactId,
  String? acceptLanguage,
  bool? active,
  String? description,
  ProvisioningArtifactGuidance? guidance,
  String? name,
}) async {
  ArgumentError.checkNotNull(productId, 'productId');
  _s.validateStringLength(
    'productId',
    productId,
    1,
    100,
    isRequired: true,
  );
  ArgumentError.checkNotNull(
      provisioningArtifactId, 'provisioningArtifactId');
  _s.validateStringLength(
    'provisioningArtifactId',
    provisioningArtifactId,
    1,
    100,
    isRequired: true,
  );
  _s.validateStringLength(
    'acceptLanguage',
    acceptLanguage,
    0,
    100,
  );
  _s.validateStringLength(
    'description',
    description,
    0,
    8192,
  );
  _s.validateStringLength(
    'name',
    name,
    0,
    8192,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWS242ServiceCatalogService.UpdateProvisioningArtifact'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProductId': productId,
      'ProvisioningArtifactId': provisioningArtifactId,
      if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
      if (active != null) 'Active': active,
      if (description != null) 'Description': description,
      if (guidance != null) 'Guidance': guidance.toValue(),
      if (name != null) 'Name': name,
    },
  );

  return UpdateProvisioningArtifactOutput.fromJson(jsonResponse.body);
}