You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::CodePipeline::Client

Inherits:
Seahorse::Client::Base show all
Defined in:
(unknown)

Overview

An API client for AWS CodePipeline. To construct a client, you need to configure a :region and :credentials.

codepipeline = Aws::CodePipeline::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

See #initialize for a full list of supported configuration options.

Region

You can configure a default region in the following locations:

  • ENV['AWS_REGION']
  • Aws.config[:region]

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

  • ENV['AWS_ACCESS_KEY_ID'] and ENV['AWS_SECRET_ACCESS_KEY']
  • Aws.config[:credentials]
  • The shared credentials ini file at ~/.aws/credentials (more information)
  • From an instance profile when running on EC2

You can also construct a credentials object from one of the following classes:

Alternatively, you configure credentials with :access_key_id and :secret_access_key:

# load credentials from disk
creds = YAML.load(File.read('/path/to/secrets'))

Aws::CodePipeline::Client.new(
  access_key_id: creds['access_key_id'],
  secret_access_key: creds['secret_access_key']
)

Always load your credentials from outside your application. Avoid configuring credentials statically and never commit them to source control.

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

Constructor collapse

API Operations collapse

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Base

add_plugin, api, #build_request, clear_plugins, define, new, #operation, #operation_names, plugins, remove_plugin, set_api, set_plugins

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(options = {}) ⇒ Aws::CodePipeline::Client

Constructs an API client.

