class OCI::Devops::DevopsClient

Use the DevOps APIs to create a DevOps project to group the pipelines, add reference to target deployment environments, add artifacts to deploy, and create deployment pipelines needed to deploy your software.

Attributes

api_client[R]

Client used to make HTTP requests. @return [OCI::ApiClient]

endpoint[R]

Fully qualified endpoint URL @return [String]

region[R]

The region, which will usually correspond to a value in {OCI::Regions::REGION_ENUM}. @return [String]

retry_config[R]

The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation will not perform any retries @return [OCI::Retry::RetryConfig]

Public Class Methods

new(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) click to toggle source

Creates a new DevopsClient. Notes:

If a config is not specified, then the global OCI.config will be used.

This client is not thread-safe

Either a region or an endpoint must be specified.  If an endpoint is specified, it will be used instead of the
  region. A region may be specified in the config or via or the region parameter. If specified in both, then the
  region parameter will be used.

@param [Config] config A Config object. @param [String] region A region used to determine the service endpoint. This will usually

correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

@param [String] endpoint The fully qualified endpoint URL @param [OCI::BaseSigner] signer A signer implementation which can be used by this client. If this is not provided then

a signer will be constructed via the provided config. One use case of this parameter is instance principals authentication,
so that the instance principals signer can be provided to the client

@param [OCI::ApiClientProxySettings] proxy_settings If your environment requires you to use a proxy server for outgoing HTTP requests

the details for the proxy can be provided in this parameter

@param [OCI::Retry::RetryConfig] retry_config The retry configuration for this service client. This represents the default retry configuration to

apply across all operations. This can be overridden on a per-operation basis. The default retry configuration value is `nil`, which means that an operation
will not perform any retries
# File lib/oci/devops/devops_client.rb, line 53
def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil)
  # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers)
  # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals
  # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then
  # pass it to this constructor.
  #
  # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid
  # so try and load the config from the default file.
  config = OCI::Config.validate_and_build_config_with_signer(config, signer)

  signer = OCI::Signer.config_file_auth_builder(config) if signer.nil?

  @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings)
  @retry_config = retry_config

  if endpoint
    @endpoint = endpoint + '/20210630'
  else
    region ||= config.region
    region ||= signer.region if signer.respond_to?(:region)
    self.region = region
  end
  logger.info "DevopsClient endpoint set to '#{@endpoint}'." if logger
end

Public Instance Methods

approve_deployment(deployment_id, approve_deployment_details, opts = {}) click to toggle source

Submit stage approval. @param [String] deployment_id Unique deployment identifier. @param [OCI::Devops::Models::ApproveDeploymentDetails] approve_deployment_details The stage information for approval. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @return [Response] A Response object with data of type {OCI::Devops::Models::Deployment Deployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/approve_deployment.rb.html) to see an example of how to use approve_deployment API.

