A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.aws.amazon.com/sdkforruby/api/Aws/CodePipeline/Client.html below:

Client — AWS SDK for Ruby V2

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

Class: Aws::CodePipeline::Client 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:

Go here for a list of supported regions.

Credentials

Default credentials are loaded automatically from the following locations:

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:

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.

Attribute Summary collapse 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

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.

#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.

#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.

#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.

#delete_pipeline(options = {}) ⇒ Struct

Deletes the specified pipeline.

#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.

#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.

#disable_stage_transition(options = {}) ⇒ Struct

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

#enable_stage_transition(options = {}) ⇒ Struct

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

#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.

#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.

#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.

#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.

#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.

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

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

#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.

#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.

#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.

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

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

#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.

#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.

#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.

#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.

#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.

#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.

#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.

#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.

#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.

#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.

#untag_resource(options = {}) ⇒ Struct

Removes tags from an AWS resource.

#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.

#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
#waiter_names ⇒ Array<Symbol>

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

Waiter Name Client Method Default Delay: Default Max Attempts:

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4