associateServiceActionWithProvisioningArtifact method

Future<void> associateServiceActionWithProvisioningArtifact({
  1. required String productId,
  2. required String provisioningArtifactId,
  3. required String serviceActionId,
  4. String? acceptLanguage,
})

Associates a self-service action with a provisioning artifact.

May throw ResourceNotFoundException. May throw DuplicateResourceException. May throw LimitExceededException.

Parameter productId : The product identifier. For example, prod-abcdzk7xy33qa.

Parameter provisioningArtifactId : The identifier of the provisioning artifact. For example, pa-4abcdjnxjj6ne.

Parameter serviceActionId : The self-service action identifier. For example, act-fs7abcd89wxyz.

Parameter acceptLanguage : The language code.

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

Implementation

Future<void> associateServiceActionWithProvisioningArtifact({
  required String productId,
  required String provisioningArtifactId,
  required String serviceActionId,
  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,
  );
  ArgumentError.checkNotNull(serviceActionId, 'serviceActionId');
  _s.validateStringLength(
    'serviceActionId',
    serviceActionId,
    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.AssociateServiceActionWithProvisioningArtifact'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ProductId': productId,
      'ProvisioningArtifactId': provisioningArtifactId,
      'ServiceActionId': serviceActionId,
      if (acceptLanguage != null) 'AcceptLanguage': acceptLanguage,
    },
  );
}