# File lib/oci/devops/devops_client.rb, line 112
def approve_deployment(deployment_id, approve_deployment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#approve_deployment.' if logger

  raise "Missing the required parameter 'deployment_id' when calling approve_deployment." if deployment_id.nil?
  raise "Missing the required parameter 'approve_deployment_details' when calling approve_deployment." if approve_deployment_details.nil?
  raise "Parameter value for 'deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(deployment_id)

  path = '/deployments/{deploymentId}/actions/approve'.sub('{deploymentId}', deployment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(approve_deployment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#approve_deployment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Deployment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
cancel_deployment(deployment_id, cancel_deployment_details, opts = {}) click to toggle source

Cancels a deployment resource by identifier. @param [String] deployment_id Unique deployment identifier. @param [OCI::Devops::Models::CancelDeploymentDetails] cancel_deployment_details The information regarding the deployment to be canceled. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @return [Response] A Response object with data of type {OCI::Devops::Models::Deployment Deployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/cancel_deployment.rb.html) to see an example of how to use cancel_deployment API.

# File lib/oci/devops/devops_client.rb, line 173
def cancel_deployment(deployment_id, cancel_deployment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#cancel_deployment.' if logger

  raise "Missing the required parameter 'deployment_id' when calling cancel_deployment." if deployment_id.nil?
  raise "Missing the required parameter 'cancel_deployment_details' when calling cancel_deployment." if cancel_deployment_details.nil?
  raise "Parameter value for 'deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(deployment_id)

  path = '/deployments/{deploymentId}/actions/cancel'.sub('{deploymentId}', deployment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(cancel_deployment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#cancel_deployment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Deployment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
change_project_compartment(project_id, change_project_compartment_details, opts = {}) click to toggle source

Moves a project resource from one compartment OCID to another. @param [String] project_id Unique project identifier. @param [OCI::Devops::Models::ChangeProjectCompartmentDetails] change_project_compartment_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/change_project_compartment.rb.html) to see an example of how to use change_project_compartment API.

# File lib/oci/devops/devops_client.rb, line 234
def change_project_compartment(project_id, change_project_compartment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#change_project_compartment.' if logger

  raise "Missing the required parameter 'project_id' when calling change_project_compartment." if project_id.nil?
  raise "Missing the required parameter 'change_project_compartment_details' when calling change_project_compartment." if change_project_compartment_details.nil?
  raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id)

  path = '/projects/{projectId}/actions/changeCompartment'.sub('{projectId}', project_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(change_project_compartment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#change_project_compartment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_deploy_artifact(create_deploy_artifact_details, opts = {}) click to toggle source

Creates a new deployment artifact. @param [OCI::Devops::Models::CreateDeployArtifactDetails] create_deploy_artifact_details Details for the new deployment artifact. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployArtifact DeployArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/create_deploy_artifact.rb.html) to see an example of how to use create_deploy_artifact API.

# File lib/oci/devops/devops_client.rb, line 292
def create_deploy_artifact(create_deploy_artifact_details, opts = {})
  logger.debug 'Calling operation DevopsClient#create_deploy_artifact.' if logger

  raise "Missing the required parameter 'create_deploy_artifact_details' when calling create_deploy_artifact." if create_deploy_artifact_details.nil?

  path = '/deployArtifacts'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_deploy_artifact_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#create_deploy_artifact') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_deploy_environment(create_deploy_environment_details, opts = {}) click to toggle source

Creates a new deployment environment. @param [OCI::Devops::Models::CreateDeployEnvironmentDetails] create_deploy_environment_details Details for the new deployment environment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployEnvironment DeployEnvironment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/create_deploy_environment.rb.html) to see an example of how to use create_deploy_environment API.

# File lib/oci/devops/devops_client.rb, line 348
def create_deploy_environment(create_deploy_environment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#create_deploy_environment.' if logger

  raise "Missing the required parameter 'create_deploy_environment_details' when calling create_deploy_environment." if create_deploy_environment_details.nil?

  path = '/deployEnvironments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_deploy_environment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#create_deploy_environment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployEnvironment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_deploy_pipeline(create_deploy_pipeline_details, opts = {}) click to toggle source

Creates a new deployment pipeline. @param [OCI::Devops::Models::CreateDeployPipelineDetails] create_deploy_pipeline_details Details for the new deployment pipeline. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployPipeline DeployPipeline} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/create_deploy_pipeline.rb.html) to see an example of how to use create_deploy_pipeline API.

# File lib/oci/devops/devops_client.rb, line 404
def create_deploy_pipeline(create_deploy_pipeline_details, opts = {})
  logger.debug 'Calling operation DevopsClient#create_deploy_pipeline.' if logger

  raise "Missing the required parameter 'create_deploy_pipeline_details' when calling create_deploy_pipeline." if create_deploy_pipeline_details.nil?

  path = '/deployPipelines'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_deploy_pipeline_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#create_deploy_pipeline') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployPipeline'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_deploy_stage(create_deploy_stage_details, opts = {}) click to toggle source

Creates a new deployment stage. @param [OCI::Devops::Models::CreateDeployStageDetails] create_deploy_stage_details Details for the new DeployStage. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployStage DeployStage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/create_deploy_stage.rb.html) to see an example of how to use create_deploy_stage API.

# File lib/oci/devops/devops_client.rb, line 460
def create_deploy_stage(create_deploy_stage_details, opts = {})
  logger.debug 'Calling operation DevopsClient#create_deploy_stage.' if logger

  raise "Missing the required parameter 'create_deploy_stage_details' when calling create_deploy_stage." if create_deploy_stage_details.nil?

  path = '/deployStages'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_deploy_stage_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#create_deploy_stage') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployStage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_deployment(create_deployment_details, opts = {}) click to toggle source

Creates a new deployment. @param [OCI::Devops::Models::CreateDeploymentDetails] create_deployment_details Details for the new deployment. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::Deployment Deployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/create_deployment.rb.html) to see an example of how to use create_deployment API.

# File lib/oci/devops/devops_client.rb, line 516
def create_deployment(create_deployment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#create_deployment.' if logger

  raise "Missing the required parameter 'create_deployment_details' when calling create_deployment." if create_deployment_details.nil?

  path = '/deployments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_deployment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#create_deployment') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Deployment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
create_project(create_project_details, opts = {}) click to toggle source

Creates a new project. @param [OCI::Devops::Models::CreateProjectDetails] create_project_details Details for the new project. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_retry_token A token that uniquely identifies a request so it can be retried in case of a timeout or server error without risk of executing that same action again. Retry tokens expire after 24 hours, but can be invalidated earlier due to conflicting operations. For example, if a resource has been deleted and purged from the system, then a retry of the original creation request might be rejected. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::Project Project} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/create_project.rb.html) to see an example of how to use create_project API.

