updateProvisionedProductProperties method
Requests updates to the properties of the specified provisioned product.
May throw InvalidParametersException. May throw ResourceNotFoundException. May throw InvalidStateException.
Parameter provisionedProductId
:
The identifier of the provisioned product.
Parameter provisionedProductProperties
:
A map that contains the provisioned product properties to be updated.
The LAUNCH_ROLE
key accepts role ARNs. This key allows an
administrator to call UpdateProvisionedProductProperties
to
update the launch role that is associated with a provisioned product. This
role is used when an end user calls a provisioning operation such as
UpdateProvisionedProduct
,
TerminateProvisionedProduct
, or
ExecuteProvisionedProductServiceAction
. Only a role ARN is
valid. A user ARN is invalid.
The OWNER
key accepts user ARNs and role ARNs. The owner is
the user that has permission to see, update, terminate, and execute
service actions in the provisioned product.
The administrator can change the owner of a provisioned product to another
IAM user within the same account. Both end user owners and administrators
can see ownership history of the provisioned product using the
ListRecordHistory
API. The new owner can describe all past
records for the provisioned product using the DescribeRecord
API. The previous owner can no longer use DescribeRecord
, but
can still see the product's history from when he was an owner using
ListRecordHistory
.
If a provisioned product ownership is assigned to an end user, they can see and perform any action through the API or Service Catalog console such as update, terminate, and execute service actions. If an end user provisions a product and the owner is updated to someone else, they will no longer be able to see or perform any actions through API or the Service Catalog console on that provisioned product.
Parameter acceptLanguage
:
The language code.
-
en
- English (default) -
jp
- Japanese -
zh
- Chinese
Parameter idempotencyToken
:
The idempotency token that uniquely identifies the provisioning product
update request.
Implementation
Future<UpdateProvisionedProductPropertiesOutput>
updateProvisionedProductProperties({
required String provisionedProductId,
required Map<PropertyKey, String> provisionedProductProperties,
String? acceptLanguage,
String? idempotencyToken,
}) async {
ArgumentError.checkNotNull(provisionedProductId, 'provisionedProductId');
_s.validateStringLength(
'provisionedProductId',
provisionedProductId,
1,
100,
isRequired: true,
);
ArgumentError.checkNotNull(
provisionedProductProperties, 'provisionedProductProperties');
_s.validateStringLength(
'acceptLanguage',
acceptLanguage,
0,
100,
);
_s.validateStringLength(
'idempotencyToken',
idempotencyToken,
1,
128,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target':
'AWS242ServiceCatalogService.UpdateProvisionedProductProperties'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'ProvisionedProductId': provisionedProductId,
'ProvisionedProductProperties': provisionedProductProperties
.map((k, e) => MapEntry(k.toValue(), e)),
if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
'IdempotencyToken': idempotencyToken ?? _s.generateIdempotencyToken(),
},
);
return UpdateProvisionedProductPropertiesOutput.fromJson(jsonResponse.body);
}