Skip to content

create_custom_action_type

create_custom_action_type(
    category: ActionCategory,
    provider: ActionProvider,
    version: Version,
    input_artifact_details: ArtifactDetails,
    output_artifact_details: ArtifactDetails,
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    settings: Optional[ActionTypeSettings] = None,
    configuration_properties: Optional[ActionConfigurationPropertyList] = None,
    tags: Optional[TagList] = None,
) -> CreateCustomActionTypeOutput

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

Parameters:

  • category (ActionCategory) –

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

  • provider (ActionProvider) –

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

  • version (Version) –

    The version identifier of the custom action.

  • settings (Optional[ActionTypeSettings], default: None ) –

    URLs that provide users information about this custom action.

  • configuration_properties (Optional[ActionConfigurationPropertyList], default: None ) –

    The configuration properties for the custom action.

    You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see Create a Custom Action for a Pipeline.

  • input_artifact_details (ArtifactDetails) –

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

  • output_artifact_details (ArtifactDetails) –

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

  • tags (Optional[TagList], default: None ) –

    The tags for the custom action.

Raises:

Source code in docs_src/capo_codepipeline/_services/code_pipeline.py
def create_custom_action_type(
    self,
    category: "capo_codepipeline.types.action_category.ActionCategory",
    provider: "capo_codepipeline.types.action_provider.ActionProvider",
    version: "capo_codepipeline.types.version.Version",
    input_artifact_details: "capo_codepipeline.types.artifact_details.ArtifactDetails",
    output_artifact_details: "capo_codepipeline.types.artifact_details.ArtifactDetails",
    *,
    config_overrides: Optional[CodePipelineClientConfig] = None,
    settings: Optional[
        "capo_codepipeline.types.action_type_settings.ActionTypeSettings"
    ] = None,
    configuration_properties: Optional[
        "capo_codepipeline.types.action_configuration_property_list.ActionConfigurationPropertyList"
    ] = None,
    tags: Optional["capo_codepipeline.types.tag_list.TagList"] = None,
) -> "capo_codepipeline.types.create_custom_action_type_output.CreateCustomActionTypeOutput":
    """<p>Creates a new custom action that can be used in all pipelines associated with the Amazon Web Services account. Only used for custom actions.</p>

    Args:
        category: <p>The category of the custom action, such as a build action or a test action.</p>
        provider: <p>The provider of the service used in the custom action, such as CodeDeploy.</p>
        version: <p>The version identifier of the custom action.</p>
        settings: <p>URLs that provide users information about this custom action.</p>
        configuration_properties: <p>The configuration properties for the custom action.</p> <note> <p>You can refer to a name in the configuration properties of the custom action within the URL templates by following the format of {Config:name}, as long as the configuration property is both required and not secret. For more information, see <a href="https://docs.aws.amazon.com/codepipeline/latest/userguide/how-to-create-custom-action.html">Create a Custom Action for a Pipeline</a>.</p> </note>
        input_artifact_details: <p>The details of the input artifact for the action, such as its commit ID.</p>
        output_artifact_details: <p>The details of the output artifact of the action, such as its commit ID.</p>
        tags: <p>The tags for the custom action.</p>

    Raises:
        capo_codepipeline.errors.concurrent_modification_exception.ConcurrentModificationException: <p>Unable to modify the tag due to a simultaneous update request.</p>
        capo_codepipeline.errors.invalid_tags_exception.InvalidTagsException: <p>The specified resource tags are invalid.</p>
        capo_codepipeline.errors.limit_exceeded_exception.LimitExceededException: <p>The number of pipelines associated with the Amazon Web Services account has exceeded the limit allowed for the account.</p>
        capo_codepipeline.errors.too_many_tags_exception.TooManyTagsException: <p>The tags limit for a resource has been exceeded.</p>
        capo_codepipeline.errors.validation_exception.ValidationException: <p>The validation was specified in an invalid format.</p>
        capo_codepipeline.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codepipeline.types.create_custom_action_type_input.CreateCustomActionTypeInput]",
    ) -> OperationResponse[
        "capo_codepipeline.types.create_custom_action_type_output.CreateCustomActionTypeOutput"
    ]:
        import capo_codepipeline._operations.code_pipeline_20150709.create_custom_action_type

        output, http_response = (
            capo_codepipeline._operations.code_pipeline_20150709.create_custom_action_type.create_custom_action_type(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomActionType")
    )
    input_: capo_codepipeline.types.create_custom_action_type_input.CreateCustomActionTypeInput = {
        "category": category,
        "provider": provider,
        "version": version,
        "input_artifact_details": input_artifact_details,
        "output_artifact_details": output_artifact_details,
    }
    if settings is not None:
        input_["settings"] = settings
    if configuration_properties is not None:
        input_["configuration_properties"] = configuration_properties
    if tags is not None:
        input_["tags"] = tags

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output