# File lib/oci/devops/devops_client.rb, line 572
def create_project(create_project_details, opts = {})
  logger.debug 'Calling operation DevopsClient#create_project.' if logger

  raise "Missing the required parameter 'create_project_details' when calling create_project." if create_project_details.nil?

  path = '/projects'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf
  header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token

  post_body = @api_client.object_to_http_body(create_project_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#create_project') do
    @api_client.call_api(
      :POST,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Project'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_deploy_artifact(deploy_artifact_id, opts = {}) click to toggle source

Deletes a deployment artifact resource by identifier. @param [String] deploy_artifact_id Unique artifact identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/delete_deploy_artifact.rb.html) to see an example of how to use delete_deploy_artifact API.

# File lib/oci/devops/devops_client.rb, line 628
def delete_deploy_artifact(deploy_artifact_id, opts = {})
  logger.debug 'Calling operation DevopsClient#delete_deploy_artifact.' if logger

  raise "Missing the required parameter 'deploy_artifact_id' when calling delete_deploy_artifact." if deploy_artifact_id.nil?
  raise "Parameter value for 'deploy_artifact_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_artifact_id)

  path = '/deployArtifacts/{deployArtifactId}'.sub('{deployArtifactId}', deploy_artifact_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#delete_deploy_artifact') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_deploy_environment(deploy_environment_id, opts = {}) click to toggle source

Deletes a deployment environment resource by identifier. @param [String] deploy_environment_id Unique environment identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/delete_deploy_environment.rb.html) to see an example of how to use delete_deploy_environment API.

# File lib/oci/devops/devops_client.rb, line 683
def delete_deploy_environment(deploy_environment_id, opts = {})
  logger.debug 'Calling operation DevopsClient#delete_deploy_environment.' if logger

  raise "Missing the required parameter 'deploy_environment_id' when calling delete_deploy_environment." if deploy_environment_id.nil?
  raise "Parameter value for 'deploy_environment_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_environment_id)

  path = '/deployEnvironments/{deployEnvironmentId}'.sub('{deployEnvironmentId}', deploy_environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#delete_deploy_environment') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_deploy_pipeline(deploy_pipeline_id, opts = {}) click to toggle source

Deletes a deployment pipeline resource by identifier. @param [String] deploy_pipeline_id Unique pipeline identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/delete_deploy_pipeline.rb.html) to see an example of how to use delete_deploy_pipeline API.

# File lib/oci/devops/devops_client.rb, line 738
def delete_deploy_pipeline(deploy_pipeline_id, opts = {})
  logger.debug 'Calling operation DevopsClient#delete_deploy_pipeline.' if logger

  raise "Missing the required parameter 'deploy_pipeline_id' when calling delete_deploy_pipeline." if deploy_pipeline_id.nil?
  raise "Parameter value for 'deploy_pipeline_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_pipeline_id)

  path = '/deployPipelines/{deployPipelineId}'.sub('{deployPipelineId}', deploy_pipeline_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#delete_deploy_pipeline') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_deploy_stage(deploy_stage_id, opts = {}) click to toggle source

Deletes a deployment stage resource by identifier. @param [String] deploy_stage_id Unique stage identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/delete_deploy_stage.rb.html) to see an example of how to use delete_deploy_stage API.

# File lib/oci/devops/devops_client.rb, line 793
def delete_deploy_stage(deploy_stage_id, opts = {})
  logger.debug 'Calling operation DevopsClient#delete_deploy_stage.' if logger

  raise "Missing the required parameter 'deploy_stage_id' when calling delete_deploy_stage." if deploy_stage_id.nil?
  raise "Parameter value for 'deploy_stage_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_stage_id)

  path = '/deployStages/{deployStageId}'.sub('{deployStageId}', deploy_stage_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#delete_deploy_stage') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
delete_project(project_id, opts = {}) click to toggle source

Deletes a project resource by identifier @param [String] project_id Unique project identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type nil @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/delete_project.rb.html) to see an example of how to use delete_project API.

# File lib/oci/devops/devops_client.rb, line 848
def delete_project(project_id, opts = {})
  logger.debug 'Calling operation DevopsClient#delete_project.' if logger

  raise "Missing the required parameter 'project_id' when calling delete_project." if project_id.nil?
  raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id)

  path = '/projects/{projectId}'.sub('{projectId}', project_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#delete_project') do
    @api_client.call_api(
      :DELETE,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_deploy_artifact(deploy_artifact_id, opts = {}) click to toggle source

Retrieves a deployment artifact by identifier. @param [String] deploy_artifact_id Unique artifact identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployArtifact DeployArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_deploy_artifact.rb.html) to see an example of how to use get_deploy_artifact API.

# File lib/oci/devops/devops_client.rb, line 902
def get_deploy_artifact(deploy_artifact_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_deploy_artifact.' if logger

  raise "Missing the required parameter 'deploy_artifact_id' when calling get_deploy_artifact." if deploy_artifact_id.nil?
  raise "Parameter value for 'deploy_artifact_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_artifact_id)

  path = '/deployArtifacts/{deployArtifactId}'.sub('{deployArtifactId}', deploy_artifact_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_deploy_artifact') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_deploy_environment(deploy_environment_id, opts = {}) click to toggle source

Retrieves a deployment environment by identifier. @param [String] deploy_environment_id Unique environment identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployEnvironment DeployEnvironment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_deploy_environment.rb.html) to see an example of how to use get_deploy_environment API.

# File lib/oci/devops/devops_client.rb, line 956
def get_deploy_environment(deploy_environment_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_deploy_environment.' if logger

  raise "Missing the required parameter 'deploy_environment_id' when calling get_deploy_environment." if deploy_environment_id.nil?
  raise "Parameter value for 'deploy_environment_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_environment_id)

  path = '/deployEnvironments/{deployEnvironmentId}'.sub('{deployEnvironmentId}', deploy_environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_deploy_environment') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployEnvironment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_deploy_pipeline(deploy_pipeline_id, opts = {}) click to toggle source

Retrieves a deployment pipeline by identifier. @param [String] deploy_pipeline_id Unique pipeline identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployPipeline DeployPipeline} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_deploy_pipeline.rb.html) to see an example of how to use get_deploy_pipeline API.

# File lib/oci/devops/devops_client.rb, line 1010
def get_deploy_pipeline(deploy_pipeline_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_deploy_pipeline.' if logger

  raise "Missing the required parameter 'deploy_pipeline_id' when calling get_deploy_pipeline." if deploy_pipeline_id.nil?
  raise "Parameter value for 'deploy_pipeline_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_pipeline_id)

  path = '/deployPipelines/{deployPipelineId}'.sub('{deployPipelineId}', deploy_pipeline_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_deploy_pipeline') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployPipeline'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_deploy_stage(deploy_stage_id, opts = {}) click to toggle source

Retrieves a deployment stage by identifier. @param [String] deploy_stage_id Unique stage identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployStage DeployStage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_deploy_stage.rb.html) to see an example of how to use get_deploy_stage API.

# File lib/oci/devops/devops_client.rb, line 1064
def get_deploy_stage(deploy_stage_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_deploy_stage.' if logger

  raise "Missing the required parameter 'deploy_stage_id' when calling get_deploy_stage." if deploy_stage_id.nil?
  raise "Parameter value for 'deploy_stage_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_stage_id)

  path = '/deployStages/{deployStageId}'.sub('{deployStageId}', deploy_stage_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_deploy_stage') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployStage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_deployment(deployment_id, opts = {}) click to toggle source

Retrieves a deployment by identifier. @param [String] deployment_id Unique deployment identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::Deployment Deployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_deployment.rb.html) to see an example of how to use get_deployment API.

# File lib/oci/devops/devops_client.rb, line 1118
def get_deployment(deployment_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_deployment.' if logger

  raise "Missing the required parameter 'deployment_id' when calling get_deployment." if deployment_id.nil?
  raise "Parameter value for 'deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(deployment_id)

  path = '/deployments/{deploymentId}'.sub('{deploymentId}', deployment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_deployment') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Deployment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_project(project_id, opts = {}) click to toggle source

Retrieves a project by identifier. @param [String] project_id Unique project identifier. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::Project Project} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_project.rb.html) to see an example of how to use get_project API.

# File lib/oci/devops/devops_client.rb, line 1172
def get_project(project_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_project.' if logger

  raise "Missing the required parameter 'project_id' when calling get_project." if project_id.nil?
  raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id)

  path = '/projects/{projectId}'.sub('{projectId}', project_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_project') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Project'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
get_work_request(work_request_id, opts = {}) click to toggle source

Retrieves the status of the work request with the given ID. @param [String] work_request_id The ID of the asynchronous work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::WorkRequest WorkRequest} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/get_work_request.rb.html) to see an example of how to use get_work_request API.

# File lib/oci/devops/devops_client.rb, line 1226
def get_work_request(work_request_id, opts = {})
  logger.debug 'Calling operation DevopsClient#get_work_request.' if logger

  raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil?
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#get_work_request') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::WorkRequest'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_deploy_artifacts(opts = {}) click to toggle source

Returns a list of deployment artifacts. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :id Unique identifier or OCID for listing a single resource by ID. @option opts [String] :project_id unique project identifier @option opts [String] :compartment_id The OCID of the compartment in which to list resources. @option opts [String] :lifecycle_state A filter to return only DeployArtifacts that matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. (default to timeCreated)

Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployArtifactCollection DeployArtifactCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_deploy_artifacts.rb.html) to see an example of how to use list_deploy_artifacts API.

# File lib/oci/devops/devops_client.rb, line 1289
def list_deploy_artifacts(opts = {})
  logger.debug 'Calling operation DevopsClient#list_deploy_artifacts.' if logger


  if opts[:lifecycle_state] && !OCI::Devops::Models::DeployArtifact::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Devops::Models::DeployArtifact::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/deployArtifacts'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:projectId] = opts[:project_id] if opts[:project_id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_deploy_artifacts') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployArtifactCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_deploy_environments(opts = {}) click to toggle source

Returns a list of deployment environments. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :project_id unique project identifier @option opts [String] :compartment_id The OCID of the compartment in which to list resources. @option opts [String] :id Unique identifier or OCID for listing a single resource by ID. @option opts [String] :lifecycle_state A filter to return only DeployEnvironments that matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. (default to timeCreated)

Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployEnvironmentCollection DeployEnvironmentCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_deploy_environments.rb.html) to see an example of how to use list_deploy_environments API.

