batchAssociateServiceActionWithProvisioningArtifact method

Future<BatchAssociateServiceActionWithProvisioningArtifactOutput> batchAssociateServiceActionWithProvisioningArtifact({
  1. required List<ServiceActionAssociation> serviceActionAssociations,
  2. String? acceptLanguage,
})

Associates multiple self-service actions with provisioning artifacts.

May throw InvalidParametersException.

Parameter serviceActionAssociations : One or more associations, each consisting of the Action ID, the Product ID, and the Provisioning Artifact ID.

Parameter acceptLanguage : The language code.

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

Implementation

Future<BatchAssociateServiceActionWithProvisioningArtifactOutput>
    batchAssociateServiceActionWithProvisioningArtifact({
  required List<ServiceActionAssociation> serviceActionAssociations,
  String? acceptLanguage,
}) async {
  ArgumentError.checkNotNull(
      serviceActionAssociations, 'serviceActionAssociations');
  _s.validateStringLength(
    'acceptLanguage',
    acceptLanguage,
    0,
    100,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target':
        'AWS242ServiceCatalogService.BatchAssociateServiceActionWithProvisioningArtifact'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ServiceActionAssociations': serviceActionAssociations,
      if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
    },
  );

  return BatchAssociateServiceActionWithProvisioningArtifactOutput.fromJson(
      jsonResponse.body);
}