createCustomActionType method

Future<CreateCustomActionTypeOutput> createCustomActionType({
  1. required ActionCategory category,
  2. required ArtifactDetails inputArtifactDetails,
  3. required ArtifactDetails outputArtifactDetails,
  4. required String provider,
  5. required String version,
  6. List<ActionConfigurationProperty>? configurationProperties,
  7. ActionTypeSettings? settings,
  8. List<Tag>? tags,
})

Creates a new custom action that can be used in all pipelines associated with the AWS account. Only used for custom actions.

May throw ValidationException. May throw LimitExceededException. May throw TooManyTagsException. May throw InvalidTagsException. May throw ConcurrentModificationException.

Parameter category : The category of the custom action, such as a build action or a test action.

Parameter inputArtifactDetails : The details of the input artifact for the action, such as its commit ID.

Parameter outputArtifactDetails : The details of the output artifact of the action, such as its commit ID.

Parameter provider : The provider of the service used in the custom action, such as AWS CodeDeploy.

Parameter version : The version identifier of the custom action.

Parameter configurationProperties : The configuration properties for the custom action.

Parameter settings : URLs that provide users information about this custom action.

Parameter tags : The tags for the custom action.

Implementation

Future<CreateCustomActionTypeOutput> createCustomActionType({
  required ActionCategory category,
  required ArtifactDetails inputArtifactDetails,
  required ArtifactDetails outputArtifactDetails,
  required String provider,
  required String version,
  List<ActionConfigurationProperty>? configurationProperties,
  ActionTypeSettings? settings,
  List<Tag>? tags,
}) async {
  ArgumentError.checkNotNull(category, 'category');
  ArgumentError.checkNotNull(inputArtifactDetails, 'inputArtifactDetails');
  ArgumentError.checkNotNull(outputArtifactDetails, 'outputArtifactDetails');
  ArgumentError.checkNotNull(provider, 'provider');
  _s.validateStringLength(
    'provider',
    provider,
    1,
    25,
    isRequired: true,
  );
  ArgumentError.checkNotNull(version, 'version');
  _s.validateStringLength(
    'version',
    version,
    1,
    9,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.CreateCustomActionType'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'category': category.toValue(),
      'inputArtifactDetails': inputArtifactDetails,
      'outputArtifactDetails': outputArtifactDetails,
      'provider': provider,
      'version': version,
      if (configurationProperties != null)
        'configurationProperties': configurationProperties,
      if (settings != null) 'settings': settings,
      if (tags != null) 'tags': tags,
    },
  );

  return CreateCustomActionTypeOutput.fromJson(jsonResponse.body);
}