# File lib/oci/devops/devops_client.rb, line 1371
def list_deploy_environments(opts = {})
  logger.debug 'Calling operation DevopsClient#list_deploy_environments.' if logger


  if opts[:lifecycle_state] && !OCI::Devops::Models::DeployEnvironment::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Devops::Models::DeployEnvironment::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/deployEnvironments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:projectId] = opts[:project_id] if opts[:project_id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_deploy_environments') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployEnvironmentCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_deploy_pipelines(opts = {}) click to toggle source

Returns a list of deployment pipelines. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :id Unique identifier or OCID for listing a single resource by ID. @option opts [String] :project_id unique project identifier @option opts [String] :compartment_id The OCID of the compartment in which to list resources. @option opts [String] :lifecycle_state A filter to return only DeployPipelines that matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. (default to timeCreated)

Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployPipelineCollection DeployPipelineCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_deploy_pipelines.rb.html) to see an example of how to use list_deploy_pipelines API.

# File lib/oci/devops/devops_client.rb, line 1453
def list_deploy_pipelines(opts = {})
  logger.debug 'Calling operation DevopsClient#list_deploy_pipelines.' if logger


  if opts[:lifecycle_state] && !OCI::Devops::Models::DeployPipeline::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Devops::Models::DeployPipeline::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/deployPipelines'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:projectId] = opts[:project_id] if opts[:project_id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_deploy_pipelines') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployPipelineCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_deploy_stages(opts = {}) click to toggle source

