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

Class: Aws::CodeBuild::Client

Inherits:
Seahorse::Client::Base show all
Includes:
Aws::ClientStubs
Defined in:
gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Base

#config, #handlers

API Operations collapse

Instance Method Summary collapse

Methods included from Aws::ClientStubs

#stub_data, #stub_responses

Methods inherited from Seahorse::Client::Base

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

Methods included from Seahorse::Client::HandlerBuilder

#handle, #handle_request, #handle_response

Constructor Details

#initialize(*args) ⇒ Client

Returns a new instance of Client

Parameters:

  • options (Hash)

    a customizable set of options



152
153
154
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 152

def initialize(*args)
  super
end

Instance Method Details

#batch_get_builds(params = {}) ⇒ Types::BatchGetBuildsOutput

Gets information about builds.

Examples:

Request syntax with placeholder values


resp = client.batch_get_builds({
  ids: ["NonEmptyString"], # required
})

Response structure


resp.builds #=> Array
resp.builds[0].id #=> String
resp.builds[0].arn #=> String
resp.builds[0].start_time #=> Time
resp.builds[0].end_time #=> Time
resp.builds[0].current_phase #=> String
resp.builds[0].build_status #=> String, one of "SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
resp.builds[0].source_version #=> String
resp.builds[0].project_name #=> String
resp.builds[0].phases #=> Array
resp.builds[0].phases[0].phase_type #=> String, one of "SUBMITTED", "PROVISIONING", "DOWNLOAD_SOURCE", "INSTALL", "PRE_BUILD", "BUILD", "POST_BUILD", "UPLOAD_ARTIFACTS", "FINALIZING", "COMPLETED"
resp.builds[0].phases[0].phase_status #=> String, one of "SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
resp.builds[0].phases[0].start_time #=> Time
resp.builds[0].phases[0].end_time #=> Time
resp.builds[0].phases[0].duration_in_seconds #=> Integer
resp.builds[0].phases[0].contexts #=> Array
resp.builds[0].phases[0].contexts[0].status_code #=> String
resp.builds[0].phases[0].contexts[0].message #=> String
resp.builds[0].source.type #=> String, one of "CODECOMMIT", "CODEPIPELINE", "GITHUB", "S3", "BITBUCKET"
resp.builds[0].source.location #=> String
resp.builds[0].source.buildspec #=> String
resp.builds[0].source.auth.type #=> String, one of "OAUTH"
resp.builds[0].source.auth.resource #=> String
resp.builds[0].artifacts.location #=> String
resp.builds[0].artifacts.sha256sum #=> String
resp.builds[0].artifacts.md5sum #=> String
resp.builds[0].environment.type #=> String, one of "LINUX_CONTAINER"
resp.builds[0].environment.image #=> String
resp.builds[0].environment.compute_type #=> String, one of "BUILD_GENERAL1_SMALL", "BUILD_GENERAL1_MEDIUM", "BUILD_GENERAL1_LARGE"
resp.builds[0].environment.environment_variables #=> Array
resp.builds[0].environment.environment_variables[0].name #=> String
resp.builds[0].environment.environment_variables[0].value #=> String
resp.builds[0].environment.privileged_mode #=> Boolean
resp.builds[0].logs.group_name #=> String
resp.builds[0].logs.stream_name #=> String
resp.builds[0].logs.deep_link #=> String
resp.builds[0].timeout_in_minutes #=> Integer
resp.builds[0].build_complete #=> Boolean
resp.builds[0].initiator #=> String
resp.builds_not_found #=> Array
resp.builds_not_found[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :ids (required, Array<String>)

    The IDs of the builds.

Returns:

See Also:



222
223
224
225
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 222

def batch_get_builds(params = {}, options = {})
  req = build_request(:batch_get_builds, params)
  req.send_request(options)
end

#batch_get_projects(params = {}) ⇒ Types::BatchGetProjectsOutput

Gets information about build projects.

Examples:

Request syntax with placeholder values


resp = client.batch_get_projects({
  names: ["NonEmptyString"], # required
})

Response structure


resp.projects #=> Array
resp.projects[0].name #=> String
resp.projects[0].arn #=> String
resp.projects[0].description #=> String
resp.projects[0].source.type #=> String, one of "CODECOMMIT", "CODEPIPELINE", "GITHUB", "S3", "BITBUCKET"
resp.projects[0].source.location #=> String
resp.projects[0].source.buildspec #=> String
resp.projects[0].source.auth.type #=> String, one of "OAUTH"
resp.projects[0].source.auth.resource #=> String
resp.projects[0].artifacts.type #=> String, one of "CODEPIPELINE", "S3", "NO_ARTIFACTS"
resp.projects[0].artifacts.location #=> String
resp.projects[0].artifacts.path #=> String
resp.projects[0].artifacts.namespace_type #=> String, one of "NONE", "BUILD_ID"
resp.projects[0].artifacts.name #=> String
resp.projects[0].artifacts.packaging #=> String, one of "NONE", "ZIP"
resp.projects[0].environment.type #=> String, one of "LINUX_CONTAINER"
resp.projects[0].environment.image #=> String
resp.projects[0].environment.compute_type #=> String, one of "BUILD_GENERAL1_SMALL", "BUILD_GENERAL1_MEDIUM", "BUILD_GENERAL1_LARGE"
resp.projects[0].environment.environment_variables #=> Array
resp.projects[0].environment.environment_variables[0].name #=> String
resp.projects[0].environment.environment_variables[0].value #=> String
resp.projects[0].environment.privileged_mode #=> Boolean
resp.projects[0].service_role #=> String
resp.projects[0].timeout_in_minutes #=> Integer
resp.projects[0].encryption_key #=> String
resp.projects[0].tags #=> Array
resp.projects[0].tags[0].key #=> String
resp.projects[0].tags[0].value #=> String
resp.projects[0].created #=> Time
resp.projects[0].last_modified #=> Time
resp.projects_not_found #=> Array
resp.projects_not_found[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :names (required, Array<String>)

    The names of the build projects.

Returns:

See Also:



282
283
284
285
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 282

def batch_get_projects(params = {}, options = {})
  req = build_request(:batch_get_projects, params)
  req.send_request(options)
end

#create_project(params = {}) ⇒ Types::CreateProjectOutput

Creates a build project.

Examples:

Request syntax with placeholder values


resp = client.create_project({
  name: "ProjectName", # required
  description: "ProjectDescription",
  source: { # required
    type: "CODECOMMIT", # required, accepts CODECOMMIT, CODEPIPELINE, GITHUB, S3, BITBUCKET
    location: "String",
    buildspec: "String",
    auth: {
      type: "OAUTH", # required, accepts OAUTH
      resource: "String",
    },
  },
  artifacts: { # required
    type: "CODEPIPELINE", # required, accepts CODEPIPELINE, S3, NO_ARTIFACTS
    location: "String",
    path: "String",
    namespace_type: "NONE", # accepts NONE, BUILD_ID
    name: "String",
    packaging: "NONE", # accepts NONE, ZIP
  },
  environment: { # required
    type: "LINUX_CONTAINER", # required, accepts LINUX_CONTAINER
    image: "NonEmptyString", # required
    compute_type: "BUILD_GENERAL1_SMALL", # required, accepts BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, BUILD_GENERAL1_LARGE
    environment_variables: [
      {
        name: "NonEmptyString", # required
        value: "String", # required
      },
    ],
    privileged_mode: false,
  },
  service_role: "NonEmptyString",
  timeout_in_minutes: 1,
  encryption_key: "NonEmptyString",
  tags: [
    {
      key: "KeyInput",
      value: "ValueInput",
    },
  ],
})

Response structure


resp.project.name #=> String
resp.project.arn #=> String
resp.project.description #=> String
resp.project.source.type #=> String, one of "CODECOMMIT", "CODEPIPELINE", "GITHUB", "S3", "BITBUCKET"
resp.project.source.location #=> String
resp.project.source.buildspec #=> String
resp.project.source.auth.type #=> String, one of "OAUTH"
resp.project.source.auth.resource #=> String
resp.project.artifacts.type #=> String, one of "CODEPIPELINE", "S3", "NO_ARTIFACTS"
resp.project.artifacts.location #=> String
resp.project.artifacts.path #=> String
resp.project.artifacts.namespace_type #=> String, one of "NONE", "BUILD_ID"
resp.project.artifacts.name #=> String
resp.project.artifacts.packaging #=> String, one of "NONE", "ZIP"
resp.project.environment.type #=> String, one of "LINUX_CONTAINER"
resp.project.environment.image #=> String
resp.project.environment.compute_type #=> String, one of "BUILD_GENERAL1_SMALL", "BUILD_GENERAL1_MEDIUM", "BUILD_GENERAL1_LARGE"
resp.project.environment.environment_variables #=> Array
resp.project.environment.environment_variables[0].name #=> String
resp.project.environment.environment_variables[0].value #=> String
resp.project.environment.privileged_mode #=> Boolean
resp.project.service_role #=> String
resp.project.timeout_in_minutes #=> Integer
resp.project.encryption_key #=> String
resp.project.tags #=> Array
resp.project.tags[0].key #=> String
resp.project.tags[0].value #=> String
resp.project.created #=> Time
resp.project.last_modified #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the build project.

  • :description (String)

    A description that makes the build project easy to identify.

  • :source (required, Types::ProjectSource)

    Information about the build input source code for the build project.

  • :artifacts (required, Types::ProjectArtifacts)

    Information about the build output artifacts for the build project.

  • :environment (required, Types::ProjectEnvironment)

    Information about the build environment for the build project.

  • :service_role (String)

    The ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

  • :timeout_in_minutes (Integer)

    How long, in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait until timing out any build that has not been marked as completed. The default is 60 minutes.

  • :encryption_key (String)

    The AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.

    You can specify either the CMK's Amazon Resource Name (ARN) or, if available, the CMK's alias (using the format alias/alias-name).

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

    A set of tags for this build project.

    These tags are available for use by AWS services that support AWS CodeBuild build project tags.

Returns:

See Also:



412
413
414
415
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 412

def create_project(params = {}, options = {})
  req = build_request(:create_project, params)
  req.send_request(options)
end

#delete_project(params = {}) ⇒ Struct

Deletes a build project.

Examples:

Request syntax with placeholder values


resp = client.delete_project({
  name: "NonEmptyString", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the build project.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



434
435
436
437
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 434

def delete_project(params = {}, options = {})
  req = build_request(:delete_project, params)
  req.send_request(options)
end

#list_builds(params = {}) ⇒ Types::ListBuildsOutput

Gets a list of build IDs, with each build ID representing a single build.

Examples:

Request syntax with placeholder values


resp = client.list_builds({
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
  next_token: "String",
})

Response structure


resp.ids #=> Array
resp.ids[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :sort_order (String)

    The order to list build IDs. Valid values include:

    • ASCENDING: List the build IDs in ascending order by build ID.

    • DESCENDING: List the build IDs in descending order by build ID.

  • :next_token (String)

    During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Returns:

See Also:



480
481
482
483
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 480

def list_builds(params = {}, options = {})
  req = build_request(:list_builds, params)
  req.send_request(options)
end

#list_builds_for_project(params = {}) ⇒ Types::ListBuildsForProjectOutput

Gets a list of build IDs for the specified build project, with each build ID representing a single build.

Examples:

Request syntax with placeholder values


resp = client.list_builds_for_project({
  project_name: "NonEmptyString", # required
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
  next_token: "String",
})

Response structure


resp.ids #=> Array
resp.ids[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_name (required, String)

    The name of the build project.

  • :sort_order (String)

    The order to list build IDs. Valid values include:

    • ASCENDING: List the build IDs in ascending order by build ID.

    • DESCENDING: List the build IDs in descending order by build ID.

  • :next_token (String)

    During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Returns:

See Also:



530
531
532
533
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 530

def list_builds_for_project(params = {}, options = {})
  req = build_request(:list_builds_for_project, params)
  req.send_request(options)
end

#list_curated_environment_images(params = {}) ⇒ Types::ListCuratedEnvironmentImagesOutput

Gets information about Docker images that are managed by AWS CodeBuild.

Examples:

Response structure


resp.platforms #=> Array
resp.platforms[0].platform #=> String, one of "DEBIAN", "AMAZON_LINUX", "UBUNTU"
resp.platforms[0].languages #=> Array
resp.platforms[0].languages[0].language #=> String, one of "JAVA", "PYTHON", "NODE_JS", "RUBY", "GOLANG", "DOCKER", "ANDROID", "DOTNET", "BASE"
resp.platforms[0].languages[0].images #=> Array
resp.platforms[0].languages[0].images[0].name #=> String
resp.platforms[0].languages[0].images[0].description #=> String

Parameters:

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

    ({})

Returns:

See Also:



556
557
558
559
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 556

def list_curated_environment_images(params = {}, options = {})
  req = build_request(:list_curated_environment_images, params)
  req.send_request(options)
end

#list_projects(params = {}) ⇒ Types::ListProjectsOutput

Gets a list of build project names, with each build project name representing a single build project.

Examples:

Request syntax with placeholder values


resp = client.list_projects({
  sort_by: "NAME", # accepts NAME, CREATED_TIME, LAST_MODIFIED_TIME
  sort_order: "ASCENDING", # accepts ASCENDING, DESCENDING
  next_token: "NonEmptyString",
})

Response structure


resp.next_token #=> String
resp.projects #=> Array
resp.projects[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :sort_by (String)

    The criterion to be used to list build project names. Valid values include:

    • CREATED_TIME: List the build project names based on when each build project was created.

    • LAST_MODIFIED_TIME: List the build project names based on when information about each build project was last changed.

    • NAME: List the build project names based on each build project's name.

    Use sortOrder to specify in what order to list the build project names based on the preceding criteria.

  • :sort_order (String)

    The order in which to list build projects. Valid values include:

    • ASCENDING: List the build project names in ascending order.

    • DESCENDING: List the build project names in descending order.

    Use sortBy to specify the criterion to be used to list build project names.

  • :next_token (String)

    During a previous call, if there are more than 100 items in the list, only the first 100 items are returned, along with a unique string called a next token. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

Returns:

See Also:



622
623
624
625
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 622

def list_projects(params = {}, options = {})
  req = build_request(:list_projects, params)
  req.send_request(options)
end

#start_build(params = {}) ⇒ Types::StartBuildOutput

Starts running a build.

Examples:

Request syntax with placeholder values


resp = client.start_build({
  project_name: "NonEmptyString", # required
  source_version: "String",
  artifacts_override: {
    type: "CODEPIPELINE", # required, accepts CODEPIPELINE, S3, NO_ARTIFACTS
    location: "String",
    path: "String",
    namespace_type: "NONE", # accepts NONE, BUILD_ID
    name: "String",
    packaging: "NONE", # accepts NONE, ZIP
  },
  environment_variables_override: [
    {
      name: "NonEmptyString", # required
      value: "String", # required
    },
  ],
  buildspec_override: "String",
  timeout_in_minutes_override: 1,
})

Response structure


resp.build.id #=> String
resp.build.arn #=> String
resp.build.start_time #=> Time
resp.build.end_time #=> Time
resp.build.current_phase #=> String
resp.build.build_status #=> String, one of "SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
resp.build.source_version #=> String
resp.build.project_name #=> String
resp.build.phases #=> Array
resp.build.phases[0].phase_type #=> String, one of "SUBMITTED", "PROVISIONING", "DOWNLOAD_SOURCE", "INSTALL", "PRE_BUILD", "BUILD", "POST_BUILD", "UPLOAD_ARTIFACTS", "FINALIZING", "COMPLETED"
resp.build.phases[0].phase_status #=> String, one of "SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
resp.build.phases[0].start_time #=> Time
resp.build.phases[0].end_time #=> Time
resp.build.phases[0].duration_in_seconds #=> Integer
resp.build.phases[0].contexts #=> Array
resp.build.phases[0].contexts[0].status_code #=> String
resp.build.phases[0].contexts[0].message #=> String
resp.build.source.type #=> String, one of "CODECOMMIT", "CODEPIPELINE", "GITHUB", "S3", "BITBUCKET"
resp.build.source.location #=> String
resp.build.source.buildspec #=> String
resp.build.source.auth.type #=> String, one of "OAUTH"
resp.build.source.auth.resource #=> String
resp.build.artifacts.location #=> String
resp.build.artifacts.sha256sum #=> String
resp.build.artifacts.md5sum #=> String
resp.build.environment.type #=> String, one of "LINUX_CONTAINER"
resp.build.environment.image #=> String
resp.build.environment.compute_type #=> String, one of "BUILD_GENERAL1_SMALL", "BUILD_GENERAL1_MEDIUM", "BUILD_GENERAL1_LARGE"
resp.build.environment.environment_variables #=> Array
resp.build.environment.environment_variables[0].name #=> String
resp.build.environment.environment_variables[0].value #=> String
resp.build.environment.privileged_mode #=> Boolean
resp.build.logs.group_name #=> String
resp.build.logs.stream_name #=> String
resp.build.logs.deep_link #=> String
resp.build.timeout_in_minutes #=> Integer
resp.build.build_complete #=> Boolean
resp.build.initiator #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :project_name (required, String)

    The name of the build project to start running a build.

  • :source_version (String)

    A version of the build input to be built, for this build only. If not specified, the latest version will be used. If specified, must be one of:

    • For AWS CodeCommit or GitHub: the commit ID to use.

    • For Amazon Simple Storage Service (Amazon S3): the version ID of the object representing the build input ZIP file to use.

  • :artifacts_override (Types::ProjectArtifacts)

    Build output artifact settings that override, for this build only, the latest ones already defined in the build project.

  • :environment_variables_override (Array<Types::EnvironmentVariable>)

    A set of environment variables that overrides, for this build only, the latest ones already defined in the build project.

  • :buildspec_override (String)

    A build spec declaration that overrides, for this build only, the latest one already defined in the build project.

  • :timeout_in_minutes_override (Integer)

    The number of build timeout minutes, from 5 to 480 (8 hours), that overrides, for this build only, the latest setting already defined in the build project.

Returns:

See Also:



731
732
733
734
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 731

def start_build(params = {}, options = {})
  req = build_request(:start_build, params)
  req.send_request(options)
end

#stop_build(params = {}) ⇒ Types::StopBuildOutput

Attempts to stop running a build.

Examples:

Request syntax with placeholder values


resp = client.stop_build({
  id: "NonEmptyString", # required
})

Response structure


resp.build.id #=> String
resp.build.arn #=> String
resp.build.start_time #=> Time
resp.build.end_time #=> Time
resp.build.current_phase #=> String
resp.build.build_status #=> String, one of "SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
resp.build.source_version #=> String
resp.build.project_name #=> String
resp.build.phases #=> Array
resp.build.phases[0].phase_type #=> String, one of "SUBMITTED", "PROVISIONING", "DOWNLOAD_SOURCE", "INSTALL", "PRE_BUILD", "BUILD", "POST_BUILD", "UPLOAD_ARTIFACTS", "FINALIZING", "COMPLETED"
resp.build.phases[0].phase_status #=> String, one of "SUCCEEDED", "FAILED", "FAULT", "TIMED_OUT", "IN_PROGRESS", "STOPPED"
resp.build.phases[0].start_time #=> Time
resp.build.phases[0].end_time #=> Time
resp.build.phases[0].duration_in_seconds #=> Integer
resp.build.phases[0].contexts #=> Array
resp.build.phases[0].contexts[0].status_code #=> String
resp.build.phases[0].contexts[0].message #=> String
resp.build.source.type #=> String, one of "CODECOMMIT", "CODEPIPELINE", "GITHUB", "S3", "BITBUCKET"
resp.build.source.location #=> String
resp.build.source.buildspec #=> String
resp.build.source.auth.type #=> String, one of "OAUTH"
resp.build.source.auth.resource #=> String
resp.build.artifacts.location #=> String
resp.build.artifacts.sha256sum #=> String
resp.build.artifacts.md5sum #=> String
resp.build.environment.type #=> String, one of "LINUX_CONTAINER"
resp.build.environment.image #=> String
resp.build.environment.compute_type #=> String, one of "BUILD_GENERAL1_SMALL", "BUILD_GENERAL1_MEDIUM", "BUILD_GENERAL1_LARGE"
resp.build.environment.environment_variables #=> Array
resp.build.environment.environment_variables[0].name #=> String
resp.build.environment.environment_variables[0].value #=> String
resp.build.environment.privileged_mode #=> Boolean
resp.build.logs.group_name #=> String
resp.build.logs.stream_name #=> String
resp.build.logs.deep_link #=> String
resp.build.timeout_in_minutes #=> Integer
resp.build.build_complete #=> Boolean
resp.build.initiator #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :id (required, String)

    The ID of the build.

Returns:

See Also:



796
797
798
799
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 796

def stop_build(params = {}, options = {})
  req = build_request(:stop_build, params)
  req.send_request(options)
end

#update_project(params = {}) ⇒ Types::UpdateProjectOutput

Changes the settings of a build project.

Examples:

Request syntax with placeholder values


resp = client.update_project({
  name: "NonEmptyString", # required
  description: "ProjectDescription",
  source: {
    type: "CODECOMMIT", # required, accepts CODECOMMIT, CODEPIPELINE, GITHUB, S3, BITBUCKET
    location: "String",
    buildspec: "String",
    auth: {
      type: "OAUTH", # required, accepts OAUTH
      resource: "String",
    },
  },
  artifacts: {
    type: "CODEPIPELINE", # required, accepts CODEPIPELINE, S3, NO_ARTIFACTS
    location: "String",
    path: "String",
    namespace_type: "NONE", # accepts NONE, BUILD_ID
    name: "String",
    packaging: "NONE", # accepts NONE, ZIP
  },
  environment: {
    type: "LINUX_CONTAINER", # required, accepts LINUX_CONTAINER
    image: "NonEmptyString", # required
    compute_type: "BUILD_GENERAL1_SMALL", # required, accepts BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, BUILD_GENERAL1_LARGE
    environment_variables: [
      {
        name: "NonEmptyString", # required
        value: "String", # required
      },
    ],
    privileged_mode: false,
  },
  service_role: "NonEmptyString",
  timeout_in_minutes: 1,
  encryption_key: "NonEmptyString",
  tags: [
    {
      key: "KeyInput",
      value: "ValueInput",
    },
  ],
})

Response structure


resp.project.name #=> String
resp.project.arn #=> String
resp.project.description #=> String
resp.project.source.type #=> String, one of "CODECOMMIT", "CODEPIPELINE", "GITHUB", "S3", "BITBUCKET"
resp.project.source.location #=> String
resp.project.source.buildspec #=> String
resp.project.source.auth.type #=> String, one of "OAUTH"
resp.project.source.auth.resource #=> String
resp.project.artifacts.type #=> String, one of "CODEPIPELINE", "S3", "NO_ARTIFACTS"
resp.project.artifacts.location #=> String
resp.project.artifacts.path #=> String
resp.project.artifacts.namespace_type #=> String, one of "NONE", "BUILD_ID"
resp.project.artifacts.name #=> String
resp.project.artifacts.packaging #=> String, one of "NONE", "ZIP"
resp.project.environment.type #=> String, one of "LINUX_CONTAINER"
resp.project.environment.image #=> String
resp.project.environment.compute_type #=> String, one of "BUILD_GENERAL1_SMALL", "BUILD_GENERAL1_MEDIUM", "BUILD_GENERAL1_LARGE"
resp.project.environment.environment_variables #=> Array
resp.project.environment.environment_variables[0].name #=> String
resp.project.environment.environment_variables[0].value #=> String
resp.project.environment.privileged_mode #=> Boolean
resp.project.service_role #=> String
resp.project.timeout_in_minutes #=> Integer
resp.project.encryption_key #=> String
resp.project.tags #=> Array
resp.project.tags[0].key #=> String
resp.project.tags[0].value #=> String
resp.project.created #=> Time
resp.project.last_modified #=> Time

Parameters:

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

    ({})

Options Hash (params):

  • :name (required, String)

    The name of the build project.

    You cannot change a build project's name.

  • :description (String)

    A new or replacement description of the build project.

  • :source (Types::ProjectSource)

    Information to be changed about the build input source code for the build project.

  • :artifacts (Types::ProjectArtifacts)

    Information to be changed about the build output artifacts for the build project.

  • :environment (Types::ProjectEnvironment)

    Information to be changed about the build environment for the build project.

  • :service_role (String)

    The replacement ARN of the AWS Identity and Access Management (IAM) role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account.

  • :timeout_in_minutes (Integer)

    The replacement value in minutes, from 5 to 480 (8 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed.

  • :encryption_key (String)

    The replacement AWS Key Management Service (AWS KMS) customer master key (CMK) to be used for encrypting the build output artifacts.

    You can specify either the CMK's Amazon Resource Name (ARN) or, if available, the CMK's alias (using the format alias/alias-name).

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

    The replacement set of tags for this build project.

    These tags are available for use by AWS services that support AWS CodeBuild build project tags.

Returns:

See Also:



933
934
935
936
# File 'gems/aws-sdk-codebuild/lib/aws-sdk-codebuild/client.rb', line 933

def update_project(params = {}, options = {})
  req = build_request(:update_project, params)
  req.send_request(options)
end