getActionType method

Future<GetActionTypeOutput> getActionType({
  1. required ActionCategory category,
  2. required String owner,
  3. required String provider,
  4. required String version,
})

Returns information about an action type created for an external provider, where the action is to be used by customers of the external provider. The action can be created with any supported integration model.

May throw ActionTypeNotFoundException. May throw ValidationException.

Parameter category : Defines what kind of action can be taken in the stage. The following are the valid values:

  • Source
  • Build
  • Test
  • Deploy
  • Approval
  • Invoke
  • Compute

Parameter owner : The creator of an action type that was created with any supported integration model. There are two valid values: AWS and ThirdParty.

Parameter provider : The provider of the action type being called. The provider name is specified when the action type is created.

Parameter version : A string that describes the action type version.

Implementation

Future<GetActionTypeOutput> getActionType({
  required ActionCategory category,
  required String owner,
  required String provider,
  required String version,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'CodePipeline_20150709.GetActionType'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'category': category.value,
      'owner': owner,
      'provider': provider,
      'version': version,
    },
  );

  return GetActionTypeOutput.fromJson(jsonResponse.body);
}