Retrieves a list of deployment stages. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :id Unique identifier or OCID for listing a single resource by ID. @option opts [String] :deploy_pipeline_id The ID of the parent pipeline. @option opts [String] :compartment_id The OCID of the compartment in which to list resources. @option opts [String] :lifecycle_state A filter to return only deployment stages that matches the given lifecycle state. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. (default to timeCreated)

Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployStageCollection DeployStageCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_deploy_stages.rb.html) to see an example of how to use list_deploy_stages API.

# File lib/oci/devops/devops_client.rb, line 1535
def list_deploy_stages(opts = {})
  logger.debug 'Calling operation DevopsClient#list_deploy_stages.' if logger


  if opts[:lifecycle_state] && !OCI::Devops::Models::DeployStage::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Devops::Models::DeployStage::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/deployStages'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:deployPipelineId] = opts[:deploy_pipeline_id] if opts[:deploy_pipeline_id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_deploy_stages') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployStageCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_deployments(opts = {}) click to toggle source

Returns a list of deployments. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :deploy_pipeline_id The ID of the parent pipeline. @option opts [String] :id Unique identifier or OCID for listing a single resource by ID. @option opts [String] :compartment_id The OCID of the compartment in which to list resources. @option opts [String] :project_id unique project identifier @option opts [String] :lifecycle_state A filter to return only Deployments that matches the given lifecycleState. @option opts [String] :display_name A filter to return only resources that match the entire display name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. (default to timeCreated)

Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [DateTime] :time_created_less_than Search for DevOps resources that were created before a specific date. Specifying this parameter corresponding to `timeCreatedLessThan` parameter will retrieve all assessments created before the specified created date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by [RFC3339](datatracker.ietf.org/doc/html/rfc3339). @option opts [DateTime] :time_created_greater_than_or_equal_to Search for DevOps resources that were created after a specific date. Specifying this parameter corresponding to `timeCreatedGreaterThanOrEqualTo` parameter will retrieve all security assessments created after the specified created date, in "YYYY-MM-ddThh:mmZ" format with a Z offset, as defined by [RFC3339](datatracker.ietf.org/doc/html/rfc3339). @return [Response] A Response object with data of type {OCI::Devops::Models::DeploymentCollection DeploymentCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_deployments.rb.html) to see an example of how to use list_deployments API.

# File lib/oci/devops/devops_client.rb, line 1620
def list_deployments(opts = {})
  logger.debug 'Calling operation DevopsClient#list_deployments.' if logger


  if opts[:lifecycle_state] && !OCI::Devops::Models::Deployment::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Devops::Models::Deployment::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/deployments'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:deployPipelineId] = opts[:deploy_pipeline_id] if opts[:deploy_pipeline_id]
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id]
  query_params[:projectId] = opts[:project_id] if opts[:project_id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:displayName] = opts[:display_name] if opts[:display_name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]
  query_params[:timeCreatedLessThan] = opts[:time_created_less_than] if opts[:time_created_less_than]
  query_params[:timeCreatedGreaterThanOrEqualTo] = opts[:time_created_greater_than_or_equal_to] if opts[:time_created_greater_than_or_equal_to]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_deployments') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeploymentCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_projects(compartment_id, opts = {}) click to toggle source

