deleteProvisioningArtifact method
Deletes the specified provisioning artifact (also known as a version) for the specified product.
You cannot delete a provisioning artifact associated with a product that was shared with you. You cannot delete the last provisioning artifact for a product, because a product must have at least one provisioning artifact.
May throw ResourceNotFoundException. May throw ResourceInUseException. 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
Implementation
Future<void> deleteProvisioningArtifact({
required String productId,
required String provisioningArtifactId,
String? acceptLanguage,
}) 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,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWS242ServiceCatalogService.DeleteProvisioningArtifact'
};
await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProductId': productId,
'ProvisioningArtifactId': provisioningArtifactId,
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
},
);
}