Options Hash (options):

  • :access_key_id (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :active_endpoint_cache (Boolean)

    When set to true, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :convert_params (Boolean) — default: true

    When true, an attempt is made to coerce request parameters into the required types. See Plugins::ParamConverter for more details.

  • :credentials (required, Credentials)

    Your AWS credentials. The following locations will be searched in order for credentials:

    • :access_key_id, :secret_access_key, and :session_token options
    • ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
    • HOME/.aws/credentials shared credentials file
    • EC2 instance profile credentials See Plugins::RequestSigner for more details.
  • :disable_host_prefix_injection (Boolean)

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available. See Plugins::EndpointPattern for more details.

  • :endpoint (String)

    A default endpoint is constructed from the :region. See Plugins::RegionalEndpoint for more details.

  • :endpoint_cache_max_entries (Integer)

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_max_threads (Integer)

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10. See Plugins::EndpointDiscovery for more details.

  • :endpoint_cache_poll_interval (Integer)

    When :endpoint_discovery and :active_endpoint_cache is enabled, Use this option to config the time interval in seconds for making requests fetching endpoints information. Defaults to 60 sec. See Plugins::EndpointDiscovery for more details.

  • :endpoint_discovery (Boolean)

    When set to true, endpoint discovery will be enabled for operations when available. Defaults to false. See Plugins::EndpointDiscovery for more details.

  • :http_continue_timeout (Float) — default: 1

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_idle_timeout (Integer) — default: 5

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_open_timeout (Integer) — default: 15

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_proxy (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_read_timeout (Integer) — default: 60

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :http_wire_trace (Boolean) — default: false

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the logger at. See Plugins::Logging for more details.

  • :log_formatter (Logging::LogFormatter)

    The log formatter. Defaults to Seahorse::Client::Logging::Formatter.default. See Plugins::Logging for more details.

  • :logger (Logger) — default: nil

    The Logger instance to send log messages to. If this option is not set, logging will be disabled. See Plugins::Logging for more details.

  • :profile (String)

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, 'default' is used. See Plugins::RequestSigner for more details.

  • :raise_response_errors (Boolean) — default: true

    When true, response errors are raised. See Seahorse::Client::Plugins::RaiseResponseErrors for more details.

  • :region (required, String)

    The AWS region to connect to. The region is used to construct the client endpoint. Defaults to ENV['AWS_REGION']. Also checks AMAZON_REGION and AWS_DEFAULT_REGION. See Plugins::RegionalEndpoint for more details.

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors and auth errors from expired credentials. See Plugins::RetryErrors for more details.

  • :secret_access_key (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :session_token (String)

    Used to set credentials statically. See Plugins::RequestSigner for more details.

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disable response data type conversions. This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

    When :simple_json is enabled, the request parameters hash must be formatted exactly as the DynamoDB API expects. See Plugins::Protocols::JsonRpc for more details.

  • :ssl_ca_bundle (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_directory (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_ca_store (String)

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :ssl_verify_peer (Boolean) — default: true

    See Seahorse::Client::Plugins::NetHttp for more details.

  • :stub_responses (Boolean) — default: false

    Causes the client to return stubbed responses. By default fake responses are generated and returned. You can specify the response data to return or errors to raise by calling Aws::ClientStubs#stub_responses. See Aws::ClientStubs for more information.

    Please note When response stubbing is enabled, no HTTP requests are made, and retries are disabled. See Plugins::StubResponses for more details.

  • :validate_params (Boolean) — default: true

    When true, request parameters are validated before sending the request. See Plugins::ParamValidator for more details.

Instance Method Details

#acknowledge_job(options = {}) ⇒ Types::AcknowledgeJobOutput

Returns information about a specified job and whether that job has been received by the job worker. Used for custom actions only.

Examples:

Request syntax with placeholder values


resp = client.acknowledge_job({
  job_id: "JobId", # required
  nonce: "Nonce", # required
})

Response structure


resp.status #=> String, one of "Created", "Queued", "Dispatched", "InProgress", "TimedOut", "Succeeded", "Failed"

Options Hash (options):

  • :job_id (required, String)

    The unique system-generated ID of the job for which you want to confirm receipt.

  • :nonce (required, String)

    A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response of the PollForJobs request that returned this job.

Returns:

See Also:

#acknowledge_third_party_job(options = {}) ⇒ Types::AcknowledgeThirdPartyJobOutput

Confirms a job worker has received the specified job. Used for partner actions only.

Examples:

Request syntax with placeholder values


resp = client.acknowledge_third_party_job({
  job_id: "ThirdPartyJobId", # required
  nonce: "Nonce", # required
  client_token: "ClientToken", # required
})

Response structure


resp.status #=> String, one of "Created", "Queued", "Dispatched", "InProgress", "TimedOut", "Succeeded", "Failed"

Options Hash (options):

  • :job_id (required, String)

    The unique system-generated ID of the job.

  • :nonce (required, String)

    A system-generated random number that AWS CodePipeline uses to ensure that the job is being worked on by only one job worker. Get this number from the response to a GetThirdPartyJobDetails request.

  • :client_token (required, String)

    The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.

Returns:

See Also:

#create_custom_action_type(options = {}) ⇒ Types::CreateCustomActionTypeOutput

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

Examples:

Request syntax with placeholder values


resp = client.create_custom_action_type({
  category: "Source", # required, accepts Source, Build, Deploy, Test, Invoke, Approval
  provider: "ActionProvider", # required
  version: "Version", # required
  settings: {
    third_party_configuration_url: "Url",
    entity_url_template: "UrlTemplate",
    execution_url_template: "UrlTemplate",
    revision_url_template: "UrlTemplate",
  },
  configuration_properties: [
    {
      name: "ActionConfigurationKey", # required
      required: false, # required
      key: false, # required
      secret: false, # required
      queryable: false,
      description: "Description",
      type: "String", # accepts String, Number, Boolean
    },
  ],
  input_artifact_details: { # required
    minimum_count: 1, # required
    maximum_count: 1, # required
  },
  output_artifact_details: { # required
    minimum_count: 1, # required
    maximum_count: 1, # required
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.action_type.id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.action_type.id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.action_type.id.provider #=> String
resp.action_type.id.version #=> String
resp.action_type.settings.third_party_configuration_url #=> String
resp.action_type.settings.entity_url_template #=> String
resp.action_type.settings.execution_url_template #=> String
resp.action_type.settings.revision_url_template #=> String
resp.action_type.action_configuration_properties #=> Array
resp.action_type.action_configuration_properties[0].name #=> String
resp.action_type.action_configuration_properties[0].required #=> true/false
resp.action_type.action_configuration_properties[0].key #=> true/false
resp.action_type.action_configuration_properties[0].secret #=> true/false
resp.action_type.action_configuration_properties[0].queryable #=> true/false
resp.action_type.action_configuration_properties[0].description #=> String
resp.action_type.action_configuration_properties[0].type #=> String, one of "String", "Number", "Boolean"
resp.action_type.input_artifact_details.minimum_count #=> Integer
resp.action_type.input_artifact_details.maximum_count #=> Integer
resp.action_type.output_artifact_details.minimum_count #=> Integer
resp.action_type.output_artifact_details.maximum_count #=> Integer
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :category (required, String)

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

  • :provider (required, String)

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

  • :version (required, String)

    The version identifier of the custom action.

  • :settings (Types::ActionTypeSettings)

    URLs that provide users information about this custom action.

  • :configuration_properties (Array<Types::ActionConfigurationProperty>)

    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 (required, Types::ArtifactDetails)

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

  • :output_artifact_details (required, Types::ArtifactDetails)

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

  • :tags (Array<Types::Tag>)

    The tags for the custom action.

Returns:

See Also:

#create_pipeline(options = {}) ⇒ Types::CreatePipelineOutput

Creates a pipeline.

In the pipeline structure, you must include either artifactStore or artifactStores in your pipeline, but you cannot use both. If you create a cross-region action in your pipeline, you must use artifactStores.

Examples:

Request syntax with placeholder values


resp = client.create_pipeline({
  pipeline: { # required
    name: "PipelineName", # required
    role_arn: "RoleArn", # required
    artifact_store: {
      type: "S3", # required, accepts S3
      location: "ArtifactStoreLocation", # required
      encryption_key: {
        id: "EncryptionKeyId", # required
        type: "KMS", # required, accepts KMS
      },
    },
    artifact_stores: {
      "AWSRegionName" => {
        type: "S3", # required, accepts S3
        location: "ArtifactStoreLocation", # required
        encryption_key: {
          id: "EncryptionKeyId", # required
          type: "KMS", # required, accepts KMS
        },
      },
    },
    stages: [ # required
      {
        name: "StageName", # required
        blockers: [
          {
            name: "BlockerName", # required
            type: "Schedule", # required, accepts Schedule
          },
        ],
        actions: [ # required
          {
            name: "ActionName", # required
            action_type_id: { # required
              category: "Source", # required, accepts Source, Build, Deploy, Test, Invoke, Approval
              owner: "AWS", # required, accepts AWS, ThirdParty, Custom
              provider: "ActionProvider", # required
              version: "Version", # required
            },
            run_order: 1,
            configuration: {
              "ActionConfigurationKey" => "ActionConfigurationValue",
            },
            output_artifacts: [
              {
                name: "ArtifactName", # required
              },
            ],
            input_artifacts: [
              {
                name: "ArtifactName", # required
              },
            ],
            role_arn: "RoleArn",
            region: "AWSRegionName",
            namespace: "ActionNamespace",
          },
        ],
      },
    ],
    version: 1,
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.pipeline.name #=> String
resp.pipeline.role_arn #=> String
resp.pipeline.artifact_store.type #=> String, one of "S3"
resp.pipeline.artifact_store.location #=> String
resp.pipeline.artifact_store.encryption_key.id #=> String
resp.pipeline.artifact_store.encryption_key.type #=> String, one of "KMS"
resp.pipeline.artifact_stores #=> Hash
resp.pipeline.artifact_stores["AWSRegionName"].type #=> String, one of "S3"
resp.pipeline.artifact_stores["AWSRegionName"].location #=> String
resp.pipeline.artifact_stores["AWSRegionName"].encryption_key.id #=> String
resp.pipeline.artifact_stores["AWSRegionName"].encryption_key.type #=> String, one of "KMS"
resp.pipeline.stages #=> Array
resp.pipeline.stages[0].name #=> String
resp.pipeline.stages[0].blockers #=> Array
resp.pipeline.stages[0].blockers[0].name #=> String
resp.pipeline.stages[0].blockers[0].type #=> String, one of "Schedule"
resp.pipeline.stages[0].actions #=> Array
resp.pipeline.stages[0].actions[0].name #=> String
resp.pipeline.stages[0].actions[0].action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.pipeline.stages[0].actions[0].action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.pipeline.stages[0].actions[0].action_type_id.provider #=> String
resp.pipeline.stages[0].actions[0].action_type_id.version #=> String
resp.pipeline.stages[0].actions[0].run_order #=> Integer
resp.pipeline.stages[0].actions[0].configuration #=> Hash
resp.pipeline.stages[0].actions[0].configuration["ActionConfigurationKey"] #=> String
resp.pipeline.stages[0].actions[0].output_artifacts #=> Array
resp.pipeline.stages[0].actions[0].output_artifacts[0].name #=> String
resp.pipeline.stages[0].actions[0].input_artifacts #=> Array
resp.pipeline.stages[0].actions[0].input_artifacts[0].name #=> String
resp.pipeline.stages[0].actions[0].role_arn #=> String
resp.pipeline.stages[0].actions[0].region #=> String
resp.pipeline.stages[0].actions[0].namespace #=> String
resp.pipeline.version #=> Integer
resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String

Options Hash (options):

  • :pipeline (required, Types::PipelineDeclaration)

    Represents the structure of actions and stages to be performed in the pipeline.

  • :tags (Array<Types::Tag>)

    The tags for the pipeline.

Returns:

See Also:

#delete_custom_action_type(options = {}) ⇒ Struct

Marks a custom action as deleted. PollForJobs for the custom action fails after the action is marked for deletion. Used for custom actions only.

To re-create a custom action after it has been deleted you must use a string in the version field that has never been used before. This string can be an incremented version number, for example. To restore a deleted custom action, use a JSON file that is identical to the deleted action, including the original string in the version field.

Examples:

Request syntax with placeholder values


resp = client.delete_custom_action_type({
  category: "Source", # required, accepts Source, Build, Deploy, Test, Invoke, Approval
  provider: "ActionProvider", # required
  version: "Version", # required
})

Options Hash (options):

  • :category (required, String)

    The category of the custom action that you want to delete, such as source or deploy.

  • :provider (required, String)

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

  • :version (required, String)

    The version of the custom action to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_pipeline(options = {}) ⇒ Struct

Deletes the specified pipeline.

Examples:

Request syntax with placeholder values


resp = client.delete_pipeline({
  name: "PipelineName", # required
})

Options Hash (options):

  • :name (required, String)

    The name of the pipeline to be deleted.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#delete_webhook(options = {}) ⇒ Struct

Deletes a previously created webhook by name. Deleting the webhook stops AWS CodePipeline from starting a pipeline every time an external event occurs. The API returns successfully when trying to delete a webhook that is already deleted. If a deleted webhook is re-created by calling PutWebhook with the same name, it will have a different URL.

Examples:

Request syntax with placeholder values


resp = client.delete_webhook({
  name: "WebhookName", # required
})

Options Hash (options):

  • :name (required, String)

    The name of the webhook you want to delete.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#deregister_webhook_with_third_party(options = {}) ⇒ Struct

Removes the connection between the webhook that was created by CodePipeline and the external tool with events to be detected. Currently supported only for webhooks that target an action type of GitHub.

Examples:

Request syntax with placeholder values


resp = client.deregister_webhook_with_third_party({
  webhook_name: "WebhookName",
})

Options Hash (options):

  • :webhook_name (String)

    The name of the webhook you want to deregister.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#disable_stage_transition(options = {}) ⇒ Struct

Prevents artifacts in a pipeline from transitioning to the next stage in the pipeline.

Examples:

Request syntax with placeholder values


resp = client.disable_stage_transition({
  pipeline_name: "PipelineName", # required
  stage_name: "StageName", # required
  transition_type: "Inbound", # required, accepts Inbound, Outbound
  reason: "DisabledReason", # required
})

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline in which you want to disable the flow of artifacts from one stage to another.

  • :stage_name (required, String)

    The name of the stage where you want to disable the inbound or outbound transition of artifacts.

  • :transition_type (required, String)

    Specifies whether artifacts are prevented from transitioning into the stage and being processed by the actions in that stage (inbound), or prevented from transitioning from the stage after they have been processed by the actions in that stage (outbound).

  • :reason (required, String)

    The reason given to the user that a stage is disabled, such as waiting for manual approval or manual tests. This message is displayed in the pipeline console UI.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#enable_stage_transition(options = {}) ⇒ Struct

Enables artifacts in a pipeline to transition to a stage in a pipeline.

Examples:

Request syntax with placeholder values


resp = client.enable_stage_transition({
  pipeline_name: "PipelineName", # required
  stage_name: "StageName", # required
  transition_type: "Inbound", # required, accepts Inbound, Outbound
})

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline in which you want to enable the flow of artifacts from one stage to another.

  • :stage_name (required, String)

    The name of the stage where you want to enable the transition of artifacts, either into the stage (inbound) or from that stage to the next stage (outbound).

  • :transition_type (required, String)

    Specifies whether artifacts are allowed to enter the stage and be processed by the actions in that stage (inbound) or whether already processed artifacts are allowed to transition to the next stage (outbound).

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#get_job_details(options = {}) ⇒ Types::GetJobDetailsOutput

Returns information about a job. Used for custom actions only.

When this API is called, AWS CodePipeline returns temporary credentials for the S3 bucket used to store artifacts for the pipeline, if the action requires access to that S3 bucket for input or output artifacts. This API also returns any secret values defined for the action.

Examples:

Request syntax with placeholder values


resp = client.get_job_details({
  job_id: "JobId", # required
})

Response structure


resp.job_details.id #=> String
resp.job_details.data.action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.job_details.data.action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.job_details.data.action_type_id.provider #=> String
resp.job_details.data.action_type_id.version #=> String
resp.job_details.data.action_configuration.configuration #=> Hash
resp.job_details.data.action_configuration.configuration["ActionConfigurationKey"] #=> String
resp.job_details.data.pipeline_context.pipeline_name #=> String
resp.job_details.data.pipeline_context.stage.name #=> String
resp.job_details.data.pipeline_context.action.name #=> String
resp.job_details.data.pipeline_context.action.action_execution_id #=> String
resp.job_details.data.pipeline_context.pipeline_arn #=> String
resp.job_details.data.pipeline_context.pipeline_execution_id #=> String
resp.job_details.data.input_artifacts #=> Array
resp.job_details.data.input_artifacts[0].name #=> String
resp.job_details.data.input_artifacts[0].revision #=> String
resp.job_details.data.input_artifacts[0].location.type #=> String, one of "S3"
resp.job_details.data.input_artifacts[0].location.s3_location.bucket_name #=> String
resp.job_details.data.input_artifacts[0].location.s3_location.object_key #=> String
resp.job_details.data.output_artifacts #=> Array
resp.job_details.data.output_artifacts[0].name #=> String
resp.job_details.data.output_artifacts[0].revision #=> String
resp.job_details.data.output_artifacts[0].location.type #=> String, one of "S3"
resp.job_details.data.output_artifacts[0].location.s3_location.bucket_name #=> String
resp.job_details.data.output_artifacts[0].location.s3_location.object_key #=> String
resp.job_details.data.artifact_credentials.access_key_id #=> String
resp.job_details.data.artifact_credentials.secret_access_key #=> String
resp.job_details.data.artifact_credentials.session_token #=> String
resp.job_details.data.continuation_token #=> String
resp.job_details.data.encryption_key.id #=> String
resp.job_details.data.encryption_key.type #=> String, one of "KMS"
resp.job_details. #=> String

Options Hash (options):

  • :job_id (required, String)

    The unique system-generated ID for the job.

Returns:

See Also:

#get_pipeline(options = {}) ⇒ Types::GetPipelineOutput

Returns the metadata, structure, stages, and actions of a pipeline. Can be used to return the entire structure of a pipeline in JSON format, which can then be modified and used to update the pipeline structure with UpdatePipeline.

Examples:

Request syntax with placeholder values


resp = client.get_pipeline({
  name: "PipelineName", # required
  version: 1,
})

Response structure


resp.pipeline.name #=> String
resp.pipeline.role_arn #=> String
resp.pipeline.artifact_store.type #=> String, one of "S3"
resp.pipeline.artifact_store.location #=> String
resp.pipeline.artifact_store.encryption_key.id #=> String
resp.pipeline.artifact_store.encryption_key.type #=> String, one of "KMS"
resp.pipeline.artifact_stores #=> Hash
resp.pipeline.artifact_stores["AWSRegionName"].type #=> String, one of "S3"
resp.pipeline.artifact_stores["AWSRegionName"].location #=> String
resp.pipeline.artifact_stores["AWSRegionName"].encryption_key.id #=> String
resp.pipeline.artifact_stores["AWSRegionName"].encryption_key.type #=> String, one of "KMS"
resp.pipeline.stages #=> Array
resp.pipeline.stages[0].name #=> String
resp.pipeline.stages[0].blockers #=> Array
resp.pipeline.stages[0].blockers[0].name #=> String
resp.pipeline.stages[0].blockers[0].type #=> String, one of "Schedule"
resp.pipeline.stages[0].actions #=> Array
resp.pipeline.stages[0].actions[0].name #=> String
resp.pipeline.stages[0].actions[0].action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.pipeline.stages[0].actions[0].action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.pipeline.stages[0].actions[0].action_type_id.provider #=> String
resp.pipeline.stages[0].actions[0].action_type_id.version #=> String
resp.pipeline.stages[0].actions[0].run_order #=> Integer
resp.pipeline.stages[0].actions[0].configuration #=> Hash
resp.pipeline.stages[0].actions[0].configuration["ActionConfigurationKey"] #=> String
resp.pipeline.stages[0].actions[0].output_artifacts #=> Array
resp.pipeline.stages[0].actions[0].output_artifacts[0].name #=> String
resp.pipeline.stages[0].actions[0].input_artifacts #=> Array
resp.pipeline.stages[0].actions[0].input_artifacts[0].name #=> String
resp.pipeline.stages[0].actions[0].role_arn #=> String
resp.pipeline.stages[0].actions[0].region #=> String
resp.pipeline.stages[0].actions[0].namespace #=> String
resp.pipeline.version #=> Integer
resp..pipeline_arn #=> String
resp..created #=> Time
resp..updated #=> Time

Options Hash (options):

  • :name (required, String)

    The name of the pipeline for which you want to get information. Pipeline names must be unique under an AWS user account.

  • :version (Integer)

    The version number of the pipeline. If you do not specify a version, defaults to the current version.

Returns:

See Also:

#get_pipeline_execution(options = {}) ⇒ Types::GetPipelineExecutionOutput

Returns information about an execution of a pipeline, including details about artifacts, the pipeline execution ID, and the name, version, and status of the pipeline.

Examples:

Request syntax with placeholder values


resp = client.get_pipeline_execution({
  pipeline_name: "PipelineName", # required
  pipeline_execution_id: "PipelineExecutionId", # required
})

Response structure


resp.pipeline_execution.pipeline_name #=> String
resp.pipeline_execution.pipeline_version #=> Integer
resp.pipeline_execution.pipeline_execution_id #=> String
resp.pipeline_execution.status #=> String, one of "InProgress", "Stopped", "Stopping", "Succeeded", "Superseded", "Failed"
resp.pipeline_execution.artifact_revisions #=> Array
resp.pipeline_execution.artifact_revisions[0].name #=> String
resp.pipeline_execution.artifact_revisions[0].revision_id #=> String
resp.pipeline_execution.artifact_revisions[0].revision_change_identifier #=> String
resp.pipeline_execution.artifact_revisions[0].revision_summary #=> String
resp.pipeline_execution.artifact_revisions[0].created #=> Time
resp.pipeline_execution.artifact_revisions[0].revision_url #=> String

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline about which you want to get execution details.

  • :pipeline_execution_id (required, String)

    The ID of the pipeline execution about which you want to get execution details.

Returns:

See Also:

#get_pipeline_state(options = {}) ⇒ Types::GetPipelineStateOutput

Returns information about the state of a pipeline, including the stages and actions.

Values returned in the revisionId and revisionUrl fields indicate the source revision information, such as the commit ID, for the current state.

Examples:

Request syntax with placeholder values


resp = client.get_pipeline_state({
  name: "PipelineName", # required
})

Response structure


resp.pipeline_name #=> String
resp.pipeline_version #=> Integer
resp.stage_states #=> Array
resp.stage_states[0].stage_name #=> String
resp.stage_states[0].inbound_execution.pipeline_execution_id #=> String
resp.stage_states[0].inbound_execution.status #=> String, one of "InProgress", "Failed", "Stopped", "Stopping", "Succeeded"
resp.stage_states[0].inbound_transition_state.enabled #=> true/false
resp.stage_states[0].inbound_transition_state.last_changed_by #=> String
resp.stage_states[0].inbound_transition_state.last_changed_at #=> Time
resp.stage_states[0].inbound_transition_state.disabled_reason #=> String
resp.stage_states[0].action_states #=> Array
resp.stage_states[0].action_states[0].action_name #=> String
resp.stage_states[0].action_states[0].current_revision.revision_id #=> String
resp.stage_states[0].action_states[0].current_revision.revision_change_id #=> String
resp.stage_states[0].action_states[0].current_revision.created #=> Time
resp.stage_states[0].action_states[0].latest_execution.action_execution_id #=> String
resp.stage_states[0].action_states[0].latest_execution.status #=> String, one of "InProgress", "Abandoned", "Succeeded", "Failed"
resp.stage_states[0].action_states[0].latest_execution.summary #=> String
resp.stage_states[0].action_states[0].latest_execution.last_status_change #=> Time
resp.stage_states[0].action_states[0].latest_execution.token #=> String
resp.stage_states[0].action_states[0].latest_execution.last_updated_by #=> String
resp.stage_states[0].action_states[0].latest_execution.external_execution_id #=> String
resp.stage_states[0].action_states[0].latest_execution.external_execution_url #=> String
resp.stage_states[0].action_states[0].latest_execution.percent_complete #=> Integer
resp.stage_states[0].action_states[0].latest_execution.error_details.code #=> String
resp.stage_states[0].action_states[0].latest_execution.error_details.message #=> String
resp.stage_states[0].action_states[0].entity_url #=> String
resp.stage_states[0].action_states[0].revision_url #=> String
resp.stage_states[0].latest_execution.pipeline_execution_id #=> String
resp.stage_states[0].latest_execution.status #=> String, one of "InProgress", "Failed", "Stopped", "Stopping", "Succeeded"
resp.created #=> Time
resp.updated #=> Time

Options Hash (options):

  • :name (required, String)

    The name of the pipeline about which you want to get information.

Returns:

See Also:

#get_third_party_job_details(options = {}) ⇒ Types::GetThirdPartyJobDetailsOutput

Requests the details of a job for a third party action. Used for partner actions only.

When this API is called, AWS CodePipeline returns temporary credentials for the S3 bucket used to store artifacts for the pipeline, if the action requires access to that S3 bucket for input or output artifacts. This API also returns any secret values defined for the action.

Examples:

Request syntax with placeholder values


resp = client.get_third_party_job_details({
  job_id: "ThirdPartyJobId", # required
  client_token: "ClientToken", # required
})

Response structure


resp.job_details.id #=> String
resp.job_details.data.action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.job_details.data.action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.job_details.data.action_type_id.provider #=> String
resp.job_details.data.action_type_id.version #=> String
resp.job_details.data.action_configuration.configuration #=> Hash
resp.job_details.data.action_configuration.configuration["ActionConfigurationKey"] #=> String
resp.job_details.data.pipeline_context.pipeline_name #=> String
resp.job_details.data.pipeline_context.stage.name #=> String
resp.job_details.data.pipeline_context.action.name #=> String
resp.job_details.data.pipeline_context.action.action_execution_id #=> String
resp.job_details.data.pipeline_context.pipeline_arn #=> String
resp.job_details.data.pipeline_context.pipeline_execution_id #=> String
resp.job_details.data.input_artifacts #=> Array
resp.job_details.data.input_artifacts[0].name #=> String
resp.job_details.data.input_artifacts[0].revision #=> String
resp.job_details.data.input_artifacts[0].location.type #=> String, one of "S3"
resp.job_details.data.input_artifacts[0].location.s3_location.bucket_name #=> String
resp.job_details.data.input_artifacts[0].location.s3_location.object_key #=> String
resp.job_details.data.output_artifacts #=> Array
resp.job_details.data.output_artifacts[0].name #=> String
resp.job_details.data.output_artifacts[0].revision #=> String
resp.job_details.data.output_artifacts[0].location.type #=> String, one of "S3"
resp.job_details.data.output_artifacts[0].location.s3_location.bucket_name #=> String
resp.job_details.data.output_artifacts[0].location.s3_location.object_key #=> String
resp.job_details.data.artifact_credentials.access_key_id #=> String
resp.job_details.data.artifact_credentials.secret_access_key #=> String
resp.job_details.data.artifact_credentials.session_token #=> String
resp.job_details.data.continuation_token #=> String
resp.job_details.data.encryption_key.id #=> String
resp.job_details.data.encryption_key.type #=> String, one of "KMS"
resp.job_details.nonce #=> String

Options Hash (options):

  • :job_id (required, String)

    The unique system-generated ID used for identifying the job.

  • :client_token (required, String)

    The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.

Returns:

See Also:

#list_action_executions(options = {}) ⇒ Types::ListActionExecutionsOutput

Lists the action executions that have occurred in a pipeline.

Examples:

Request syntax with placeholder values


resp = client.list_action_executions({
  pipeline_name: "PipelineName", # required
  filter: {
    pipeline_execution_id: "PipelineExecutionId",
  },
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.action_execution_details #=> Array
resp.action_execution_details[0].pipeline_execution_id #=> String
resp.action_execution_details[0].action_execution_id #=> String
resp.action_execution_details[0].pipeline_version #=> Integer
resp.action_execution_details[0].stage_name #=> String
resp.action_execution_details[0].action_name #=> String
resp.action_execution_details[0].start_time #=> Time
resp.action_execution_details[0].last_update_time #=> Time
resp.action_execution_details[0].status #=> String, one of "InProgress", "Abandoned", "Succeeded", "Failed"
resp.action_execution_details[0].input.action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.action_execution_details[0].input.action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.action_execution_details[0].input.action_type_id.provider #=> String
resp.action_execution_details[0].input.action_type_id.version #=> String
resp.action_execution_details[0].input.configuration #=> Hash
resp.action_execution_details[0].input.configuration["ActionConfigurationKey"] #=> String
resp.action_execution_details[0].input.resolved_configuration #=> Hash
resp.action_execution_details[0].input.resolved_configuration["String"] #=> String
resp.action_execution_details[0].input.role_arn #=> String
resp.action_execution_details[0].input.region #=> String
resp.action_execution_details[0].input.input_artifacts #=> Array
resp.action_execution_details[0].input.input_artifacts[0].name #=> String
resp.action_execution_details[0].input.input_artifacts[0].s3location.bucket #=> String
resp.action_execution_details[0].input.input_artifacts[0].s3location.key #=> String
resp.action_execution_details[0].input.namespace #=> String
resp.action_execution_details[0].output.output_artifacts #=> Array
resp.action_execution_details[0].output.output_artifacts[0].name #=> String
resp.action_execution_details[0].output.output_artifacts[0].s3location.bucket #=> String
resp.action_execution_details[0].output.output_artifacts[0].s3location.key #=> String
resp.action_execution_details[0].output.execution_result.external_execution_id #=> String
resp.action_execution_details[0].output.execution_result.external_execution_summary #=> String
resp.action_execution_details[0].output.execution_result.external_execution_url #=> String
resp.action_execution_details[0].output.output_variables #=> Hash
resp.action_execution_details[0].output.output_variables["OutputVariablesKey"] #=> String
resp.next_token #=> String

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline for which you want to list action execution history.

  • :filter (Types::ActionExecutionFilter)

    Input information used to filter action execution history.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Action execution history is retained for up to 12 months, based on action execution start times. Default value is 100.

    Detailed execution history is available for executions run on or after February 21, 2019.

  • :next_token (String)

    The token that was returned from the previous ListActionExecutions call, which can be used to return the next set of action executions in the list.

Returns:

See Also:

#list_action_types(options = {}) ⇒ Types::ListActionTypesOutput

Gets a summary of all AWS CodePipeline action types associated with your account.

Examples:

Request syntax with placeholder values


resp = client.list_action_types({
  action_owner_filter: "AWS", # accepts AWS, ThirdParty, Custom
  next_token: "NextToken",
})

Response structure


resp.action_types #=> Array
resp.action_types[0].id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.action_types[0].id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.action_types[0].id.provider #=> String
resp.action_types[0].id.version #=> String
resp.action_types[0].settings.third_party_configuration_url #=> String
resp.action_types[0].settings.entity_url_template #=> String
resp.action_types[0].settings.execution_url_template #=> String
resp.action_types[0].settings.revision_url_template #=> String
resp.action_types[0].action_configuration_properties #=> Array
resp.action_types[0].action_configuration_properties[0].name #=> String
resp.action_types[0].action_configuration_properties[0].required #=> true/false
resp.action_types[0].action_configuration_properties[0].key #=> true/false
resp.action_types[0].action_configuration_properties[0].secret #=> true/false
resp.action_types[0].action_configuration_properties[0].queryable #=> true/false
resp.action_types[0].action_configuration_properties[0].description #=> String
resp.action_types[0].action_configuration_properties[0].type #=> String, one of "String", "Number", "Boolean"
resp.action_types[0].input_artifact_details.minimum_count #=> Integer
resp.action_types[0].input_artifact_details.maximum_count #=> Integer
resp.action_types[0].output_artifact_details.minimum_count #=> Integer
resp.action_types[0].output_artifact_details.maximum_count #=> Integer
resp.next_token #=> String

Options Hash (options):

  • :action_owner_filter (String)

    Filters the list of action types to those created by a specified entity.

  • :next_token (String)

    An identifier that was returned from the previous list action types call, which can be used to return the next set of action types in the list.

Returns:

See Also:

#list_pipeline_executions(options = {}) ⇒ Types::ListPipelineExecutionsOutput

Gets a summary of the most recent executions for a pipeline.

Examples:

Request syntax with placeholder values


resp = client.list_pipeline_executions({
  pipeline_name: "PipelineName", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.pipeline_execution_summaries #=> Array
resp.pipeline_execution_summaries[0].pipeline_execution_id #=> String
resp.pipeline_execution_summaries[0].status #=> String, one of "InProgress", "Stopped", "Stopping", "Succeeded", "Superseded", "Failed"
resp.pipeline_execution_summaries[0].start_time #=> Time
resp.pipeline_execution_summaries[0].last_update_time #=> Time
resp.pipeline_execution_summaries[0].source_revisions #=> Array
resp.pipeline_execution_summaries[0].source_revisions[0].action_name #=> String
resp.pipeline_execution_summaries[0].source_revisions[0].revision_id #=> String
resp.pipeline_execution_summaries[0].source_revisions[0].revision_summary #=> String
resp.pipeline_execution_summaries[0].source_revisions[0].revision_url #=> String
resp.pipeline_execution_summaries[0].trigger.trigger_type #=> String, one of "CreatePipeline", "StartPipelineExecution", "PollForSourceChanges", "Webhook", "CloudWatchEvent", "PutActionRevision"
resp.pipeline_execution_summaries[0].trigger.trigger_detail #=> String
resp.pipeline_execution_summaries[0].stop_trigger.reason #=> String
resp.next_token #=> String

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline for which you want to get execution summary information.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value. Pipeline history is limited to the most recent 12 months, based on pipeline execution start times. Default value is 100.

  • :next_token (String)

    The token that was returned from the previous ListPipelineExecutions call, which can be used to return the next set of pipeline executions in the list.

Returns:

See Also:

#list_pipelines(options = {}) ⇒ Types::ListPipelinesOutput

Gets a summary of all of the pipelines associated with your account.

Examples:

Request syntax with placeholder values


resp = client.list_pipelines({
  next_token: "NextToken",
})

Response structure


resp.pipelines #=> Array
resp.pipelines[0].name #=> String
resp.pipelines[0].version #=> Integer
resp.pipelines[0].created #=> Time
resp.pipelines[0].updated #=> Time
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    An identifier that was returned from the previous list pipelines call. It can be used to return the next set of pipelines in the list.

Returns:

See Also:

#list_tags_for_resource(options = {}) ⇒ Types::ListTagsForResourceOutput

Gets the set of key-value pairs (metadata) that are used to manage the resource.

Examples:

Request syntax with placeholder values


resp = client.list_tags_for_resource({
  resource_arn: "ResourceArn", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.tags #=> Array
resp.tags[0].key #=> String
resp.tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to get tags for.

  • :next_token (String)

    The token that was returned from the previous API call, which would be used to return the next page of the list. The ListTagsforResource call lists all available tags in one call and does not use pagination.

  • :max_results (Integer)

    The maximum number of results to return in a single call.

Returns:

See Also:

#list_webhooks(options = {}) ⇒ Types::ListWebhooksOutput

Gets a listing of all the webhooks in this AWS Region for this account. The output lists all webhooks and includes the webhook URL and ARN and the configuration for each webhook.

Examples:

Request syntax with placeholder values


resp = client.list_webhooks({
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.webhooks #=> Array
resp.webhooks[0].definition.name #=> String
resp.webhooks[0].definition.target_pipeline #=> String
resp.webhooks[0].definition.target_action #=> String
resp.webhooks[0].definition.filters #=> Array
resp.webhooks[0].definition.filters[0].json_path #=> String
resp.webhooks[0].definition.filters[0].match_equals #=> String
resp.webhooks[0].definition.authentication #=> String, one of "GITHUB_HMAC", "IP", "UNAUTHENTICATED"
resp.webhooks[0].definition.authentication_configuration.allowed_ip_range #=> String
resp.webhooks[0].definition.authentication_configuration.secret_token #=> String
resp.webhooks[0].url #=> String
resp.webhooks[0].error_message #=> String
resp.webhooks[0].error_code #=> String
resp.webhooks[0].last_triggered #=> Time
resp.webhooks[0].arn #=> String
resp.webhooks[0].tags #=> Array
resp.webhooks[0].tags[0].key #=> String
resp.webhooks[0].tags[0].value #=> String
resp.next_token #=> String

Options Hash (options):

  • :next_token (String)

    The token that was returned from the previous ListWebhooks call, which can be used to return the next set of webhooks in the list.

  • :max_results (Integer)

    The maximum number of results to return in a single call. To retrieve the remaining results, make another call with the returned nextToken value.

Returns:

See Also:

#poll_for_jobs(options = {}) ⇒ Types::PollForJobsOutput

Returns information about any jobs for AWS CodePipeline to act on. PollForJobs is valid only for action types with "Custom" in the owner field. If the action type contains "AWS" or "ThirdParty" in the owner field, the PollForJobs action returns an error.

When this API is called, AWS CodePipeline returns temporary credentials for the S3 bucket used to store artifacts for the pipeline, if the action requires access to that S3 bucket for input or output artifacts. This API also returns any secret values defined for the action.

Examples:

Request syntax with placeholder values


resp = client.poll_for_jobs({
  action_type_id: { # required
    category: "Source", # required, accepts Source, Build, Deploy, Test, Invoke, Approval
    owner: "AWS", # required, accepts AWS, ThirdParty, Custom
    provider: "ActionProvider", # required
    version: "Version", # required
  },
  max_batch_size: 1,
  query_param: {
    "ActionConfigurationKey" => "ActionConfigurationQueryableValue",
  },
})

Response structure


resp.jobs #=> Array
resp.jobs[0].id #=> String
resp.jobs[0].data.action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.jobs[0].data.action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.jobs[0].data.action_type_id.provider #=> String
resp.jobs[0].data.action_type_id.version #=> String
resp.jobs[0].data.action_configuration.configuration #=> Hash
resp.jobs[0].data.action_configuration.configuration["ActionConfigurationKey"] #=> String
resp.jobs[0].data.pipeline_context.pipeline_name #=> String
resp.jobs[0].data.pipeline_context.stage.name #=> String
resp.jobs[0].data.pipeline_context.action.name #=> String
resp.jobs[0].data.pipeline_context.action.action_execution_id #=> String
resp.jobs[0].data.pipeline_context.pipeline_arn #=> String
resp.jobs[0].data.pipeline_context.pipeline_execution_id #=> String
resp.jobs[0].data.input_artifacts #=> Array
resp.jobs[0].data.input_artifacts[0].name #=> String
resp.jobs[0].data.input_artifacts[0].revision #=> String
resp.jobs[0].data.input_artifacts[0].location.type #=> String, one of "S3"
resp.jobs[0].data.input_artifacts[0].location.s3_location.bucket_name #=> String
resp.jobs[0].data.input_artifacts[0].location.s3_location.object_key #=> String
resp.jobs[0].data.output_artifacts #=> Array
resp.jobs[0].data.output_artifacts[0].name #=> String
resp.jobs[0].data.output_artifacts[0].revision #=> String
resp.jobs[0].data.output_artifacts[0].location.type #=> String, one of "S3"
resp.jobs[0].data.output_artifacts[0].location.s3_location.bucket_name #=> String
resp.jobs[0].data.output_artifacts[0].location.s3_location.object_key #=> String
resp.jobs[0].data.artifact_credentials.access_key_id #=> String
resp.jobs[0].data.artifact_credentials.secret_access_key #=> String
resp.jobs[0].data.artifact_credentials.session_token #=> String
resp.jobs[0].data.continuation_token #=> String
resp.jobs[0].data.encryption_key.id #=> String
resp.jobs[0].data.encryption_key.type #=> String, one of "KMS"
resp.jobs[0].nonce #=> String
resp.jobs[0]. #=> String

Options Hash (options):

  • :action_type_id (required, Types::ActionTypeId)

    Represents information about an action type.

  • :max_batch_size (Integer)

    The maximum number of jobs to return in a poll for jobs call.

  • :query_param (Hash<String,String>)

    A map of property names and values. For an action type with no queryable properties, this value must be null or an empty map. For an action type with a queryable property, you must supply that property as a key in the map. Only jobs whose action configuration matches the mapped value are returned.

Returns:

See Also:

#poll_for_third_party_jobs(options = {}) ⇒ Types::PollForThirdPartyJobsOutput

Determines whether there are any third party jobs for a job worker to act on. Used for partner actions only.

When this API is called, AWS CodePipeline returns temporary credentials for the S3 bucket used to store artifacts for the pipeline, if the action requires access to that S3 bucket for input or output artifacts.

Examples:

Request syntax with placeholder values


resp = client.poll_for_third_party_jobs({
  action_type_id: { # required
    category: "Source", # required, accepts Source, Build, Deploy, Test, Invoke, Approval
    owner: "AWS", # required, accepts AWS, ThirdParty, Custom
    provider: "ActionProvider", # required
    version: "Version", # required
  },
  max_batch_size: 1,
})

Response structure


resp.jobs #=> Array
resp.jobs[0].client_id #=> String
resp.jobs[0].job_id #=> String

Options Hash (options):

  • :action_type_id (required, Types::ActionTypeId)

    Represents information about an action type.

  • :max_batch_size (Integer)

    The maximum number of jobs to return in a poll for jobs call.

Returns:

See Also:

#put_action_revision(options = {}) ⇒ Types::PutActionRevisionOutput

Provides information to AWS CodePipeline about new revisions to a source.

Examples:

Request syntax with placeholder values


resp = client.put_action_revision({
  pipeline_name: "PipelineName", # required
  stage_name: "StageName", # required
  action_name: "ActionName", # required
  action_revision: { # required
    revision_id: "Revision", # required
    revision_change_id: "RevisionChangeIdentifier", # required
    created: Time.now, # required
  },
})

Response structure


resp.new_revision #=> true/false
resp.pipeline_execution_id #=> String

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline that starts processing the revision to the source.

  • :stage_name (required, String)

    The name of the stage that contains the action that acts on the revision.

  • :action_name (required, String)

    The name of the action that processes the revision.

  • :action_revision (required, Types::ActionRevision)

    Represents information about the version (or revision) of an action.

Returns:

See Also:

#put_approval_result(options = {}) ⇒ Types::PutApprovalResultOutput

Provides the response to a manual approval request to AWS CodePipeline. Valid responses include Approved and Rejected.

Examples:

Request syntax with placeholder values


resp = client.put_approval_result({
  pipeline_name: "PipelineName", # required
  stage_name: "StageName", # required
  action_name: "ActionName", # required
  result: { # required
    summary: "ApprovalSummary", # required
    status: "Approved", # required, accepts Approved, Rejected
  },
  token: "ApprovalToken", # required
})

Response structure


resp.approved_at #=> Time

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline that contains the action.

  • :stage_name (required, String)

    The name of the stage that contains the action.

  • :action_name (required, String)

    The name of the action for which approval is requested.

  • :result (required, Types::ApprovalResult)

    Represents information about the result of the approval request.

  • :token (required, String)

    The system-generated token used to identify a unique approval request. The token for each open approval request can be obtained using the GetPipelineState action. It is used to validate that the approval request corresponding to this token is still valid.

Returns:

See Also:

#put_job_failure_result(options = {}) ⇒ Struct

Represents the failure of a job as returned to the pipeline by a job worker. Used for custom actions only.

Examples:

Request syntax with placeholder values


resp = client.put_job_failure_result({
  job_id: "JobId", # required
  failure_details: { # required
    type: "JobFailed", # required, accepts JobFailed, ConfigurationError, PermissionError, RevisionOutOfSync, RevisionUnavailable, SystemUnavailable
    message: "Message", # required
    external_execution_id: "ExecutionId",
  },
})

Options Hash (options):

  • :job_id (required, String)

    The unique system-generated ID of the job that failed. This is the same ID returned from PollForJobs.

  • :failure_details (required, Types::FailureDetails)

    The details about the failure of a job.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_job_success_result(options = {}) ⇒ Struct

Represents the success of a job as returned to the pipeline by a job worker. Used for custom actions only.

Examples:

Request syntax with placeholder values


resp = client.put_job_success_result({
  job_id: "JobId", # required
  current_revision: {
    revision: "Revision", # required
    change_identifier: "RevisionChangeIdentifier", # required
    created: Time.now,
    revision_summary: "RevisionSummary",
  },
  continuation_token: "ContinuationToken",
  execution_details: {
    summary: "ExecutionSummary",
    external_execution_id: "ExecutionId",
    percent_complete: 1,
  },
  output_variables: {
    "OutputVariablesKey" => "OutputVariablesValue",
  },
})

Options Hash (options):

  • :job_id (required, String)

    The unique system-generated ID of the job that succeeded. This is the same ID returned from PollForJobs.

  • :current_revision (Types::CurrentRevision)

    The ID of the current revision of the artifact successfully worked on by the job.

  • :continuation_token (String)

    A token generated by a job worker, such as an AWS CodeDeploy deployment ID, that a successful job provides to identify a custom action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the custom action. When the action is complete, no continuation token should be supplied.

  • :execution_details (Types::ExecutionDetails)

    The execution details of the successful job, such as the actions taken by the job worker.

  • :output_variables (Hash<String,String>)

    Key-value pairs produced as output by a job worker that can be made available to a downstream action configuration. outputVariables can be included only when there is no continuation token on the request.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_third_party_job_failure_result(options = {}) ⇒ Struct

Represents the failure of a third party job as returned to the pipeline by a job worker. Used for partner actions only.

Examples:

Request syntax with placeholder values


resp = client.put_third_party_job_failure_result({
  job_id: "ThirdPartyJobId", # required
  client_token: "ClientToken", # required
  failure_details: { # required
    type: "JobFailed", # required, accepts JobFailed, ConfigurationError, PermissionError, RevisionOutOfSync, RevisionUnavailable, SystemUnavailable
    message: "Message", # required
    external_execution_id: "ExecutionId",
  },
})

Options Hash (options):

  • :job_id (required, String)

    The ID of the job that failed. This is the same ID returned from PollForThirdPartyJobs.

  • :client_token (required, String)

    The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.

  • :failure_details (required, Types::FailureDetails)

    Represents information about failure details.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_third_party_job_success_result(options = {}) ⇒ Struct

Represents the success of a third party job as returned to the pipeline by a job worker. Used for partner actions only.

Examples:

Request syntax with placeholder values


resp = client.put_third_party_job_success_result({
  job_id: "ThirdPartyJobId", # required
  client_token: "ClientToken", # required
  current_revision: {
    revision: "Revision", # required
    change_identifier: "RevisionChangeIdentifier", # required
    created: Time.now,
    revision_summary: "RevisionSummary",
  },
  continuation_token: "ContinuationToken",
  execution_details: {
    summary: "ExecutionSummary",
    external_execution_id: "ExecutionId",
    percent_complete: 1,
  },
})

Options Hash (options):

  • :job_id (required, String)

    The ID of the job that successfully completed. This is the same ID returned from PollForThirdPartyJobs.

  • :client_token (required, String)

    The clientToken portion of the clientId and clientToken pair used to verify that the calling entity is allowed access to the job and its details.

  • :current_revision (Types::CurrentRevision)

    Represents information about a current revision.

  • :continuation_token (String)

    A token generated by a job worker, such as an AWS CodeDeploy deployment ID, that a successful job provides to identify a partner action in progress. Future jobs use this token to identify the running instance of the action. It can be reused to return more information about the progress of the partner action. When the action is complete, no continuation token should be supplied.

  • :execution_details (Types::ExecutionDetails)

    The details of the actions taken and results produced on an artifact as it passes through stages in the pipeline.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#put_webhook(options = {}) ⇒ Types::PutWebhookOutput

Defines a webhook and returns a unique webhook URL generated by CodePipeline. This URL can be supplied to third party source hosting providers to call every time there's a code change. When CodePipeline receives a POST request on this URL, the pipeline defined in the webhook is started as long as the POST request satisfied the authentication and filtering requirements supplied when defining the webhook. RegisterWebhookWithThirdParty and DeregisterWebhookWithThirdParty APIs can be used to automatically configure supported third parties to call the generated webhook URL.

Examples:

Request syntax with placeholder values


resp = client.put_webhook({
  webhook: { # required
    name: "WebhookName", # required
    target_pipeline: "PipelineName", # required
    target_action: "ActionName", # required
    filters: [ # required
      {
        json_path: "JsonPath", # required
        match_equals: "MatchEquals",
      },
    ],
    authentication: "GITHUB_HMAC", # required, accepts GITHUB_HMAC, IP, UNAUTHENTICATED
    authentication_configuration: { # required
      allowed_ip_range: "WebhookAuthConfigurationAllowedIPRange",
      secret_token: "WebhookAuthConfigurationSecretToken",
    },
  },
  tags: [
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Response structure


resp.webhook.definition.name #=> String
resp.webhook.definition.target_pipeline #=> String
resp.webhook.definition.target_action #=> String
resp.webhook.definition.filters #=> Array
resp.webhook.definition.filters[0].json_path #=> String
resp.webhook.definition.filters[0].match_equals #=> String
resp.webhook.definition.authentication #=> String, one of "GITHUB_HMAC", "IP", "UNAUTHENTICATED"
resp.webhook.definition.authentication_configuration.allowed_ip_range #=> String
resp.webhook.definition.authentication_configuration.secret_token #=> String
resp.webhook.url #=> String
resp.webhook.error_message #=> String
resp.webhook.error_code #=> String
resp.webhook.last_triggered #=> Time
resp.webhook.arn #=> String
resp.webhook.tags #=> Array
resp.webhook.tags[0].key #=> String
resp.webhook.tags[0].value #=> String

Options Hash (options):

  • :webhook (required, Types::WebhookDefinition)

    The detail provided in an input file to create the webhook, such as the webhook name, the pipeline name, and the action name. Give the webhook a unique name that helps you identify it. You might name the webhook after the pipeline and action it targets so that you can easily recognize what it\'s used for later.

  • :tags (Array<Types::Tag>)

    The tags for the webhook.

Returns:

See Also:

#register_webhook_with_third_party(options = {}) ⇒ Struct

Configures a connection between the webhook that was created and the external tool with events to be detected.

Examples:

Request syntax with placeholder values


resp = client.register_webhook_with_third_party({
  webhook_name: "WebhookName",
})

Options Hash (options):

  • :webhook_name (String)

    The name of an existing webhook created with PutWebhook to register with a supported third party.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#retry_stage_execution(options = {}) ⇒ Types::RetryStageExecutionOutput

Resumes the pipeline execution by retrying the last failed actions in a stage. You can retry a stage immediately if any of the actions in the stage fail. When you retry, all actions that are still in progress continue working, and failed actions are triggered again.

Examples:

Request syntax with placeholder values


resp = client.retry_stage_execution({
  pipeline_name: "PipelineName", # required
  stage_name: "StageName", # required
  pipeline_execution_id: "PipelineExecutionId", # required
  retry_mode: "FAILED_ACTIONS", # required, accepts FAILED_ACTIONS
})

Response structure


resp.pipeline_execution_id #=> String

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline that contains the failed stage.

  • :stage_name (required, String)

    The name of the failed stage to be retried.

  • :pipeline_execution_id (required, String)

    The ID of the pipeline execution in the failed stage to be retried. Use the GetPipelineState action to retrieve the current pipelineExecutionId of the failed stage

  • :retry_mode (required, String)

    The scope of the retry attempt. Currently, the only supported value is FAILED_ACTIONS.

Returns:

See Also:

#start_pipeline_execution(options = {}) ⇒ Types::StartPipelineExecutionOutput

Starts the specified pipeline. Specifically, it begins processing the latest commit to the source location specified as part of the pipeline.

Examples:

Request syntax with placeholder values


resp = client.start_pipeline_execution({
  name: "PipelineName", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.pipeline_execution_id #=> String

Options Hash (options):

  • :name (required, String)

    The name of the pipeline to start.

  • :client_request_token (String)

    This parameter will be auto-filled on your behalf with a random UUIDv4 when no value is provided. The system-generated unique ID used to identify a unique execution request.

Returns:

See Also:

#stop_pipeline_execution(options = {}) ⇒ Types::StopPipelineExecutionOutput

Stops the specified pipeline execution. You choose to either stop the pipeline execution by completing in-progress actions without starting subsequent actions, or by abandoning in-progress actions. While completing or abandoning in-progress actions, the pipeline execution is in a Stopping state. After all in-progress actions are completed or abandoned, the pipeline execution is in a Stopped state.

Examples:

Request syntax with placeholder values


resp = client.stop_pipeline_execution({
  pipeline_name: "PipelineName", # required
  pipeline_execution_id: "PipelineExecutionId", # required
  abandon: false,
  reason: "StopPipelineExecutionReason",
})

Response structure


resp.pipeline_execution_id #=> String

Options Hash (options):

  • :pipeline_name (required, String)

    The name of the pipeline to stop.

  • :pipeline_execution_id (required, String)

    The ID of the pipeline execution to be stopped in the current stage. Use the GetPipelineState action to retrieve the current pipelineExecutionId.

  • :abandon (Boolean)

    Use this option to stop the pipeline execution by abandoning, rather than finishing, in-progress actions.

    This option can lead to failed or out-of-sequence tasks.

  • :reason (String)

    Use this option to enter comments, such as the reason the pipeline was stopped.

Returns:

See Also:

#tag_resource(options = {}) ⇒ Struct

Adds to or modifies the tags of the given resource. Tags are metadata that can be used to manage a resource.

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: [ # required
    {
      key: "TagKey", # required
      value: "TagValue", # required
    },
  ],
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource you want to add tags to.

  • :tags (required, Array<Types::Tag>)

    The tags you want to modify or add to the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#untag_resource(options = {}) ⇒ Struct

Removes tags from an AWS resource.

Examples:

Request syntax with placeholder values


resp = client.untag_resource({
  resource_arn: "ResourceArn", # required
  tag_keys: ["TagKey"], # required
})

Options Hash (options):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource to remove tags from.

  • :tag_keys (required, Array<String>)

    The list of keys for the tags to be removed from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:

#update_pipeline(options = {}) ⇒ Types::UpdatePipelineOutput

Updates a specified pipeline with edits or changes to its structure. Use a JSON file with the pipeline structure and UpdatePipeline to provide the full structure of the pipeline. Updating the pipeline increases the version number of the pipeline by 1.

Examples:

Request syntax with placeholder values


resp = client.update_pipeline({
  pipeline: { # required
    name: "PipelineName", # required
    role_arn: "RoleArn", # required
    artifact_store: {
      type: "S3", # required, accepts S3
      location: "ArtifactStoreLocation", # required
      encryption_key: {
        id: "EncryptionKeyId", # required
        type: "KMS", # required, accepts KMS
      },
    },
    artifact_stores: {
      "AWSRegionName" => {
        type: "S3", # required, accepts S3
        location: "ArtifactStoreLocation", # required
        encryption_key: {
          id: "EncryptionKeyId", # required
          type: "KMS", # required, accepts KMS
        },
      },
    },
    stages: [ # required
      {
        name: "StageName", # required
        blockers: [
          {
            name: "BlockerName", # required
            type: "Schedule", # required, accepts Schedule
          },
        ],
        actions: [ # required
          {
            name: "ActionName", # required
            action_type_id: { # required
              category: "Source", # required, accepts Source, Build, Deploy, Test, Invoke, Approval
              owner: "AWS", # required, accepts AWS, ThirdParty, Custom
              provider: "ActionProvider", # required
              version: "Version", # required
            },
            run_order: 1,
            configuration: {
              "ActionConfigurationKey" => "ActionConfigurationValue",
            },
            output_artifacts: [
              {
                name: "ArtifactName", # required
              },
            ],
            input_artifacts: [
              {
                name: "ArtifactName", # required
              },
            ],
            role_arn: "RoleArn",
            region: "AWSRegionName",
            namespace: "ActionNamespace",
          },
        ],
      },
    ],
    version: 1,
  },
})

Response structure


resp.pipeline.name #=> String
resp.pipeline.role_arn #=> String
resp.pipeline.artifact_store.type #=> String, one of "S3"
resp.pipeline.artifact_store.location #=> String
resp.pipeline.artifact_store.encryption_key.id #=> String
resp.pipeline.artifact_store.encryption_key.type #=> String, one of "KMS"
resp.pipeline.artifact_stores #=> Hash
resp.pipeline.artifact_stores["AWSRegionName"].type #=> String, one of "S3"
resp.pipeline.artifact_stores["AWSRegionName"].location #=> String
resp.pipeline.artifact_stores["AWSRegionName"].encryption_key.id #=> String
resp.pipeline.artifact_stores["AWSRegionName"].encryption_key.type #=> String, one of "KMS"
resp.pipeline.stages #=> Array
resp.pipeline.stages[0].name #=> String
resp.pipeline.stages[0].blockers #=> Array
resp.pipeline.stages[0].blockers[0].name #=> String
resp.pipeline.stages[0].blockers[0].type #=> String, one of "Schedule"
resp.pipeline.stages[0].actions #=> Array
resp.pipeline.stages[0].actions[0].name #=> String
resp.pipeline.stages[0].actions[0].action_type_id.category #=> String, one of "Source", "Build", "Deploy", "Test", "Invoke", "Approval"
resp.pipeline.stages[0].actions[0].action_type_id.owner #=> String, one of "AWS", "ThirdParty", "Custom"
resp.pipeline.stages[0].actions[0].action_type_id.provider #=> String
resp.pipeline.stages[0].actions[0].action_type_id.version #=> String
resp.pipeline.stages[0].actions[0].run_order #=> Integer
resp.pipeline.stages[0].actions[0].configuration #=> Hash
resp.pipeline.stages[0].actions[0].configuration["ActionConfigurationKey"] #=> String
resp.pipeline.stages[0].actions[0].output_artifacts #=> Array
resp.pipeline.stages[0].actions[0].output_artifacts[0].name #=> String
resp.pipeline.stages[0].actions[0].input_artifacts #=> Array
resp.pipeline.stages[0].actions[0].input_artifacts[0].name #=> String
resp.pipeline.stages[0].actions[0].role_arn #=> String
resp.pipeline.stages[0].actions[0].region #=> String
resp.pipeline.stages[0].actions[0].namespace #=> String
resp.pipeline.version #=> Integer

Options Hash (options):

Returns:

See Also:

#wait_until(waiter_name, params = {}) {|waiter| ... } ⇒ Boolean

Waiters polls an API operation until a resource enters a desired state.

Basic Usage

Waiters will poll until they are succesful, they fail by entering a terminal state, or until a maximum number of attempts are made.

# polls in a loop, sleeping between attempts client.waiter_until(waiter_name, params)

Configuration

You can configure the maximum number of polling attempts, and the delay (in seconds) between each polling attempt. You configure waiters by passing a block to #wait_until:

# poll for ~25 seconds
client.wait_until(...) do |w|
  w.max_attempts = 5
  w.delay = 5
end

Callbacks

You can be notified before each polling attempt and before each delay. If you throw :success or :failure from these callbacks, it will terminate the waiter.

started_at = Time.now
client.wait_until(...) do |w|

  # disable max attempts
  w.max_attempts = nil

  # poll for 1 hour, instead of a number of attempts
  w.before_wait do |attempts, response|
    throw :failure if Time.now - started_at > 3600
  end

end

Handling Errors

When a waiter is successful, it returns true. When a waiter fails, it raises an error. All errors raised extend from Waiters::Errors::WaiterFailed.

begin
  client.wait_until(...)
rescue Aws::Waiters::Errors::WaiterFailed
  # resource did not enter the desired state in time
end

Parameters:

  • waiter_name (Symbol)

    The name of the waiter. See #waiter_names for a full list of supported waiters.

  • params (Hash) (defaults to: {})

    Additional request parameters. See the #waiter_names for a list of supported waiters and what request they call. The called request determines the list of accepted parameters.

Yield Parameters:

Returns:

  • (Boolean)

    Returns true if the waiter was successful.

Raises:

  • (Errors::FailureStateError)

    Raised when the waiter terminates because the waiter has entered a state that it will not transition out of, preventing success.

  • (Errors::TooManyAttemptsError)

    Raised when the configured maximum number of attempts have been made, and the waiter is not yet successful.

  • (Errors::UnexpectedError)

    Raised when an error is encounted while polling for a resource that is not expected.

  • (Errors::NoSuchWaiterError)

    Raised when you request to wait for an unknown state.

#waiter_namesArray<Symbol>

Returns the list of supported waiters. The following table lists the supported waiters and the client method they call:

Waiter NameClient MethodDefault Delay:Default Max Attempts:

Returns:

  • (Array<Symbol>)

    the list of supported waiters.