Returns a list of projects. @param [String] compartment_id The OCID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :id Unique identifier or OCID for listing a single resource by ID. @option opts [String] :lifecycle_state A filter to return only Projects that matches the given lifecycleState. @option opts [String] :name A filter to return only resources that match the entire name given. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order may be provided. Default order for time created is descending. Default order for display name is ascending. If no value is specified, then the default time created value is considered. (default to timeCreated)

Allowed values are: timeCreated, displayName

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::ProjectCollection ProjectCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_projects.rb.html) to see an example of how to use list_projects API.

# File lib/oci/devops/devops_client.rb, line 1704
def list_projects(compartment_id, opts = {})
  logger.debug 'Calling operation DevopsClient#list_projects.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_projects." if compartment_id.nil?

  if opts[:lifecycle_state] && !OCI::Devops::Models::Project::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state])
    raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::Devops::Models::Project::LIFECYCLE_STATE_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.'
  end

  path = '/projects'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:id] = opts[:id] if opts[:id]
  query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state]
  query_params[:name] = opts[:name] if opts[:name]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_projects') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::ProjectCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_errors(work_request_id, opts = {}) click to toggle source

Returns a list of errors for a given work request. @param [String] work_request_id The ID of the asynchronous work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. (default to timeAccepted)

Allowed values are: timeAccepted

@return [Response] A Response object with data of type {OCI::Devops::Models::WorkRequestErrorCollection WorkRequestErrorCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_work_request_errors.rb.html) to see an example of how to use list_work_request_errors API.

# File lib/oci/devops/devops_client.rb, line 1782
def list_work_request_errors(work_request_id, opts = {})
  logger.debug 'Calling operation DevopsClient#list_work_request_errors.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil?

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_work_request_errors') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::WorkRequestErrorCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_request_logs(work_request_id, opts = {}) click to toggle source

Returns a list of logs for a given work request. @param [String] work_request_id The ID of the asynchronous work request. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. (default to timeAccepted)

Allowed values are: timeAccepted

@return [Response] A Response object with data of type {OCI::Devops::Models::WorkRequestLogEntryCollection WorkRequestLogEntryCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_work_request_logs.rb.html) to see an example of how to use list_work_request_logs API.

# File lib/oci/devops/devops_client.rb, line 1853
def list_work_request_logs(work_request_id, opts = {})
  logger.debug 'Calling operation DevopsClient#list_work_request_logs.' if logger

  raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil?

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end
  raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id)

  path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_work_request_logs') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::WorkRequestLogEntryCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
list_work_requests(compartment_id, opts = {}) click to toggle source

Lists the work requests in a compartment. @param [String] compartment_id The OCID of the compartment in which to list resources. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :work_request_id The ID of the asynchronous work request. @option opts [String] :status A filter to return only resources where the lifecycle state matches the given operation status. @option opts [String] :resource_id The ID of the resource affected by the work request. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @option opts [String] :page The page token representing the page at which to start retrieving results. This is usually retrieved from a previous list call. @option opts [Integer] :limit The maximum number of items to return. (default to 10) @option opts [String] :sort_order The sort order to use. Use either ascending or descending. (default to ASC) @option opts [String] :sort_by The field to sort by. Only one sort order can be provided. Default sort order is descending and is based on the timeAccepted field. (default to timeAccepted)

Allowed values are: timeAccepted

@return [Response] A Response object with data of type {OCI::Devops::Models::WorkRequestCollection WorkRequestCollection} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/list_work_requests.rb.html) to see an example of how to use list_work_requests API.

