Example usage for com.amazonaws.services.codepipeline.model ActionType getId

List of usage examples for com.amazonaws.services.codepipeline.model ActionType getId

Introduction

In this page you can find the example usage for com.amazonaws.services.codepipeline.model ActionType getId.

Prototype


public ActionTypeId getId() 

Source Link

Document

Represents information about an action type.

Usage

From source file:jetbrains.buildServer.buildTriggers.codepipeline.CodePipelineAsyncPolledBuildTrigger.java

License:Apache License

@NotNull
private String getActionTypeVersion(@NotNull AWSCodePipelineClient codePipelineClient) {
    final ActionType teamCityActionType = CollectionsUtil.findFirst(codePipelineClient
            .listActionTypes(new ListActionTypesRequest().withActionOwnerFilter(ActionOwner.Custom))
            .getActionTypes(), new Filter<ActionType>() {
                @Override/*from w  w w .  j a  va  2 s . c  o m*/
                public boolean accept(@NotNull ActionType data) {
                    return TEAMCITY_ACTION_PROVIDER.equals(data.getId().getProvider());
                }
            });
    if (teamCityActionType == null) {
        throw new BuildTriggerException(
                "No registered " + TEAMCITY_ACTION_PROVIDER + " action type found in the AWS account");
    }
    return teamCityActionType.getId().getVersion();
}