# File lib/oci/devops/devops_client.rb, line 1927
def list_work_requests(compartment_id, opts = {})
  logger.debug 'Calling operation DevopsClient#list_work_requests.' if logger

  raise "Missing the required parameter 'compartment_id' when calling list_work_requests." if compartment_id.nil?

  if opts[:status] && !OCI::Devops::Models::OPERATION_STATUS_ENUM.include?(opts[:status])
    raise 'Invalid value for "status", must be one of the values in OCI::Devops::Models::OPERATION_STATUS_ENUM.'
  end

  if opts[:sort_order] && !OCI::Devops::Models::SORT_ORDER_ENUM.include?(opts[:sort_order])
    raise 'Invalid value for "sort_order", must be one of the values in OCI::Devops::Models::SORT_ORDER_ENUM.'
  end

  if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by])
    raise 'Invalid value for "sort_by", must be one of timeAccepted.'
  end

  path = '/workRequests'
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}
  query_params[:compartmentId] = compartment_id
  query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id]
  query_params[:status] = opts[:status] if opts[:status]
  query_params[:resourceId] = opts[:resource_id] if opts[:resource_id]
  query_params[:page] = opts[:page] if opts[:page]
  query_params[:limit] = opts[:limit] if opts[:limit]
  query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order]
  query_params[:sortBy] = opts[:sort_by] if opts[:sort_by]

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = nil

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#list_work_requests') do
    @api_client.call_api(
      :GET,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::WorkRequestCollection'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
logger() click to toggle source

@return [Logger] The logger for this client. May be nil.

# File lib/oci/devops/devops_client.rb, line 92
def logger
  @api_client.config.logger
end
region=(new_region) click to toggle source

Set the region that will be used to determine the service endpoint. This will usually correspond to a value in {OCI::Regions::REGION_ENUM}, but may be an arbitrary string.

# File lib/oci/devops/devops_client.rb, line 82
def region=(new_region)
  @region = new_region

  raise 'A region must be specified.' unless @region

  @endpoint = OCI::Regions.get_service_endpoint_for_template(@region, 'https://devops.{region}.oci.{secondLevelDomain}') + '/20210630'
  logger.info "DevopsClient endpoint set to '#{@endpoint} from region #{@region}'." if logger
end
update_deploy_artifact(deploy_artifact_id, update_deploy_artifact_details, opts = {}) click to toggle source

Updates the deployment artifact. @param [String] deploy_artifact_id Unique artifact identifier. @param [OCI::Devops::Models::UpdateDeployArtifactDetails] update_deploy_artifact_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployArtifact DeployArtifact} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/update_deploy_artifact.rb.html) to see an example of how to use update_deploy_artifact API.

# File lib/oci/devops/devops_client.rb, line 2002
def update_deploy_artifact(deploy_artifact_id, update_deploy_artifact_details, opts = {})
  logger.debug 'Calling operation DevopsClient#update_deploy_artifact.' if logger

  raise "Missing the required parameter 'deploy_artifact_id' when calling update_deploy_artifact." if deploy_artifact_id.nil?
  raise "Missing the required parameter 'update_deploy_artifact_details' when calling update_deploy_artifact." if update_deploy_artifact_details.nil?
  raise "Parameter value for 'deploy_artifact_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_artifact_id)

  path = '/deployArtifacts/{deployArtifactId}'.sub('{deployArtifactId}', deploy_artifact_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_deploy_artifact_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#update_deploy_artifact') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployArtifact'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_deploy_environment(deploy_environment_id, update_deploy_environment_details, opts = {}) click to toggle source

Updates the deployment environment. @param [String] deploy_environment_id Unique environment identifier. @param [OCI::Devops::Models::UpdateDeployEnvironmentDetails] update_deploy_environment_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployEnvironment DeployEnvironment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/update_deploy_environment.rb.html) to see an example of how to use update_deploy_environment API.

# File lib/oci/devops/devops_client.rb, line 2060
def update_deploy_environment(deploy_environment_id, update_deploy_environment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#update_deploy_environment.' if logger

  raise "Missing the required parameter 'deploy_environment_id' when calling update_deploy_environment." if deploy_environment_id.nil?
  raise "Missing the required parameter 'update_deploy_environment_details' when calling update_deploy_environment." if update_deploy_environment_details.nil?
  raise "Parameter value for 'deploy_environment_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_environment_id)

  path = '/deployEnvironments/{deployEnvironmentId}'.sub('{deployEnvironmentId}', deploy_environment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_deploy_environment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#update_deploy_environment') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployEnvironment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_deploy_pipeline(deploy_pipeline_id, update_deploy_pipeline_details, opts = {}) click to toggle source

Updates the deployment pipeline. @param [String] deploy_pipeline_id Unique pipeline identifier. @param [OCI::Devops::Models::UpdateDeployPipelineDetails] update_deploy_pipeline_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployPipeline DeployPipeline} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/update_deploy_pipeline.rb.html) to see an example of how to use update_deploy_pipeline API.

# File lib/oci/devops/devops_client.rb, line 2118
def update_deploy_pipeline(deploy_pipeline_id, update_deploy_pipeline_details, opts = {})
  logger.debug 'Calling operation DevopsClient#update_deploy_pipeline.' if logger

  raise "Missing the required parameter 'deploy_pipeline_id' when calling update_deploy_pipeline." if deploy_pipeline_id.nil?
  raise "Missing the required parameter 'update_deploy_pipeline_details' when calling update_deploy_pipeline." if update_deploy_pipeline_details.nil?
  raise "Parameter value for 'deploy_pipeline_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_pipeline_id)

  path = '/deployPipelines/{deployPipelineId}'.sub('{deployPipelineId}', deploy_pipeline_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_deploy_pipeline_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#update_deploy_pipeline') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployPipeline'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_deploy_stage(deploy_stage_id, update_deploy_stage_details, opts = {}) click to toggle source

Updates the deployment stage. @param [String] deploy_stage_id Unique stage identifier. @param [OCI::Devops::Models::UpdateDeployStageDetails] update_deploy_stage_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::DeployStage DeployStage} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/update_deploy_stage.rb.html) to see an example of how to use update_deploy_stage API.

# File lib/oci/devops/devops_client.rb, line 2176
def update_deploy_stage(deploy_stage_id, update_deploy_stage_details, opts = {})
  logger.debug 'Calling operation DevopsClient#update_deploy_stage.' if logger

  raise "Missing the required parameter 'deploy_stage_id' when calling update_deploy_stage." if deploy_stage_id.nil?
  raise "Missing the required parameter 'update_deploy_stage_details' when calling update_deploy_stage." if update_deploy_stage_details.nil?
  raise "Parameter value for 'deploy_stage_id' must not be blank" if OCI::Internal::Util.blank_string?(deploy_stage_id)

  path = '/deployStages/{deployStageId}'.sub('{deployStageId}', deploy_stage_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_deploy_stage_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#update_deploy_stage') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::DeployStage'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_deployment(deployment_id, update_deployment_details, opts = {}) click to toggle source

Updates the deployment. @param [String] deployment_id Unique deployment identifier. @param [OCI::Devops::Models::UpdateDeploymentDetails] update_deployment_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::Deployment Deployment} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/update_deployment.rb.html) to see an example of how to use update_deployment API.

# File lib/oci/devops/devops_client.rb, line 2234
def update_deployment(deployment_id, update_deployment_details, opts = {})
  logger.debug 'Calling operation DevopsClient#update_deployment.' if logger

  raise "Missing the required parameter 'deployment_id' when calling update_deployment." if deployment_id.nil?
  raise "Missing the required parameter 'update_deployment_details' when calling update_deployment." if update_deployment_details.nil?
  raise "Parameter value for 'deployment_id' must not be blank" if OCI::Internal::Util.blank_string?(deployment_id)

  path = '/deployments/{deploymentId}'.sub('{deploymentId}', deployment_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_deployment_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#update_deployment') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Deployment'
    )
  end
  # rubocop:enable Metrics/BlockLength
end
update_project(project_id, update_project_details, opts = {}) click to toggle source

Updates the project. @param [String] project_id Unique project identifier. @param [OCI::Devops::Models::UpdateProjectDetails] update_project_details The information to be updated. @param [Hash] opts the optional parameters @option opts [OCI::Retry::RetryConfig] :retry_config The retry configuration to apply to this operation. If no key is provided then the service-level

retry configuration defined by {#retry_config} will be used. If an explicit `nil` value is provided then the operation will not retry

@option opts [String] :if_match For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag from a previous GET or POST response for that resource. The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. @option opts [String] :opc_request_id Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, provide the request ID. @return [Response] A Response object with data of type {OCI::Devops::Models::Project Project} @note Click [here](docs.cloud.oracle.com/en-us/iaas/tools/ruby-sdk-examples/latest/devops/update_project.rb.html) to see an example of how to use update_project API.

# File lib/oci/devops/devops_client.rb, line 2292
def update_project(project_id, update_project_details, opts = {})
  logger.debug 'Calling operation DevopsClient#update_project.' if logger

  raise "Missing the required parameter 'project_id' when calling update_project." if project_id.nil?
  raise "Missing the required parameter 'update_project_details' when calling update_project." if update_project_details.nil?
  raise "Parameter value for 'project_id' must not be blank" if OCI::Internal::Util.blank_string?(project_id)

  path = '/projects/{projectId}'.sub('{projectId}', project_id.to_s)
  operation_signing_strategy = :standard

  # rubocop:disable Style/NegatedIf
  # Query Params
  query_params = {}

  # Header Params
  header_params = {}
  header_params[:accept] = 'application/json'
  header_params[:'content-type'] = 'application/json'
  header_params[:'if-match'] = opts[:if_match] if opts[:if_match]
  header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id]
  # rubocop:enable Style/NegatedIf

  post_body = @api_client.object_to_http_body(update_project_details)

  # rubocop:disable Metrics/BlockLength
  OCI::Retry.make_retrying_call(applicable_retry_config(opts), call_name: 'DevopsClient#update_project') do
    @api_client.call_api(
      :PUT,
      path,
      endpoint,
      header_params: header_params,
      query_params: query_params,
      operation_signing_strategy: operation_signing_strategy,
      body: post_body,
      return_type: 'OCI::Devops::Models::Project'
    )
  end
  # rubocop:enable Metrics/BlockLength
end

Private Instance Methods

applicable_retry_config(opts = {}) click to toggle source

rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity rubocop:enable Style/IfUnlessModifier, Metrics/ParameterLists rubocop:enable Metrics/MethodLength, Layout/EmptyLines

# File lib/oci/devops/devops_client.rb, line 2337
def applicable_retry_config(opts = {})
  return @retry_config unless opts.key?(:retry_config)

  opts[:retry_config]
end