Class: Aws::CodeCommit::Client

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

Overview

An API client for CodeCommit. To construct a client, you need to configure a ‘:region` and `:credentials`.

client = Aws::CodeCommit::Client.new(
  region: region_name,
  credentials: credentials,
  # ...
)

For details on configuring region and credentials see the [developer guide](/sdk-for-ruby/v3/developer-guide/setup-config.html).

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

Class Attribute Summary collapse

API Operations collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Client

Returns a new instance of Client.

Parameters:

  • options (Hash)

Options Hash (options):

  • :plugins (Array<Seahorse::Client::Plugin>) — default: []]

    A list of plugins to apply to the client. Each plugin is either a class name or an instance of a plugin class.

  • :credentials (required, Aws::CredentialProvider)

    Your AWS credentials. This can be an instance of any one of the following classes:

    • ‘Aws::Credentials` - Used for configuring static, non-refreshing credentials.

    • ‘Aws::SharedCredentials` - Used for loading static credentials from a shared file, such as `~/.aws/config`.

    • ‘Aws::AssumeRoleCredentials` - Used when you need to assume a role.

    • ‘Aws::AssumeRoleWebIdentityCredentials` - Used when you need to assume a role after providing credentials via the web.

    • ‘Aws::SSOCredentials` - Used for loading credentials from AWS SSO using an access token generated from `aws login`.

    • ‘Aws::ProcessCredentials` - Used for loading credentials from a process that outputs to stdout.

    • ‘Aws::InstanceProfileCredentials` - Used for loading credentials from an EC2 IMDS on an EC2 instance.

    • ‘Aws::ECSCredentials` - Used for loading credentials from instances running in ECS.

    • ‘Aws::CognitoIdentityCredentials` - Used for loading credentials from the Cognito Identity service.

    When ‘:credentials` are not configured directly, the following locations will be searched for credentials:

    • Aws.config`

    • The ‘:access_key_id`, `:secret_access_key`, `:session_token`, and `:account_id` options.

    • ENV, ENV, ENV, and ENV

    • ‘~/.aws/credentials`

    • ‘~/.aws/config`

    • EC2/ECS IMDS instance profile - When used by default, the timeouts are very aggressive. Construct and pass an instance of ‘Aws::InstanceProfileCredentials` or `Aws::ECSCredentials` to enable retries and extended timeouts. Instance profile credential fetching can be disabled by setting ENV to true.

  • :region (required, String)

    The AWS region to connect to. The configured ‘:region` is used to determine the service `:endpoint`. When not passed, a default `:region` is searched for in the following locations:

  • :access_key_id (String)
  • :account_id (String)
  • :active_endpoint_cache (Boolean) — default: false

    When set to ‘true`, a thread polling for endpoints will be running in the background every 60 secs (default). Defaults to `false`.

  • :adaptive_retry_wait_to_fill (Boolean) — default: true

    Used only in ‘adaptive` retry mode. When true, the request will sleep until there is sufficent client side capacity to retry the request. When false, the request will raise a `RetryCapacityNotAvailableError` and will not retry instead of sleeping.

  • :client_side_monitoring (Boolean) — default: false

    When ‘true`, client-side metrics will be collected for all API requests from this client.

  • :client_side_monitoring_client_id (String) — default: ""

    Allows you to provide an identifier for this client which will be attached to all generated client side metrics. Defaults to an empty string.

  • :client_side_monitoring_host (String) — default: "127.0.0.1"

    Allows you to specify the DNS hostname or IPv4 or IPv6 address that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_port (Integer) — default: 31000

    Required for publishing client metrics. The port that the client side monitoring agent is running on, where client metrics will be published via UDP.

  • :client_side_monitoring_publisher (Aws::ClientSideMonitoring::Publisher) — default: Aws::ClientSideMonitoring::Publisher

    Allows you to provide a custom client-side monitoring publisher class. By default, will use the Client Side Monitoring Agent Publisher.

  • :convert_params (Boolean) — default: true

    When ‘true`, an attempt is made to coerce request parameters into the required types.

  • :correct_clock_skew (Boolean) — default: true

    Used only in ‘standard` and adaptive retry modes. Specifies whether to apply a clock skew correction and retry requests with skewed client clocks.

  • :defaults_mode (String) — default: "legacy"

    See DefaultsModeConfiguration for a list of the accepted modes and the configuration defaults that are included.

  • :disable_host_prefix_injection (Boolean) — default: false

    Set to true to disable SDK automatically adding host prefix to default service endpoint when available.

  • :disable_request_compression (Boolean) — default: false

    When set to ‘true’ the request body will not be compressed for supported operations.

  • :endpoint (String, URI::HTTPS, URI::HTTP)

    Normally you should not configure the ‘:endpoint` option directly. This is normally constructed from the `:region` option. Configuring `:endpoint` is normally reserved for connecting to test or custom endpoints. The endpoint should be a URI formatted like:

    'http://example.com'
    'https://example.com'
    'http://example.com:123'
    
  • :endpoint_cache_max_entries (Integer) — default: 1000

    Used for the maximum size limit of the LRU cache storing endpoints data for endpoint discovery enabled operations. Defaults to 1000.

  • :endpoint_cache_max_threads (Integer) — default: 10

    Used for the maximum threads in use for polling endpoints to be cached, defaults to 10.

  • :endpoint_cache_poll_interval (Integer) — default: 60

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

  • :endpoint_discovery (Boolean) — default: false

    When set to ‘true`, endpoint discovery will be enabled for operations when available.

  • :ignore_configured_endpoint_urls (Boolean)

    Setting to true disables use of endpoint URLs provided via environment variables and the shared configuration file.

  • :log_formatter (Aws::Log::Formatter) — default: Aws::Log::Formatter.default

    The log formatter.

  • :log_level (Symbol) — default: :info

    The log level to send messages to the ‘:logger` at.

  • :logger (Logger)

    The Logger instance to send log messages to. If this option is not set, logging will be disabled.

  • :max_attempts (Integer) — default: 3

    An integer representing the maximum number attempts that will be made for a single request, including the initial attempt. For example, setting this value to 5 will result in a request being retried up to 4 times. Used in ‘standard` and `adaptive` retry modes.

  • :profile (String) — default: "default"

    Used when loading credentials from the shared credentials file at HOME/.aws/credentials. When not specified, ‘default’ is used.

  • :request_min_compression_size_bytes (Integer) — default: 10240

    The minimum size in bytes that triggers compression for request bodies. The value must be non-negative integer value between 0 and 10485780 bytes inclusive.

  • :retry_backoff (Proc)

    A proc or lambda used for backoff. Defaults to 2**retries * retry_base_delay. This option is only used in the ‘legacy` retry mode.

  • :retry_base_delay (Float) — default: 0.3

    The base delay in seconds used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_jitter (Symbol) — default: :none

    A delay randomiser function used by the default backoff function. Some predefined functions can be referenced by name - :none, :equal, :full, otherwise a Proc that takes and returns a number. This option is only used in the ‘legacy` retry mode.

    @see www.awsarchitectureblog.com/2015/03/backoff.html

  • :retry_limit (Integer) — default: 3

    The maximum number of times to retry failed requests. Only ~ 500 level server errors and certain ~ 400 level client errors are retried. Generally, these are throttling errors, data checksum errors, networking errors, timeout errors, auth errors, endpoint discovery, and errors from expired credentials. This option is only used in the ‘legacy` retry mode.

  • :retry_max_delay (Integer) — default: 0

    The maximum number of seconds to delay between retries (0 for no limit) used by the default backoff function. This option is only used in the ‘legacy` retry mode.

  • :retry_mode (String) — default: "legacy"

    Specifies which retry algorithm to use. Values are:

    • ‘legacy` - The pre-existing retry behavior. This is default value if no retry mode is provided.

    • ‘standard` - A standardized set of retry rules across the AWS SDKs. This includes support for retry quotas, which limit the number of unsuccessful retries a client can make.

    • ‘adaptive` - An experimental retry mode that includes all the functionality of `standard` mode along with automatic client side throttling. This is a provisional mode that may change behavior in the future.

  • :sdk_ua_app_id (String)

    A unique and opaque application ID that is appended to the User-Agent header as app/sdk_ua_app_id. It should have a maximum length of 50. This variable is sourced from environment variable AWS_SDK_UA_APP_ID or the shared config profile attribute sdk_ua_app_id.

  • :secret_access_key (String)
  • :session_token (String)
  • :sigv4a_signing_region_set (Array)

    A list of regions that should be signed with SigV4a signing. When not passed, a default ‘:sigv4a_signing_region_set` is searched for in the following locations:

  • :simple_json (Boolean) — default: false

    Disables request parameter conversion, validation, and formatting. Also disables response data type conversions. The request parameters hash must be formatted exactly as the API expects.This option is useful when you want to ensure the highest level of performance by avoiding overhead of walking request parameters and response data structures.

  • :stub_responses (Boolean) — default: false

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

    ** Please note ** When response stubbing is enabled, no HTTP requests are made, and retries are disabled.

  • :telemetry_provider (Aws::Telemetry::TelemetryProviderBase) — default: Aws::Telemetry::NoOpTelemetryProvider

    Allows you to provide a telemetry provider, which is used to emit telemetry data. By default, uses ‘NoOpTelemetryProvider` which will not record or emit any telemetry data. The SDK supports the following telemetry providers:

    • OpenTelemetry (OTel) - To use the OTel provider, install and require the

    ‘opentelemetry-sdk` gem and then, pass in an instance of a `Aws::Telemetry::OTelProvider` for telemetry provider.

  • :token_provider (Aws::TokenProvider)

    A Bearer Token Provider. This can be an instance of any one of the following classes:

    • ‘Aws::StaticTokenProvider` - Used for configuring static, non-refreshing tokens.

    • ‘Aws::SSOTokenProvider` - Used for loading tokens from AWS SSO using an access token generated from `aws login`.

    When ‘:token_provider` is not configured directly, the `Aws::TokenProviderChain` will be used to search for tokens configured for your profile in shared configuration files.

  • :use_dualstack_endpoint (Boolean)

    When set to ‘true`, dualstack enabled endpoints (with `.aws` TLD) will be used if available.

  • :use_fips_endpoint (Boolean)

    When set to ‘true`, fips compatible endpoints will be used if available. When a `fips` region is used, the region is normalized and this config is set to `true`.

  • :validate_params (Boolean) — default: true

    When ‘true`, request parameters are validated before sending the request.

  • :endpoint_provider (Aws::CodeCommit::EndpointProvider)

    The endpoint provider used to resolve endpoints. Any object that responds to ‘#resolve_endpoint(parameters)` where `parameters` is a Struct similar to `Aws::CodeCommit::EndpointParameters`.

  • :http_continue_timeout (Float) — default: 1

    The number of seconds to wait for a 100-continue response before sending the request body. This option has no effect unless the request has “Expect” header set to “100-continue”. Defaults to ‘nil` which disables this behaviour. This value can safely be set per request on the session.

  • :http_idle_timeout (Float) — default: 5

    The number of seconds a connection is allowed to sit idle before it is considered stale. Stale connections are closed and removed from the pool before making a request.

  • :http_open_timeout (Float) — default: 15

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_proxy (URI::HTTP, String)

    A proxy to send requests through. Formatted like ‘proxy.com:123’.

  • :http_read_timeout (Float) — default: 60

    The default number of seconds to wait for response data. This value can safely be set per-request on the session.

  • :http_wire_trace (Boolean) — default: false

    When ‘true`, HTTP debug output will be sent to the `:logger`.

  • :on_chunk_received (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the response body is received. It provides three arguments: the chunk, the number of bytes received, and the total number of bytes in the response (or nil if the server did not send a ‘content-length`).

  • :on_chunk_sent (Proc)

    When a Proc object is provided, it will be used as callback when each chunk of the request body is sent. It provides three arguments: the chunk, the number of bytes read from the body, and the total number of bytes in the body.

  • :raise_response_errors (Boolean) — default: true

    When ‘true`, response errors are raised.

  • :ssl_ca_bundle (String)

    Full path to the SSL certificate authority bundle file that should be used when verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_directory (String)

    Full path of the directory that contains the unbundled SSL certificate authority files for verifying peer certificates. If you do not pass ‘:ssl_ca_bundle` or `:ssl_ca_directory` the the system default will be used if available.

  • :ssl_ca_store (String)

    Sets the X509::Store to verify peer certificate.

  • :ssl_cert (OpenSSL::X509::Certificate)

    Sets a client certificate when creating http connections.

  • :ssl_key (OpenSSL::PKey)

    Sets a client key when creating http connections.

  • :ssl_timeout (Float)

    Sets the SSL timeout in seconds

  • :ssl_verify_peer (Boolean) — default: true

    When ‘true`, SSL peer certificates are verified when establishing a connection.



451
452
453
# File 'lib/aws-sdk-codecommit/client.rb', line 451

def initialize(*args)
  super
end

Class Attribute Details

.identifierObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5196
5197
5198
# File 'lib/aws-sdk-codecommit/client.rb', line 5196

def identifier
  @identifier
end

Class Method Details

.errors_moduleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



5199
5200
5201
# File 'lib/aws-sdk-codecommit/client.rb', line 5199

def errors_module
  Errors
end

Instance Method Details

#associate_approval_rule_template_with_repository(params = {}) ⇒ Struct

Creates an association between an approval rule template and a specified repository. Then, the next time a pull request is created in the repository where the destination reference (if specified) matches the destination reference (branch) for the pull request, an approval rule that matches the template conditions is automatically created for that pull request. If no destination references are specified in the template, an approval rule that matches the template contents is created for all pull requests in that repository.

Examples:

Request syntax with placeholder values


resp = client.associate_approval_rule_template_with_repository({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  repository_name: "RepositoryName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name for the approval rule template.

  • :repository_name (required, String)

    The name of the repository that you want to associate with the template.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



486
487
488
489
# File 'lib/aws-sdk-codecommit/client.rb', line 486

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

#batch_associate_approval_rule_template_with_repositories(params = {}) ⇒ Types::BatchAssociateApprovalRuleTemplateWithRepositoriesOutput

Creates an association between an approval rule template and one or more specified repositories.

Examples:

Request syntax with placeholder values


resp = client.batch_associate_approval_rule_template_with_repositories({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  repository_names: ["RepositoryName"], # required
})

Response structure


resp.associated_repository_names #=> Array
resp.associated_repository_names[0] #=> String
resp.errors #=> Array
resp.errors[0].repository_name #=> String
resp.errors[0].error_code #=> String
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the template you want to associate with one or more repositories.

  • :repository_names (required, Array<String>)

    The names of the repositories you want to associate with the template.

    <note markdown=“1”> The length constraint limit is for each string in the array. The array itself can be empty.

    </note>
    

Returns:

See Also:



531
532
533
534
# File 'lib/aws-sdk-codecommit/client.rb', line 531

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

#batch_describe_merge_conflicts(params = {}) ⇒ Types::BatchDescribeMergeConflictsOutput

Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy.

Examples:

Request syntax with placeholder values


resp = client.batch_describe_merge_conflicts({
  repository_name: "RepositoryName", # required
  destination_commit_specifier: "CommitName", # required
  source_commit_specifier: "CommitName", # required
  merge_option: "FAST_FORWARD_MERGE", # required, accepts FAST_FORWARD_MERGE, SQUASH_MERGE, THREE_WAY_MERGE
  max_merge_hunks: 1,
  max_conflict_files: 1,
  file_paths: ["Path"],
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  next_token: "NextToken",
})

Response structure


resp.conflicts #=> Array
resp.conflicts[0]..file_path #=> String
resp.conflicts[0]..file_sizes.source #=> Integer
resp.conflicts[0]..file_sizes.destination #=> Integer
resp.conflicts[0]..file_sizes.base #=> Integer
resp.conflicts[0]..file_modes.source #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.conflicts[0]..file_modes.destination #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.conflicts[0]..file_modes.base #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.conflicts[0]..object_types.source #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp.conflicts[0]..object_types.destination #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp.conflicts[0]..object_types.base #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp.conflicts[0]..number_of_conflicts #=> Integer
resp.conflicts[0]..is_binary_file.source #=> Boolean
resp.conflicts[0]..is_binary_file.destination #=> Boolean
resp.conflicts[0]..is_binary_file.base #=> Boolean
resp.conflicts[0]..content_conflict #=> Boolean
resp.conflicts[0]..file_mode_conflict #=> Boolean
resp.conflicts[0]..object_type_conflict #=> Boolean
resp.conflicts[0]..merge_operations.source #=> String, one of "A", "M", "D"
resp.conflicts[0]..merge_operations.destination #=> String, one of "A", "M", "D"
resp.conflicts[0].merge_hunks #=> Array
resp.conflicts[0].merge_hunks[0].is_conflict #=> Boolean
resp.conflicts[0].merge_hunks[0].source.start_line #=> Integer
resp.conflicts[0].merge_hunks[0].source.end_line #=> Integer
resp.conflicts[0].merge_hunks[0].source.hunk_content #=> String
resp.conflicts[0].merge_hunks[0].destination.start_line #=> Integer
resp.conflicts[0].merge_hunks[0].destination.end_line #=> Integer
resp.conflicts[0].merge_hunks[0].destination.hunk_content #=> String
resp.conflicts[0].merge_hunks[0].base.start_line #=> Integer
resp.conflicts[0].merge_hunks[0].base.end_line #=> Integer
resp.conflicts[0].merge_hunks[0].base.hunk_content #=> String
resp.next_token #=> String
resp.errors #=> Array
resp.errors[0].file_path #=> String
resp.errors[0].exception_name #=> String
resp.errors[0].message #=> String
resp.destination_commit_id #=> String
resp.source_commit_id #=> String
resp.base_commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the merge conflicts you want to review.

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :merge_option (required, String)

    The merge option or strategy you want to use to merge the code.

  • :max_merge_hunks (Integer)

    The maximum number of merge hunks to include in the output.

  • :max_conflict_files (Integer)

    The maximum number of files to include in the output.

  • :file_paths (Array<String>)

    The path of the target files used to describe the conflicts. If not specified, the default is all conflict files.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

Returns:

See Also:



652
653
654
655
# File 'lib/aws-sdk-codecommit/client.rb', line 652

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

#batch_disassociate_approval_rule_template_from_repositories(params = {}) ⇒ Types::BatchDisassociateApprovalRuleTemplateFromRepositoriesOutput

Removes the association between an approval rule template and one or more specified repositories.

Examples:

Request syntax with placeholder values


resp = client.batch_disassociate_approval_rule_template_from_repositories({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  repository_names: ["RepositoryName"], # required
})

Response structure


resp.disassociated_repository_names #=> Array
resp.disassociated_repository_names[0] #=> String
resp.errors #=> Array
resp.errors[0].repository_name #=> String
resp.errors[0].error_code #=> String
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the template that you want to disassociate from one or more repositories.

  • :repository_names (required, Array<String>)

    The repository names that you want to disassociate from the approval rule template.

    <note markdown=“1”> The length constraint limit is for each string in the array. The array itself can be empty.

    </note>
    

Returns:

See Also:



698
699
700
701
# File 'lib/aws-sdk-codecommit/client.rb', line 698

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

#batch_get_commits(params = {}) ⇒ Types::BatchGetCommitsOutput

Returns information about the contents of one or more commits in a repository.

Examples:

Request syntax with placeholder values


resp = client.batch_get_commits({
  commit_ids: ["ObjectId"], # required
  repository_name: "RepositoryName", # required
})

Response structure


resp.commits #=> Array
resp.commits[0].commit_id #=> String
resp.commits[0].tree_id #=> String
resp.commits[0].parents #=> Array
resp.commits[0].parents[0] #=> String
resp.commits[0].message #=> String
resp.commits[0].author.name #=> String
resp.commits[0].author.email #=> String
resp.commits[0].author.date #=> String
resp.commits[0].committer.name #=> String
resp.commits[0].committer.email #=> String
resp.commits[0].committer.date #=> String
resp.commits[0].additional_data #=> String
resp.errors #=> Array
resp.errors[0].commit_id #=> String
resp.errors[0].error_code #=> String
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :commit_ids (required, Array<String>)

    The full commit IDs of the commits to get information about.

    <note markdown=“1”> You must supply the full SHA IDs of each commit. You cannot use shortened SHA IDs.

    </note>
    
  • :repository_name (required, String)

    The name of the repository that contains the commits.

Returns:

See Also:



753
754
755
756
# File 'lib/aws-sdk-codecommit/client.rb', line 753

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

#batch_get_repositories(params = {}) ⇒ Types::BatchGetRepositoriesOutput

Returns information about one or more repositories.

<note markdown=“1”> The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.

</note>

Examples:

Request syntax with placeholder values


resp = client.batch_get_repositories({
  repository_names: ["RepositoryName"], # required
})

Response structure


resp.repositories #=> Array
resp.repositories[0]. #=> String
resp.repositories[0].repository_id #=> String
resp.repositories[0].repository_name #=> String
resp.repositories[0].repository_description #=> String
resp.repositories[0].default_branch #=> String
resp.repositories[0].last_modified_date #=> Time
resp.repositories[0].creation_date #=> Time
resp.repositories[0].clone_url_http #=> String
resp.repositories[0].clone_url_ssh #=> String
resp.repositories[0].arn #=> String
resp.repositories[0].kms_key_id #=> String
resp.repositories_not_found #=> Array
resp.repositories_not_found[0] #=> String
resp.errors #=> Array
resp.errors[0].repository_id #=> String
resp.errors[0].repository_name #=> String
resp.errors[0].error_code #=> String, one of "EncryptionIntegrityChecksFailedException", "EncryptionKeyAccessDeniedException", "EncryptionKeyDisabledException", "EncryptionKeyNotFoundException", "EncryptionKeyUnavailableException", "RepositoryDoesNotExistException"
resp.errors[0].error_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_names (required, Array<String>)

    The names of the repositories to get information about.

    <note markdown=“1”> The length constraint limit is for each string in the array. The array itself can be empty.

    </note>
    

Returns:

See Also:



815
816
817
818
# File 'lib/aws-sdk-codecommit/client.rb', line 815

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

#build_request(operation_name, params = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

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


5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
# File 'lib/aws-sdk-codecommit/client.rb', line 5169

def build_request(operation_name, params = {})
  handlers = @handlers.for(operation_name)
  tracer = config.telemetry_provider.tracer_provider.tracer(
    Aws::Telemetry.module_to_tracer_name('Aws::CodeCommit')
  )
  context = Seahorse::Client::RequestContext.new(
    operation_name: operation_name,
    operation: config.api.operation(operation_name),
    client: self,
    params: params,
    config: config,
    tracer: tracer
  )
  context[:gem_name] = 'aws-sdk-codecommit'
  context[:gem_version] = '1.80.0'
  Seahorse::Client::Request.new(handlers, context)
end

#create_approval_rule_template(params = {}) ⇒ Types::CreateApprovalRuleTemplateOutput

Creates a template for approval rules that can then be associated with one or more repositories in your Amazon Web Services account. When you associate a template with a repository, CodeCommit creates an approval rule that matches the conditions of the template for all pull requests that meet the conditions of the template. For more information, see AssociateApprovalRuleTemplateWithRepository.

Examples:

Request syntax with placeholder values


resp = client.create_approval_rule_template({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  approval_rule_template_content: "ApprovalRuleTemplateContent", # required
  approval_rule_template_description: "ApprovalRuleTemplateDescription",
})

Response structure


resp.approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule_template.approval_rule_template_name #=> String
resp.approval_rule_template.approval_rule_template_description #=> String
resp.approval_rule_template.approval_rule_template_content #=> String
resp.approval_rule_template.rule_content_sha_256 #=> String
resp.approval_rule_template.last_modified_date #=> Time
resp.approval_rule_template.creation_date #=> Time
resp.approval_rule_template.last_modified_user #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the approval rule template. Provide descriptive names, because this name is applied to the approval rules created automatically in associated repositories.

  • :approval_rule_template_content (required, String)

    The content of the approval rule that is created on pull requests in associated repositories. If you specify one or more destination references (branches), approval rules are created in an associated repository only if their destination references (branches) match those specified in the template.

    <note markdown=“1”> When you create the content of the approval rule template, you can specify approvers in an approval pool in one of two ways:

    * **CodeCommitApprovers**: This option only requires an Amazon Web
     Services account and a resource. It can be used for both IAM users
     and federated access users whose name matches the provided resource
     name. This is a very powerful option that offers a great deal of
     flexibility. For example, if you specify the Amazon Web Services
     account *123456789012* and *Mary\_Major*, all of the following are
     counted as approvals coming from that user:
    
     * An IAM user in the account
       (arn:aws:iam::*123456789012*:user/*Mary\_Major*)
    
     * A federated user identified in IAM as Mary\_Major
       (arn:aws:sts::*123456789012*:federated-user/*Mary\_Major*)
     This option does not recognize an active session of someone assuming
     the role of CodeCommitReview with a role session name of
     *Mary\_Major*
     (arn:aws:sts::*123456789012*:assumed-role/CodeCommitReview/*Mary\_Major*)
     unless you include a wildcard (*Mary\_Major).
    
    • **Fully qualified ARN**: This option allows you to specify the fully qualified Amazon Resource Name (ARN) of the IAM user or role.

    For more information about IAM ARNs, wildcards, and formats, see [IAM
    

    Identifiers] in the *IAM User Guide*.

    </note>
    

    [1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html

  • :approval_rule_template_description (String)

    The description of the approval rule template. Consider providing a description that explains what this template does and when it might be appropriate to associate it with repositories.

Returns:

See Also:



905
906
907
908
# File 'lib/aws-sdk-codecommit/client.rb', line 905

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

#create_branch(params = {}) ⇒ Struct

Creates a branch in a repository and points the branch to a commit.

<note markdown=“1”> Calling the create branch operation does not set a repository’s default branch. To do this, call the update default branch operation.

</note>

Examples:

Request syntax with placeholder values


resp = client.create_branch({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
  commit_id: "CommitId", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository in which you want to create the new branch.

  • :branch_name (required, String)

    The name of the new branch to create.

  • :commit_id (required, String)

    The ID of the commit to point the new branch to.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



940
941
942
943
# File 'lib/aws-sdk-codecommit/client.rb', line 940

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

#create_commit(params = {}) ⇒ Types::CreateCommitOutput

Creates a commit for a repository on the tip of a specified branch.

Examples:

Request syntax with placeholder values


resp = client.create_commit({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
  parent_commit_id: "CommitId",
  author_name: "Name",
  email: "Email",
  commit_message: "Message",
  keep_empty_folders: false,
  put_files: [
    {
      file_path: "Path", # required
      file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      file_content: "data",
      source_file: {
        file_path: "Path", # required
        is_move: false,
      },
    },
  ],
  delete_files: [
    {
      file_path: "Path", # required
    },
  ],
  set_file_modes: [
    {
      file_path: "Path", # required
      file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
    },
  ],
})

Response structure


resp.commit_id #=> String
resp.tree_id #=> String
resp.files_added #=> Array
resp.files_added[0].absolute_path #=> String
resp.files_added[0].blob_id #=> String
resp.files_added[0].file_mode #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.files_updated #=> Array
resp.files_updated[0].absolute_path #=> String
resp.files_updated[0].blob_id #=> String
resp.files_updated[0].file_mode #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.files_deleted #=> Array
resp.files_deleted[0].absolute_path #=> String
resp.files_deleted[0].blob_id #=> String
resp.files_deleted[0].file_mode #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you create the commit.

  • :branch_name (required, String)

    The name of the branch where you create the commit.

  • :parent_commit_id (String)

    The ID of the commit that is the parent of the commit you create. Not required if this is an empty repository.

  • :author_name (String)

    The name of the author who created the commit. This information is used as both the author and committer for the commit.

  • :email (String)

    The email address of the person who created the commit.

  • :commit_message (String)

    The commit message you want to include in the commit. Commit messages are limited to 256 KB. If no message is specified, a default message is used.

  • :keep_empty_folders (Boolean)

    If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a ..gitkeep file is created for empty folders. The default is false.

  • :put_files (Array<Types::PutFileEntry>)

    The files to add or update in this commit.

  • :delete_files (Array<Types::DeleteFileEntry>)

    The files to delete in this commit. These files still exist in earlier commits.

  • :set_file_modes (Array<Types::SetFileModeEntry>)

    The file modes to update for files in this commit.

Returns:

See Also:



1047
1048
1049
1050
# File 'lib/aws-sdk-codecommit/client.rb', line 1047

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

#create_pull_request(params = {}) ⇒ Types::CreatePullRequestOutput

Creates a pull request in the specified repository.

Examples:

Request syntax with placeholder values


resp = client.create_pull_request({
  title: "Title", # required
  description: "Description",
  targets: [ # required
    {
      repository_name: "RepositoryName", # required
      source_reference: "ReferenceName", # required
      destination_reference: "ReferenceName",
    },
  ],
  client_request_token: "ClientRequestToken",
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :title (required, String)

    The title of the pull request. This title is used to identify the pull request to other users in the repository.

  • :description (String)

    A description of the pull request.

  • :targets (required, Array<Types::Target>)

    The targets for the pull request, including the source of the code to be reviewed (the source branch) and the destination where the creator of the pull request intends the code to be merged after the pull request is closed (the destination branch).

  • :client_request_token (String)

    A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.

    <note markdown=“1”> The Amazon Web ServicesSDKs prepopulate client request tokens. If you are using an Amazon Web ServicesSDK, an idempotency token is created for you.

    </note>
    

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

Returns:

See Also:



1139
1140
1141
1142
# File 'lib/aws-sdk-codecommit/client.rb', line 1139

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

#create_pull_request_approval_rule(params = {}) ⇒ Types::CreatePullRequestApprovalRuleOutput

Creates an approval rule for a pull request.

Examples:

Request syntax with placeholder values


resp = client.create_pull_request_approval_rule({
  pull_request_id: "PullRequestId", # required
  approval_rule_name: "ApprovalRuleName", # required
  approval_rule_content: "ApprovalRuleContent", # required
})

Response structure


resp.approval_rule.approval_rule_id #=> String
resp.approval_rule.approval_rule_name #=> String
resp.approval_rule.approval_rule_content #=> String
resp.approval_rule.rule_content_sha_256 #=> String
resp.approval_rule.last_modified_date #=> Time
resp.approval_rule.creation_date #=> Time
resp.approval_rule.last_modified_user #=> String
resp.approval_rule.origin_approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule.origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request for which you want to create the approval rule.

  • :approval_rule_name (required, String)

    The name for the approval rule.

  • :approval_rule_content (required, String)

    The content of the approval rule, including the number of approvals needed and the structure of an approval pool defined for approvals, if any. For more information about approval pools, see the CodeCommit User Guide.

    <note markdown=“1”> When you create the content of the approval rule, you can specify approvers in an approval pool in one of two ways:

    * **CodeCommitApprovers**: This option only requires an Amazon Web
     Services account and a resource. It can be used for both IAM users
     and federated access users whose name matches the provided resource
     name. This is a very powerful option that offers a great deal of
     flexibility. For example, if you specify the Amazon Web Services
     account *123456789012* and *Mary\_Major*, all of the following would
     be counted as approvals coming from that user:
    
     * An IAM user in the account
       (arn:aws:iam::*123456789012*:user/*Mary\_Major*)
    
     * A federated user identified in IAM as Mary\_Major
       (arn:aws:sts::*123456789012*:federated-user/*Mary\_Major*)
     This option does not recognize an active session of someone assuming
     the role of CodeCommitReview with a role session name of
     *Mary\_Major*
     (arn:aws:sts::*123456789012*:assumed-role/CodeCommitReview/*Mary\_Major*)
     unless you include a wildcard (*Mary\_Major).
    
    • **Fully qualified ARN**: This option allows you to specify the fully qualified Amazon Resource Name (ARN) of the IAM user or role.

    For more information about IAM ARNs, wildcards, and formats, see [IAM
    

    Identifiers] in the *IAM User Guide*.

    </note>
    

    [1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html

Returns:

See Also:



1221
1222
1223
1224
# File 'lib/aws-sdk-codecommit/client.rb', line 1221

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

#create_repository(params = {}) ⇒ Types::CreateRepositoryOutput

Creates a new, empty repository.

Examples:

Request syntax with placeholder values


resp = client.create_repository({
  repository_name: "RepositoryName", # required
  repository_description: "RepositoryDescription",
  tags: {
    "TagKey" => "TagValue",
  },
  kms_key_id: "KmsKeyId",
})

Response structure


resp.. #=> String
resp..repository_id #=> String
resp..repository_name #=> String
resp..repository_description #=> String
resp..default_branch #=> String
resp..last_modified_date #=> Time
resp..creation_date #=> Time
resp..clone_url_http #=> String
resp..clone_url_ssh #=> String
resp..arn #=> String
resp..kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the new repository to be created.

    <note markdown=“1”> The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. For more information about the limits on repository names, see [Quotas] in the *CodeCommit User Guide*. The suffix .git is prohibited.

    </note>
    

    [1]: docs.aws.amazon.com/codecommit/latest/userguide/limits.html

  • :repository_description (String)

    A comment or description about the new repository.

    <note markdown=“1”> The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.

    </note>
    
  • :tags (Hash<String,String>)

    One or more tag key-value pairs to use when tagging this repository.

  • :kms_key_id (String)

    The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for kmsKeyID, see

    KeyId][1

    in the Decrypt API description in the *Key Management

    Service API Reference*.

    If no key is specified, the default ‘aws/codecommit` Amazon Web Services managed key is used.

    [1]: docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId

Returns:

See Also:



1306
1307
1308
1309
# File 'lib/aws-sdk-codecommit/client.rb', line 1306

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

#create_unreferenced_merge_commit(params = {}) ⇒ Types::CreateUnreferencedMergeCommitOutput

Creates an unreferenced commit that represents the result of merging two branches using a specified merge strategy. This can help you determine the outcome of a potential merge. This API cannot be used with the fast-forward merge strategy because that strategy does not create a merge commit.

<note markdown=“1”> This unreferenced merge commit can only be accessed using the GetCommit API or through git commands such as git fetch. To retrieve this commit, you must specify its commit ID or otherwise reference it.

</note>

Examples:

Request syntax with placeholder values


resp = client.create_unreferenced_merge_commit({
  repository_name: "RepositoryName", # required
  source_commit_specifier: "CommitName", # required
  destination_commit_specifier: "CommitName", # required
  merge_option: "FAST_FORWARD_MERGE", # required, accepts FAST_FORWARD_MERGE, SQUASH_MERGE, THREE_WAY_MERGE
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  author_name: "Name",
  email: "Email",
  commit_message: "Message",
  keep_empty_folders: false,
  conflict_resolution: {
    replace_contents: [
      {
        file_path: "Path", # required
        replacement_type: "KEEP_BASE", # required, accepts KEEP_BASE, KEEP_SOURCE, KEEP_DESTINATION, USE_NEW_CONTENT
        content: "data",
        file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
    delete_files: [
      {
        file_path: "Path", # required
      },
    ],
    set_file_modes: [
      {
        file_path: "Path", # required
        file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
  },
})

Response structure


resp.commit_id #=> String
resp.tree_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to create the unreferenced merge commit.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :merge_option (required, String)

    The merge option or strategy you want to use to merge the code.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :author_name (String)

    The name of the author who created the unreferenced commit. This information is used as both the author and committer for the commit.

  • :email (String)

    The email address for the person who created the unreferenced commit.

  • :commit_message (String)

    The commit message for the unreferenced commit.

  • :keep_empty_folders (Boolean)

    If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file is created for empty folders. The default is false.

  • :conflict_resolution (Types::ConflictResolution)

    If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.

Returns:

See Also:



1421
1422
1423
1424
# File 'lib/aws-sdk-codecommit/client.rb', line 1421

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

#delete_approval_rule_template(params = {}) ⇒ Types::DeleteApprovalRuleTemplateOutput

Deletes a specified approval rule template. Deleting a template does not remove approval rules on pull requests already created with the template.

Examples:

Request syntax with placeholder values


resp = client.delete_approval_rule_template({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
})

Response structure


resp.approval_rule_template_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the approval rule template to delete.

Returns:

See Also:



1451
1452
1453
1454
# File 'lib/aws-sdk-codecommit/client.rb', line 1451

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

#delete_branch(params = {}) ⇒ Types::DeleteBranchOutput

Deletes a branch from a repository, unless that branch is the default branch for the repository.

Examples:

Request syntax with placeholder values


resp = client.delete_branch({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
})

Response structure


resp.deleted_branch.branch_name #=> String
resp.deleted_branch.commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the branch to be deleted.

  • :branch_name (required, String)

    The name of the branch to delete.

Returns:

See Also:



1485
1486
1487
1488
# File 'lib/aws-sdk-codecommit/client.rb', line 1485

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

#delete_comment_content(params = {}) ⇒ Types::DeleteCommentContentOutput

Deletes the content of a comment made on a change, file, or commit in a repository.

Examples:

Request syntax with placeholder values


resp = client.delete_comment_content({
  comment_id: "CommentId", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String
resp.comment.caller_reactions #=> Array
resp.comment.caller_reactions[0] #=> String
resp.comment.reaction_counts #=> Hash
resp.comment.reaction_counts["ReactionValue"] #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

Returns:

See Also:



1526
1527
1528
1529
# File 'lib/aws-sdk-codecommit/client.rb', line 1526

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

#delete_file(params = {}) ⇒ Types::DeleteFileOutput

Deletes a specified file from a specified branch. A commit is created on the branch that contains the revision. The file still exists in the commits earlier to the commit that contains the deletion.

Examples:

Request syntax with placeholder values


resp = client.delete_file({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
  file_path: "Path", # required
  parent_commit_id: "CommitId", # required
  keep_empty_folders: false,
  commit_message: "Message",
  name: "Name",
  email: "Email",
})

Response structure


resp.commit_id #=> String
resp.blob_id #=> String
resp.tree_id #=> String
resp.file_path #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the file to delete.

  • :branch_name (required, String)

    The name of the branch where the commit that deletes the file is made.

  • :file_path (required, String)

    The fully qualified path to the file that to be deleted, including the full name and extension of that file. For example, /examples/file.md is a fully qualified path to a file named file.md in a folder named examples.

  • :parent_commit_id (required, String)

    The ID of the commit that is the tip of the branch where you want to create the commit that deletes the file. This must be the HEAD commit for the branch. The commit that deletes the file is created from this commit ID.

  • :keep_empty_folders (Boolean)

    If a file is the only object in the folder or directory, specifies whether to delete the folder or directory that contains the file. By default, empty folders are deleted. This includes empty folders that are part of the directory structure. For example, if the path to a file is dir1/dir2/dir3/dir4, and dir2 and dir3 are empty, deleting the last file in dir4 also deletes the empty folders dir4, dir3, and dir2.

  • :commit_message (String)

    The commit message you want to include as part of deleting the file. Commit messages are limited to 256 KB. If no message is specified, a default message is used.

  • :name (String)

    The name of the author of the commit that deletes the file. If no name is specified, the user’s ARN is used as the author name and committer name.

  • :email (String)

    The email address for the commit that deletes the file. If no email address is specified, the email address is left blank.

Returns:

See Also:



1606
1607
1608
1609
# File 'lib/aws-sdk-codecommit/client.rb', line 1606

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

#delete_pull_request_approval_rule(params = {}) ⇒ Types::DeletePullRequestApprovalRuleOutput

Deletes an approval rule from a specified pull request. Approval rules can be deleted from a pull request only if the pull request is open, and if the approval rule was created specifically for a pull request and not generated from an approval rule template associated with the repository where the pull request was created. You cannot delete an approval rule from a merged or closed pull request.

Examples:

Request syntax with placeholder values


resp = client.delete_pull_request_approval_rule({
  pull_request_id: "PullRequestId", # required
  approval_rule_name: "ApprovalRuleName", # required
})

Response structure


resp.approval_rule_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request that contains the approval rule you want to delete.

  • :approval_rule_name (required, String)

    The name of the approval rule you want to delete.

Returns:

See Also:



1644
1645
1646
1647
# File 'lib/aws-sdk-codecommit/client.rb', line 1644

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

#delete_repository(params = {}) ⇒ Types::DeleteRepositoryOutput

Deletes a repository. If a specified repository was already deleted, a null repository ID is returned.

Deleting a repository also deletes all associated objects and metadata. After a repository is deleted, all future push calls to the deleted repository fail.

Examples:

Request syntax with placeholder values


resp = client.delete_repository({
  repository_name: "RepositoryName", # required
})

Response structure


resp.repository_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to delete.

Returns:

See Also:



1677
1678
1679
1680
# File 'lib/aws-sdk-codecommit/client.rb', line 1677

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

#describe_merge_conflicts(params = {}) ⇒ Types::DescribeMergeConflictsOutput

Returns information about one or more merge conflicts in the attempted merge of two commit specifiers using the squash or three-way merge strategy. If the merge option for the attempted merge is specified as FAST_FORWARD_MERGE, an exception is thrown.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_merge_conflicts({
  repository_name: "RepositoryName", # required
  destination_commit_specifier: "CommitName", # required
  source_commit_specifier: "CommitName", # required
  merge_option: "FAST_FORWARD_MERGE", # required, accepts FAST_FORWARD_MERGE, SQUASH_MERGE, THREE_WAY_MERGE
  max_merge_hunks: 1,
  file_path: "Path", # required
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  next_token: "NextToken",
})

Response structure


resp..file_path #=> String
resp..file_sizes.source #=> Integer
resp..file_sizes.destination #=> Integer
resp..file_sizes.base #=> Integer
resp..file_modes.source #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp..file_modes.destination #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp..file_modes.base #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp..object_types.source #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp..object_types.destination #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp..object_types.base #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp..number_of_conflicts #=> Integer
resp..is_binary_file.source #=> Boolean
resp..is_binary_file.destination #=> Boolean
resp..is_binary_file.base #=> Boolean
resp..content_conflict #=> Boolean
resp..file_mode_conflict #=> Boolean
resp..object_type_conflict #=> Boolean
resp..merge_operations.source #=> String, one of "A", "M", "D"
resp..merge_operations.destination #=> String, one of "A", "M", "D"
resp.merge_hunks #=> Array
resp.merge_hunks[0].is_conflict #=> Boolean
resp.merge_hunks[0].source.start_line #=> Integer
resp.merge_hunks[0].source.end_line #=> Integer
resp.merge_hunks[0].source.hunk_content #=> String
resp.merge_hunks[0].destination.start_line #=> Integer
resp.merge_hunks[0].destination.end_line #=> Integer
resp.merge_hunks[0].destination.hunk_content #=> String
resp.merge_hunks[0].base.start_line #=> Integer
resp.merge_hunks[0].base.end_line #=> Integer
resp.merge_hunks[0].base.hunk_content #=> String
resp.next_token #=> String
resp.destination_commit_id #=> String
resp.source_commit_id #=> String
resp.base_commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to get information about a merge conflict.

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :merge_option (required, String)

    The merge option or strategy you want to use to merge the code.

  • :max_merge_hunks (Integer)

    The maximum number of merge hunks to include in the output.

  • :file_path (required, String)

    The path of the target files used to describe the conflicts.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

Returns:

See Also:



1791
1792
1793
1794
# File 'lib/aws-sdk-codecommit/client.rb', line 1791

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

#describe_pull_request_events(params = {}) ⇒ Types::DescribePullRequestEventsOutput

Returns information about one or more pull request events.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.describe_pull_request_events({
  pull_request_id: "PullRequestId", # required
  pull_request_event_type: "PULL_REQUEST_CREATED", # accepts PULL_REQUEST_CREATED, PULL_REQUEST_STATUS_CHANGED, PULL_REQUEST_SOURCE_REFERENCE_UPDATED, PULL_REQUEST_MERGE_STATE_CHANGED, PULL_REQUEST_APPROVAL_RULE_CREATED, PULL_REQUEST_APPROVAL_RULE_UPDATED, PULL_REQUEST_APPROVAL_RULE_DELETED, PULL_REQUEST_APPROVAL_RULE_OVERRIDDEN, PULL_REQUEST_APPROVAL_STATE_CHANGED
  actor_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.pull_request_events #=> Array
resp.pull_request_events[0].pull_request_id #=> String
resp.pull_request_events[0].event_date #=> Time
resp.pull_request_events[0].pull_request_event_type #=> String, one of "PULL_REQUEST_CREATED", "PULL_REQUEST_STATUS_CHANGED", "PULL_REQUEST_SOURCE_REFERENCE_UPDATED", "PULL_REQUEST_MERGE_STATE_CHANGED", "PULL_REQUEST_APPROVAL_RULE_CREATED", "PULL_REQUEST_APPROVAL_RULE_UPDATED", "PULL_REQUEST_APPROVAL_RULE_DELETED", "PULL_REQUEST_APPROVAL_RULE_OVERRIDDEN", "PULL_REQUEST_APPROVAL_STATE_CHANGED"
resp.pull_request_events[0].actor_arn #=> String
resp.pull_request_events[0]..repository_name #=> String
resp.pull_request_events[0]..source_commit_id #=> String
resp.pull_request_events[0]..destination_commit_id #=> String
resp.pull_request_events[0]..merge_base #=> String
resp.pull_request_events[0]..pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request_events[0]..repository_name #=> String
resp.pull_request_events[0]..before_commit_id #=> String
resp.pull_request_events[0]..after_commit_id #=> String
resp.pull_request_events[0]..merge_base #=> String
resp.pull_request_events[0]..repository_name #=> String
resp.pull_request_events[0]..destination_reference #=> String
resp.pull_request_events[0]...is_merged #=> Boolean
resp.pull_request_events[0]...merged_by #=> String
resp.pull_request_events[0]...merge_commit_id #=> String
resp.pull_request_events[0]...merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request_events[0]..approval_rule_name #=> String
resp.pull_request_events[0]..approval_rule_id #=> String
resp.pull_request_events[0]..approval_rule_content #=> String
resp.pull_request_events[0]..revision_id #=> String
resp.pull_request_events[0]..approval_status #=> String, one of "APPROVE", "REVOKE"
resp.pull_request_events[0]..revision_id #=> String
resp.pull_request_events[0]..override_status #=> String, one of "OVERRIDE", "REVOKE"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :pull_request_event_type (String)

    Optional. The pull request event type about which you want to return information.

  • :actor_arn (String)

    The Amazon Resource Name (ARN) of the user whose actions resulted in the event. Examples include updating the pull request with more commits or changing the status of a pull request.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results. The default is 100 events, which is also the maximum number of events that can be returned in a result.

Returns:

See Also:



1872
1873
1874
1875
# File 'lib/aws-sdk-codecommit/client.rb', line 1872

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

#disassociate_approval_rule_template_from_repository(params = {}) ⇒ Struct

Removes the association between a template and a repository so that approval rules based on the template are not automatically created when pull requests are created in the specified repository. This does not delete any approval rules previously created for pull requests through the template association.

Examples:

Request syntax with placeholder values


resp = client.disassociate_approval_rule_template_from_repository({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  repository_name: "RepositoryName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the approval rule template to disassociate from a specified repository.

  • :repository_name (required, String)

    The name of the repository you want to disassociate from the template.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



1903
1904
1905
1906
# File 'lib/aws-sdk-codecommit/client.rb', line 1903

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

#evaluate_pull_request_approval_rules(params = {}) ⇒ Types::EvaluatePullRequestApprovalRulesOutput

Evaluates whether a pull request has met all the conditions specified in its associated approval rules.

Examples:

Request syntax with placeholder values


resp = client.evaluate_pull_request_approval_rules({
  pull_request_id: "PullRequestId", # required
  revision_id: "RevisionId", # required
})

Response structure


resp.evaluation.approved #=> Boolean
resp.evaluation.overridden #=> Boolean
resp.evaluation.approval_rules_satisfied #=> Array
resp.evaluation.approval_rules_satisfied[0] #=> String
resp.evaluation.approval_rules_not_satisfied #=> Array
resp.evaluation.approval_rules_not_satisfied[0] #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request you want to evaluate.

  • :revision_id (required, String)

    The system-generated ID for the pull request revision. To retrieve the most recent revision ID for a pull request, use GetPullRequest.

Returns:

See Also:



1942
1943
1944
1945
# File 'lib/aws-sdk-codecommit/client.rb', line 1942

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

#get_approval_rule_template(params = {}) ⇒ Types::GetApprovalRuleTemplateOutput

Returns information about a specified approval rule template.

Examples:

Request syntax with placeholder values


resp = client.get_approval_rule_template({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
})

Response structure


resp.approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule_template.approval_rule_template_name #=> String
resp.approval_rule_template.approval_rule_template_description #=> String
resp.approval_rule_template.approval_rule_template_content #=> String
resp.approval_rule_template.rule_content_sha_256 #=> String
resp.approval_rule_template.last_modified_date #=> Time
resp.approval_rule_template.creation_date #=> Time
resp.approval_rule_template.last_modified_user #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the approval rule template for which you want to get information.

Returns:

See Also:



1978
1979
1980
1981
# File 'lib/aws-sdk-codecommit/client.rb', line 1978

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

#get_blob(params = {}) ⇒ Types::GetBlobOutput

Returns the base-64 encoded content of an individual blob in a repository.

Examples:

Request syntax with placeholder values


resp = client.get_blob({
  repository_name: "RepositoryName", # required
  blob_id: "ObjectId", # required
})

Response structure


resp.content #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the blob.

  • :blob_id (required, String)

    The ID of the blob, which is its SHA-1 pointer.

Returns:

See Also:



2011
2012
2013
2014
# File 'lib/aws-sdk-codecommit/client.rb', line 2011

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

#get_branch(params = {}) ⇒ Types::GetBranchOutput

Returns information about a repository branch, including its name and the last commit ID.

Examples:

Request syntax with placeholder values


resp = client.get_branch({
  repository_name: "RepositoryName",
  branch_name: "BranchName",
})

Response structure


resp.branch.branch_name #=> String
resp.branch.commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (String)

    The name of the repository that contains the branch for which you want to retrieve information.

  • :branch_name (String)

    The name of the branch for which you want to retrieve information.

Returns:

See Also:



2046
2047
2048
2049
# File 'lib/aws-sdk-codecommit/client.rb', line 2046

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

#get_comment(params = {}) ⇒ Types::GetCommentOutput

Returns the content of a comment made on a change, file, or commit in a repository.

<note markdown=“1”> Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.

</note>

Examples:

Request syntax with placeholder values


resp = client.get_comment({
  comment_id: "CommentId", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String
resp.comment.caller_reactions #=> Array
resp.comment.caller_reactions[0] #=> String
resp.comment.reaction_counts #=> Hash
resp.comment.reaction_counts["ReactionValue"] #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The unique, system-generated ID of the comment. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

Returns:

See Also:



2093
2094
2095
2096
# File 'lib/aws-sdk-codecommit/client.rb', line 2093

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

#get_comment_reactions(params = {}) ⇒ Types::GetCommentReactionsOutput

Returns information about reactions to a specified comment ID. Reactions from users who have been deleted will not be included in the count.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_comment_reactions({
  comment_id: "CommentId", # required
  reaction_user_arn: "Arn",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.reactions_for_comment #=> Array
resp.reactions_for_comment[0].reaction.emoji #=> String
resp.reactions_for_comment[0].reaction.short_code #=> String
resp.reactions_for_comment[0].reaction.unicode #=> String
resp.reactions_for_comment[0].reaction_users #=> Array
resp.reactions_for_comment[0].reaction_users[0] #=> String
resp.reactions_for_comment[0].reactions_from_deleted_users_count #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The ID of the comment for which you want to get reactions information.

  • :reaction_user_arn (String)

    Optional. The Amazon Resource Name (ARN) of the user or identity for which you want to get reaction information.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results. The default is the same as the allowed maximum, 1,000.

Returns:

See Also:



2148
2149
2150
2151
# File 'lib/aws-sdk-codecommit/client.rb', line 2148

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

#get_comments_for_compared_commit(params = {}) ⇒ Types::GetCommentsForComparedCommitOutput

Returns information about comments made on the comparison between two commits.

<note markdown=“1”> Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.

</note>

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_comments_for_compared_commit({
  repository_name: "RepositoryName", # required
  before_commit_id: "CommitId",
  after_commit_id: "CommitId", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.comments_for_compared_commit_data #=> Array
resp.comments_for_compared_commit_data[0].repository_name #=> String
resp.comments_for_compared_commit_data[0].before_commit_id #=> String
resp.comments_for_compared_commit_data[0].after_commit_id #=> String
resp.comments_for_compared_commit_data[0].before_blob_id #=> String
resp.comments_for_compared_commit_data[0].after_blob_id #=> String
resp.comments_for_compared_commit_data[0].location.file_path #=> String
resp.comments_for_compared_commit_data[0].location.file_position #=> Integer
resp.comments_for_compared_commit_data[0].location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comments_for_compared_commit_data[0].comments #=> Array
resp.comments_for_compared_commit_data[0].comments[0].comment_id #=> String
resp.comments_for_compared_commit_data[0].comments[0].content #=> String
resp.comments_for_compared_commit_data[0].comments[0].in_reply_to #=> String
resp.comments_for_compared_commit_data[0].comments[0].creation_date #=> Time
resp.comments_for_compared_commit_data[0].comments[0].last_modified_date #=> Time
resp.comments_for_compared_commit_data[0].comments[0].author_arn #=> String
resp.comments_for_compared_commit_data[0].comments[0].deleted #=> Boolean
resp.comments_for_compared_commit_data[0].comments[0].client_request_token #=> String
resp.comments_for_compared_commit_data[0].comments[0].caller_reactions #=> Array
resp.comments_for_compared_commit_data[0].comments[0].caller_reactions[0] #=> String
resp.comments_for_compared_commit_data[0].comments[0].reaction_counts #=> Hash
resp.comments_for_compared_commit_data[0].comments[0].reaction_counts["ReactionValue"] #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to compare commits.

  • :before_commit_id (String)

    To establish the directionality of the comparison, the full commit ID of the before commit.

  • :after_commit_id (required, String)

    To establish the directionality of the comparison, the full commit ID of the after commit.

  • :next_token (String)

    An enumeration token that when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments, but you can configure up to 500.

Returns:

See Also:



2228
2229
2230
2231
# File 'lib/aws-sdk-codecommit/client.rb', line 2228

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

#get_comments_for_pull_request(params = {}) ⇒ Types::GetCommentsForPullRequestOutput

Returns comments made on a pull request.

<note markdown=“1”> Reaction counts might include numbers from user identities who were deleted after the reaction was made. For a count of reactions from active identities, use GetCommentReactions.

</note>

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_comments_for_pull_request({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName",
  before_commit_id: "CommitId",
  after_commit_id: "CommitId",
  next_token: "NextToken",
  max_results: 1,
})

Response structure


resp.comments_for_pull_request_data #=> Array
resp.comments_for_pull_request_data[0].pull_request_id #=> String
resp.comments_for_pull_request_data[0].repository_name #=> String
resp.comments_for_pull_request_data[0].before_commit_id #=> String
resp.comments_for_pull_request_data[0].after_commit_id #=> String
resp.comments_for_pull_request_data[0].before_blob_id #=> String
resp.comments_for_pull_request_data[0].after_blob_id #=> String
resp.comments_for_pull_request_data[0].location.file_path #=> String
resp.comments_for_pull_request_data[0].location.file_position #=> Integer
resp.comments_for_pull_request_data[0].location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comments_for_pull_request_data[0].comments #=> Array
resp.comments_for_pull_request_data[0].comments[0].comment_id #=> String
resp.comments_for_pull_request_data[0].comments[0].content #=> String
resp.comments_for_pull_request_data[0].comments[0].in_reply_to #=> String
resp.comments_for_pull_request_data[0].comments[0].creation_date #=> Time
resp.comments_for_pull_request_data[0].comments[0].last_modified_date #=> Time
resp.comments_for_pull_request_data[0].comments[0].author_arn #=> String
resp.comments_for_pull_request_data[0].comments[0].deleted #=> Boolean
resp.comments_for_pull_request_data[0].comments[0].client_request_token #=> String
resp.comments_for_pull_request_data[0].comments[0].caller_reactions #=> Array
resp.comments_for_pull_request_data[0].comments[0].caller_reactions[0] #=> String
resp.comments_for_pull_request_data[0].comments[0].reaction_counts #=> Hash
resp.comments_for_pull_request_data[0].comments[0].reaction_counts["ReactionValue"] #=> Integer
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (String)

    The name of the repository that contains the pull request. Requirement is conditional: ‘repositoryName` must be specified when `beforeCommitId` and `afterCommitId` are included.

  • :before_commit_id (String)

    The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created. Requirement is conditional: ‘beforeCommitId` must be specified when `repositoryName` is included.

  • :after_commit_id (String)

    The full commit ID of the commit in the source branch that was the tip of the branch at the time the comment was made. Requirement is conditional: ‘afterCommitId` must be specified when `repositoryName` is included.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results. The default is 100 comments. You can return up to 500 comments with a single request.

Returns:

See Also:



2320
2321
2322
2323
# File 'lib/aws-sdk-codecommit/client.rb', line 2320

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

#get_commit(params = {}) ⇒ Types::GetCommitOutput

Returns information about a commit, including commit message and committer information.

Examples:

Request syntax with placeholder values


resp = client.get_commit({
  repository_name: "RepositoryName", # required
  commit_id: "ObjectId", # required
})

Response structure


resp.commit.commit_id #=> String
resp.commit.tree_id #=> String
resp.commit.parents #=> Array
resp.commit.parents[0] #=> String
resp.commit.message #=> String
resp.commit.author.name #=> String
resp.commit.author.email #=> String
resp.commit.author.date #=> String
resp.commit.committer.name #=> String
resp.commit.committer.email #=> String
resp.commit.committer.date #=> String
resp.commit.additional_data #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to which the commit was made.

  • :commit_id (required, String)

    The commit ID. Commit IDs are the full SHA ID of the commit.

Returns:

See Also:



2364
2365
2366
2367
# File 'lib/aws-sdk-codecommit/client.rb', line 2364

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

#get_differences(params = {}) ⇒ Types::GetDifferencesOutput

Returns information about the differences in a valid commit specifier (such as a branch, tag, HEAD, commit ID, or other fully qualified reference). Results can be limited to a specified path.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_differences({
  repository_name: "RepositoryName", # required
  before_commit_specifier: "CommitName",
  after_commit_specifier: "CommitName", # required
  before_path: "Path",
  after_path: "Path",
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.differences #=> Array
resp.differences[0].before_blob.blob_id #=> String
resp.differences[0].before_blob.path #=> String
resp.differences[0].before_blob.mode #=> String
resp.differences[0].after_blob.blob_id #=> String
resp.differences[0].after_blob.path #=> String
resp.differences[0].after_blob.mode #=> String
resp.differences[0].change_type #=> String, one of "A", "M", "D"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to get differences.

  • :before_commit_specifier (String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, the full commit ID). Optional. If not specified, all changes before the ‘afterCommitSpecifier` value are shown. If you do not use `beforeCommitSpecifier` in your request, consider limiting the results with `maxResults`.

  • :after_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit.

  • :before_path (String)

    The file path in which to check for differences. Limits the results to this path. Can also be used to specify the previous name of a directory or folder. If ‘beforePath` and `afterPath` are not specified, differences are shown for all paths.

  • :after_path (String)

    The file path in which to check differences. Limits the results to this path. Can also be used to specify the changed name of a directory or folder, if it has changed. If not specified, differences are shown for all paths.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

Returns:

See Also:



2442
2443
2444
2445
# File 'lib/aws-sdk-codecommit/client.rb', line 2442

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

#get_file(params = {}) ⇒ Types::GetFileOutput

Returns the base-64 encoded contents of a specified file and its metadata.

Examples:

Request syntax with placeholder values


resp = client.get_file({
  repository_name: "RepositoryName", # required
  commit_specifier: "CommitName",
  file_path: "Path", # required
})

Response structure


resp.commit_id #=> String
resp.blob_id #=> String
resp.file_path #=> String
resp.file_mode #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.file_size #=> Integer
resp.file_content #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the file.

  • :commit_specifier (String)

    The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as refs/heads/main. If none is provided, the head commit is used.

  • :file_path (required, String)

    The fully qualified path to the file, including the full name and extension of the file. For example, /examples/file.md is the fully qualified path to a file named file.md in a folder named examples.

Returns:

See Also:



2494
2495
2496
2497
# File 'lib/aws-sdk-codecommit/client.rb', line 2494

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

#get_folder(params = {}) ⇒ Types::GetFolderOutput

Returns the contents of a specified folder in a repository.

Examples:

Request syntax with placeholder values


resp = client.get_folder({
  repository_name: "RepositoryName", # required
  commit_specifier: "CommitName",
  folder_path: "Path", # required
})

Response structure


resp.commit_id #=> String
resp.folder_path #=> String
resp.tree_id #=> String
resp.sub_folders #=> Array
resp.sub_folders[0].tree_id #=> String
resp.sub_folders[0].absolute_path #=> String
resp.sub_folders[0].relative_path #=> String
resp.files #=> Array
resp.files[0].blob_id #=> String
resp.files[0].absolute_path #=> String
resp.files[0].relative_path #=> String
resp.files[0].file_mode #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.symbolic_links #=> Array
resp.symbolic_links[0].blob_id #=> String
resp.symbolic_links[0].absolute_path #=> String
resp.symbolic_links[0].relative_path #=> String
resp.symbolic_links[0].file_mode #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.sub_modules #=> Array
resp.sub_modules[0].commit_id #=> String
resp.sub_modules[0].absolute_path #=> String
resp.sub_modules[0].relative_path #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository.

  • :commit_specifier (String)

    A fully qualified reference used to identify a commit that contains the version of the folder’s content to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no specifier is provided, the folder content is returned as it exists in the HEAD commit.

  • :folder_path (required, String)

    The fully qualified path to the folder whose contents are returned, including the folder name. For example, /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of a repository.

Returns:

See Also:



2563
2564
2565
2566
# File 'lib/aws-sdk-codecommit/client.rb', line 2563

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

#get_merge_commit(params = {}) ⇒ Types::GetMergeCommitOutput

Returns information about a specified merge commit.

Examples:

Request syntax with placeholder values


resp = client.get_merge_commit({
  repository_name: "RepositoryName", # required
  source_commit_specifier: "CommitName", # required
  destination_commit_specifier: "CommitName", # required
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
})

Response structure


resp.source_commit_id #=> String
resp.destination_commit_id #=> String
resp.base_commit_id #=> String
resp.merged_commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the merge commit about which you want to get information.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

Returns:

See Also:



2623
2624
2625
2626
# File 'lib/aws-sdk-codecommit/client.rb', line 2623

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

#get_merge_conflicts(params = {}) ⇒ Types::GetMergeConflictsOutput

Returns information about merge conflicts between the before and after commit IDs for a pull request in a repository.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.get_merge_conflicts({
  repository_name: "RepositoryName", # required
  destination_commit_specifier: "CommitName", # required
  source_commit_specifier: "CommitName", # required
  merge_option: "FAST_FORWARD_MERGE", # required, accepts FAST_FORWARD_MERGE, SQUASH_MERGE, THREE_WAY_MERGE
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  max_conflict_files: 1,
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  next_token: "NextToken",
})

Response structure


resp.mergeable #=> Boolean
resp.destination_commit_id #=> String
resp.source_commit_id #=> String
resp.base_commit_id #=> String
resp. #=> Array
resp.[0].file_path #=> String
resp.[0].file_sizes.source #=> Integer
resp.[0].file_sizes.destination #=> Integer
resp.[0].file_sizes.base #=> Integer
resp.[0].file_modes.source #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.[0].file_modes.destination #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.[0].file_modes.base #=> String, one of "EXECUTABLE", "NORMAL", "SYMLINK"
resp.[0].object_types.source #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp.[0].object_types.destination #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp.[0].object_types.base #=> String, one of "FILE", "DIRECTORY", "GIT_LINK", "SYMBOLIC_LINK"
resp.[0].number_of_conflicts #=> Integer
resp.[0].is_binary_file.source #=> Boolean
resp.[0].is_binary_file.destination #=> Boolean
resp.[0].is_binary_file.base #=> Boolean
resp.[0].content_conflict #=> Boolean
resp.[0].file_mode_conflict #=> Boolean
resp.[0].object_type_conflict #=> Boolean
resp.[0].merge_operations.source #=> String, one of "A", "M", "D"
resp.[0].merge_operations.destination #=> String, one of "A", "M", "D"
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where the pull request was created.

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :merge_option (required, String)

    The merge option or strategy you want to use to merge the code.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :max_conflict_files (Integer)

    The maximum number of files to include in the output.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

Returns:

See Also:



2721
2722
2723
2724
# File 'lib/aws-sdk-codecommit/client.rb', line 2721

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

#get_merge_options(params = {}) ⇒ Types::GetMergeOptionsOutput

Returns information about the merge options available for merging two specified branches. For details about why a merge option is not available, use GetMergeConflicts or DescribeMergeConflicts.

Examples:

Request syntax with placeholder values


resp = client.get_merge_options({
  repository_name: "RepositoryName", # required
  source_commit_specifier: "CommitName", # required
  destination_commit_specifier: "CommitName", # required
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
})

Response structure


resp.merge_options #=> Array
resp.merge_options[0] #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.source_commit_id #=> String
resp.destination_commit_id #=> String
resp.base_commit_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the commits about which you want to get merge options.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

Returns:

See Also:



2784
2785
2786
2787
# File 'lib/aws-sdk-codecommit/client.rb', line 2784

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

#get_pull_request(params = {}) ⇒ Types::GetPullRequestOutput

Gets information about a pull request in a specified repository.

Examples:

Request syntax with placeholder values


resp = client.get_pull_request({
  pull_request_id: "PullRequestId", # required
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

Returns:

See Also:



2842
2843
2844
2845
# File 'lib/aws-sdk-codecommit/client.rb', line 2842

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

#get_pull_request_approval_states(params = {}) ⇒ Types::GetPullRequestApprovalStatesOutput

Gets information about the approval states for a specified pull request. Approval states only apply to pull requests that have one or more approval rules applied to them.

Examples:

Request syntax with placeholder values


resp = client.get_pull_request_approval_states({
  pull_request_id: "PullRequestId", # required
  revision_id: "RevisionId", # required
})

Response structure


resp.approvals #=> Array
resp.approvals[0].user_arn #=> String
resp.approvals[0].approval_state #=> String, one of "APPROVE", "REVOKE"

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID for the pull request.

  • :revision_id (required, String)

    The system-generated ID for the pull request revision.

Returns:

See Also:



2878
2879
2880
2881
# File 'lib/aws-sdk-codecommit/client.rb', line 2878

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

#get_pull_request_override_state(params = {}) ⇒ Types::GetPullRequestOverrideStateOutput

Returns information about whether approval rules have been set aside (overridden) for a pull request, and if so, the Amazon Resource Name (ARN) of the user or identity that overrode the rules and their requirements for the pull request.

Examples:

Request syntax with placeholder values


resp = client.get_pull_request_override_state({
  pull_request_id: "PullRequestId", # required
  revision_id: "RevisionId", # required
})

Response structure


resp.overridden #=> Boolean
resp.overrider #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The ID of the pull request for which you want to get information about whether approval rules have been set aside (overridden).

  • :revision_id (required, String)

    The system-generated ID of the revision for the pull request. To retrieve the most recent revision ID, use GetPullRequest.

Returns:

See Also:



2917
2918
2919
2920
# File 'lib/aws-sdk-codecommit/client.rb', line 2917

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

#get_repository(params = {}) ⇒ Types::GetRepositoryOutput

Returns information about a repository.

<note markdown=“1”> The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.

</note>

Examples:

Request syntax with placeholder values


resp = client.get_repository({
  repository_name: "RepositoryName", # required
})

Response structure


resp.. #=> String
resp..repository_id #=> String
resp..repository_name #=> String
resp..repository_description #=> String
resp..default_branch #=> String
resp..last_modified_date #=> Time
resp..creation_date #=> Time
resp..clone_url_http #=> String
resp..clone_url_ssh #=> String
resp..arn #=> String
resp..kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to get information about.

Returns:

See Also:



2964
2965
2966
2967
# File 'lib/aws-sdk-codecommit/client.rb', line 2964

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

#get_repository_triggers(params = {}) ⇒ Types::GetRepositoryTriggersOutput

Gets information about triggers configured for a repository.

Examples:

Request syntax with placeholder values


resp = client.get_repository_triggers({
  repository_name: "RepositoryName", # required
})

Response structure


resp.configuration_id #=> String
resp.triggers #=> Array
resp.triggers[0].name #=> String
resp.triggers[0].destination_arn #=> String
resp.triggers[0].custom_data #=> String
resp.triggers[0].branches #=> Array
resp.triggers[0].branches[0] #=> String
resp.triggers[0].events #=> Array
resp.triggers[0].events[0] #=> String, one of "all", "updateReference", "createReference", "deleteReference"

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which the trigger is configured.

Returns:

See Also:



3001
3002
3003
3004
# File 'lib/aws-sdk-codecommit/client.rb', line 3001

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

#list_approval_rule_templates(params = {}) ⇒ Types::ListApprovalRuleTemplatesOutput

Lists all approval rule templates in the specified Amazon Web Services Region in your Amazon Web Services account. If an Amazon Web Services Region is not specified, the Amazon Web Services Region where you are signed in is used.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


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

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results.

Returns:

See Also:



3043
3044
3045
3046
# File 'lib/aws-sdk-codecommit/client.rb', line 3043

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

#list_associated_approval_rule_templates_for_repository(params = {}) ⇒ Types::ListAssociatedApprovalRuleTemplatesForRepositoryOutput

Lists all approval rule templates that are associated with a specified repository.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_associated_approval_rule_templates_for_repository({
  repository_name: "RepositoryName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which you want to list all associated approval rule templates.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results.

Returns:

See Also:



3088
3089
3090
3091
# File 'lib/aws-sdk-codecommit/client.rb', line 3088

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

#list_branches(params = {}) ⇒ Types::ListBranchesOutput

Gets information about one or more branches in a repository.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_branches({
  repository_name: "RepositoryName", # required
  next_token: "NextToken",
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the branches.

  • :next_token (String)

    An enumeration token that allows the operation to batch the results.

Returns:

See Also:



3125
3126
3127
3128
# File 'lib/aws-sdk-codecommit/client.rb', line 3125

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

#list_file_commit_history(params = {}) ⇒ Types::ListFileCommitHistoryResponse

Retrieves a list of commits and changes to a specified file.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_file_commit_history({
  repository_name: "RepositoryName", # required
  commit_specifier: "CommitName",
  file_path: "Path", # required
  max_results: 1,
  next_token: "NextToken",
})

Response structure


resp.revision_dag #=> Array
resp.revision_dag[0].commit.commit_id #=> String
resp.revision_dag[0].commit.tree_id #=> String
resp.revision_dag[0].commit.parents #=> Array
resp.revision_dag[0].commit.parents[0] #=> String
resp.revision_dag[0].commit.message #=> String
resp.revision_dag[0].commit.author.name #=> String
resp.revision_dag[0].commit.author.email #=> String
resp.revision_dag[0].commit.author.date #=> String
resp.revision_dag[0].commit.committer.name #=> String
resp.revision_dag[0].commit.committer.email #=> String
resp.revision_dag[0].commit.committer.date #=> String
resp.revision_dag[0].commit.additional_data #=> String
resp.revision_dag[0].blob_id #=> String
resp.revision_dag[0].path #=> String
resp.revision_dag[0].revision_children #=> Array
resp.revision_dag[0].revision_children[0] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository that contains the file.

  • :commit_specifier (String)

    The fully quaified reference that identifies the commit that contains the file. For example, you can specify a full commit ID, a tag, a branch name, or a reference such as ‘refs/heads/main`. If none is provided, the head commit is used.

  • :file_path (required, String)

    The full path of the file whose history you want to retrieve, including the name of the file.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results.

  • :next_token (String)

    An enumeration token that allows the operation to batch the results.

Returns:

See Also:



3194
3195
3196
3197
# File 'lib/aws-sdk-codecommit/client.rb', line 3194

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

#list_pull_requests(params = {}) ⇒ Types::ListPullRequestsOutput

Returns a list of pull requests for a specified repository. The return list can be refined by pull request status or pull request author ARN.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_pull_requests({
  repository_name: "RepositoryName", # required
  author_arn: "Arn",
  pull_request_status: "OPEN", # accepts OPEN, CLOSED
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which you want to list pull requests.

  • :author_arn (String)

    Optional. The Amazon Resource Name (ARN) of the user who created the pull request. If used, this filters the results to pull requests created by that user.

  • :pull_request_status (String)

    Optional. The status of the pull request. If used, this refines the results to the pull requests that match the specified status.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results.

Returns:

See Also:



3249
3250
3251
3252
# File 'lib/aws-sdk-codecommit/client.rb', line 3249

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

#list_repositories(params = {}) ⇒ Types::ListRepositoriesOutput

Gets information about one or more repositories.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_repositories({
  next_token: "NextToken",
  sort_by: "repositoryName", # accepts repositoryName, lastModifiedDate
  order: "ascending", # accepts ascending, descending
})

Response structure


resp.repositories #=> Array
resp.repositories[0].repository_name #=> String
resp.repositories[0].repository_id #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :next_token (String)

    An enumeration token that allows the operation to batch the results of the operation. Batch sizes are 1,000 for list repository operations. When the client sends the token back to CodeCommit, another page of 1,000 records is retrieved.

  • :sort_by (String)

    The criteria used to sort the results of a list repositories operation.

  • :order (String)

    The order in which to sort the results of a list repositories operation.

Returns:

See Also:



3296
3297
3298
3299
# File 'lib/aws-sdk-codecommit/client.rb', line 3296

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

#list_repositories_for_approval_rule_template(params = {}) ⇒ Types::ListRepositoriesForApprovalRuleTemplateOutput

Lists all repositories associated with the specified approval rule template.

The returned response is a pageable response and is Enumerable. For details on usage see PageableResponse.

Examples:

Request syntax with placeholder values


resp = client.list_repositories_for_approval_rule_template({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  next_token: "NextToken",
  max_results: 1,
})

Response structure


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

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the approval rule template for which you want to list repositories that are associated with that template.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

  • :max_results (Integer)

    A non-zero, non-negative integer used to limit the number of returned results.

Returns:

See Also:



3341
3342
3343
3344
# File 'lib/aws-sdk-codecommit/client.rb', line 3341

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

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

Gets information about Amazon Web Servicestags for a specified Amazon Resource Name (ARN) in CodeCommit. For a list of valid resources in CodeCommit, see [CodeCommit Resources and Operations] in the CodeCommit User Guide.

[1]: docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats

Examples:

Request syntax with placeholder values


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

Response structure


resp.tags #=> Hash
resp.tags["TagKey"] #=> String
resp.next_token #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

    The Amazon Resource Name (ARN) of the resource for which you want to get information about tags, if any.

  • :next_token (String)

    An enumeration token that, when provided in a request, returns the next batch of the results.

Returns:

See Also:



3385
3386
3387
3388
# File 'lib/aws-sdk-codecommit/client.rb', line 3385

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

#merge_branches_by_fast_forward(params = {}) ⇒ Types::MergeBranchesByFastForwardOutput

Merges two branches using the fast-forward merge strategy.

Examples:

Request syntax with placeholder values


resp = client.merge_branches_by_fast_forward({
  repository_name: "RepositoryName", # required
  source_commit_specifier: "CommitName", # required
  destination_commit_specifier: "CommitName", # required
  target_branch: "BranchName",
})

Response structure


resp.commit_id #=> String
resp.tree_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to merge two branches.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :target_branch (String)

    The branch where the merge is applied.

Returns:

See Also:



3429
3430
3431
3432
# File 'lib/aws-sdk-codecommit/client.rb', line 3429

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

#merge_branches_by_squash(params = {}) ⇒ Types::MergeBranchesBySquashOutput

Merges two branches using the squash merge strategy.

Examples:

Request syntax with placeholder values


resp = client.merge_branches_by_squash({
  repository_name: "RepositoryName", # required
  source_commit_specifier: "CommitName", # required
  destination_commit_specifier: "CommitName", # required
  target_branch: "BranchName",
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  author_name: "Name",
  email: "Email",
  commit_message: "Message",
  keep_empty_folders: false,
  conflict_resolution: {
    replace_contents: [
      {
        file_path: "Path", # required
        replacement_type: "KEEP_BASE", # required, accepts KEEP_BASE, KEEP_SOURCE, KEEP_DESTINATION, USE_NEW_CONTENT
        content: "data",
        file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
    delete_files: [
      {
        file_path: "Path", # required
      },
    ],
    set_file_modes: [
      {
        file_path: "Path", # required
        file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
  },
})

Response structure


resp.commit_id #=> String
resp.tree_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to merge two branches.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :target_branch (String)

    The branch where the merge is applied.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :author_name (String)

    The name of the author who created the commit. This information is used as both the author and committer for the commit.

  • :email (String)

    The email address of the person merging the branches. This information is used in the commit information for the merge.

  • :commit_message (String)

    The commit message for the merge.

  • :keep_empty_folders (Boolean)

    If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If this is specified as true, a .gitkeep file is created for empty folders. The default is false.

  • :conflict_resolution (Types::ConflictResolution)

    If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.

Returns:

See Also:



3534
3535
3536
3537
# File 'lib/aws-sdk-codecommit/client.rb', line 3534

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

#merge_branches_by_three_way(params = {}) ⇒ Types::MergeBranchesByThreeWayOutput

Merges two specified branches using the three-way merge strategy.

Examples:

Request syntax with placeholder values


resp = client.merge_branches_by_three_way({
  repository_name: "RepositoryName", # required
  source_commit_specifier: "CommitName", # required
  destination_commit_specifier: "CommitName", # required
  target_branch: "BranchName",
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  author_name: "Name",
  email: "Email",
  commit_message: "Message",
  keep_empty_folders: false,
  conflict_resolution: {
    replace_contents: [
      {
        file_path: "Path", # required
        replacement_type: "KEEP_BASE", # required, accepts KEEP_BASE, KEEP_SOURCE, KEEP_DESTINATION, USE_NEW_CONTENT
        content: "data",
        file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
    delete_files: [
      {
        file_path: "Path", # required
      },
    ],
    set_file_modes: [
      {
        file_path: "Path", # required
        file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
  },
})

Response structure


resp.commit_id #=> String
resp.tree_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to merge two branches.

  • :source_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :destination_commit_specifier (required, String)

    The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name or a full commit ID).

  • :target_branch (String)

    The branch where the merge is applied.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :author_name (String)

    The name of the author who created the commit. This information is used as both the author and committer for the commit.

  • :email (String)

    The email address of the person merging the branches. This information is used in the commit information for the merge.

  • :commit_message (String)

    The commit message to include in the commit information for the merge.

  • :keep_empty_folders (Boolean)

    If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a .gitkeep file is created for empty folders. The default is false.

  • :conflict_resolution (Types::ConflictResolution)

    If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.

Returns:

See Also:



3638
3639
3640
3641
# File 'lib/aws-sdk-codecommit/client.rb', line 3638

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

#merge_pull_request_by_fast_forward(params = {}) ⇒ Types::MergePullRequestByFastForwardOutput

Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the fast-forward merge strategy. If the merge is successful, it closes the pull request.

Examples:

Request syntax with placeholder values


resp = client.merge_pull_request_by_fast_forward({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName", # required
  source_commit_id: "ObjectId",
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (required, String)

    The name of the repository where the pull request was created.

  • :source_commit_id (String)

    The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.

Returns:

See Also:



3710
3711
3712
3713
# File 'lib/aws-sdk-codecommit/client.rb', line 3710

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

#merge_pull_request_by_squash(params = {}) ⇒ Types::MergePullRequestBySquashOutput

Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the squash merge strategy. If the merge is successful, it closes the pull request.

Examples:

Request syntax with placeholder values


resp = client.merge_pull_request_by_squash({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName", # required
  source_commit_id: "ObjectId",
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  commit_message: "Message",
  author_name: "Name",
  email: "Email",
  keep_empty_folders: false,
  conflict_resolution: {
    replace_contents: [
      {
        file_path: "Path", # required
        replacement_type: "KEEP_BASE", # required, accepts KEEP_BASE, KEEP_SOURCE, KEEP_DESTINATION, USE_NEW_CONTENT
        content: "data",
        file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
    delete_files: [
      {
        file_path: "Path", # required
      },
    ],
    set_file_modes: [
      {
        file_path: "Path", # required
        file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
  },
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (required, String)

    The name of the repository where the pull request was created.

  • :source_commit_id (String)

    The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :commit_message (String)

    The commit message to include in the commit information for the merge.

  • :author_name (String)

    The name of the author who created the commit. This information is used as both the author and committer for the commit.

  • :email (String)

    The email address of the person merging the branches. This information is used in the commit information for the merge.

  • :keep_empty_folders (Boolean)

    If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a .gitkeep file is created for empty folders. The default is false.

  • :conflict_resolution (Types::ConflictResolution)

    If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.

Returns:

See Also:



3842
3843
3844
3845
# File 'lib/aws-sdk-codecommit/client.rb', line 3842

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

#merge_pull_request_by_three_way(params = {}) ⇒ Types::MergePullRequestByThreeWayOutput

Attempts to merge the source commit of a pull request into the specified destination branch for that pull request at the specified commit using the three-way merge strategy. If the merge is successful, it closes the pull request.

Examples:

Request syntax with placeholder values


resp = client.merge_pull_request_by_three_way({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName", # required
  source_commit_id: "ObjectId",
  conflict_detail_level: "FILE_LEVEL", # accepts FILE_LEVEL, LINE_LEVEL
  conflict_resolution_strategy: "NONE", # accepts NONE, ACCEPT_SOURCE, ACCEPT_DESTINATION, AUTOMERGE
  commit_message: "Message",
  author_name: "Name",
  email: "Email",
  keep_empty_folders: false,
  conflict_resolution: {
    replace_contents: [
      {
        file_path: "Path", # required
        replacement_type: "KEEP_BASE", # required, accepts KEEP_BASE, KEEP_SOURCE, KEEP_DESTINATION, USE_NEW_CONTENT
        content: "data",
        file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
    delete_files: [
      {
        file_path: "Path", # required
      },
    ],
    set_file_modes: [
      {
        file_path: "Path", # required
        file_mode: "EXECUTABLE", # required, accepts EXECUTABLE, NORMAL, SYMLINK
      },
    ],
  },
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (required, String)

    The name of the repository where the pull request was created.

  • :source_commit_id (String)

    The full commit ID of the original or updated commit in the pull request source branch. Pass this value if you want an exception thrown if the current commit ID of the tip of the source branch does not match this commit ID.

  • :conflict_detail_level (String)

    The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is considered not mergeable if the same file in both branches has differences on the same line.

  • :conflict_resolution_strategy (String)

    Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation is successful.

  • :commit_message (String)

    The commit message to include in the commit information for the merge.

  • :author_name (String)

    The name of the author who created the commit. This information is used as both the author and committer for the commit.

  • :email (String)

    The email address of the person merging the branches. This information is used in the commit information for the merge.

  • :keep_empty_folders (Boolean)

    If the commit contains deletions, whether to keep a folder or folder structure if the changes leave the folders empty. If true, a .gitkeep file is created for empty folders. The default is false.

  • :conflict_resolution (Types::ConflictResolution)

    If AUTOMERGE is the conflict resolution strategy, a list of inputs to use when resolving conflicts during a merge.

Returns:

See Also:



3974
3975
3976
3977
# File 'lib/aws-sdk-codecommit/client.rb', line 3974

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

#override_pull_request_approval_rules(params = {}) ⇒ Struct

Sets aside (overrides) all approval rule requirements for a specified pull request.

Examples:

Request syntax with placeholder values


resp = client.override_pull_request_approval_rules({
  pull_request_id: "PullRequestId", # required
  revision_id: "RevisionId", # required
  override_status: "OVERRIDE", # required, accepts OVERRIDE, REVOKE
})

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request for which you want to override all approval rule requirements. To get this information, use GetPullRequest.

  • :revision_id (required, String)

    The system-generated ID of the most recent revision of the pull request. You cannot override approval rules for anything but the most recent revision of a pull request. To get the revision ID, use GetPullRequest.

  • :override_status (required, String)

    Whether you want to set aside approval rule requirements for the pull request (OVERRIDE) or revoke a previous override and apply approval rule requirements (REVOKE). REVOKE status is not stored.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4012
4013
4014
4015
# File 'lib/aws-sdk-codecommit/client.rb', line 4012

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

#post_comment_for_compared_commit(params = {}) ⇒ Types::PostCommentForComparedCommitOutput

Posts a comment on the comparison between two commits.

Examples:

Request syntax with placeholder values


resp = client.post_comment_for_compared_commit({
  repository_name: "RepositoryName", # required
  before_commit_id: "CommitId",
  after_commit_id: "CommitId", # required
  location: {
    file_path: "Path",
    file_position: 1,
    relative_file_version: "BEFORE", # accepts BEFORE, AFTER
  },
  content: "Content", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.repository_name #=> String
resp.before_commit_id #=> String
resp.after_commit_id #=> String
resp.before_blob_id #=> String
resp.after_blob_id #=> String
resp.location.file_path #=> String
resp.location.file_position #=> Integer
resp.location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String
resp.comment.caller_reactions #=> Array
resp.comment.caller_reactions[0] #=> String
resp.comment.reaction_counts #=> Hash
resp.comment.reaction_counts["ReactionValue"] #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to post a comment on the comparison between commits.

  • :before_commit_id (String)

    To establish the directionality of the comparison, the full commit ID of the before commit. Required for commenting on any commit unless that commit is the initial commit.

  • :after_commit_id (required, String)

    To establish the directionality of the comparison, the full commit ID of the after commit.

  • :location (Types::Location)

    The location of the comparison where you want to comment.

  • :content (required, String)

    The content of the comment you want to make.

  • :client_request_token (String)

    A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

Returns:

See Also:



4100
4101
4102
4103
# File 'lib/aws-sdk-codecommit/client.rb', line 4100

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

#post_comment_for_pull_request(params = {}) ⇒ Types::PostCommentForPullRequestOutput

Posts a comment on a pull request.

Examples:

Request syntax with placeholder values


resp = client.post_comment_for_pull_request({
  pull_request_id: "PullRequestId", # required
  repository_name: "RepositoryName", # required
  before_commit_id: "CommitId", # required
  after_commit_id: "CommitId", # required
  location: {
    file_path: "Path",
    file_position: 1,
    relative_file_version: "BEFORE", # accepts BEFORE, AFTER
  },
  content: "Content", # required
  client_request_token: "ClientRequestToken",
})

Response structure


resp.repository_name #=> String
resp.pull_request_id #=> String
resp.before_commit_id #=> String
resp.after_commit_id #=> String
resp.before_blob_id #=> String
resp.after_blob_id #=> String
resp.location.file_path #=> String
resp.location.file_position #=> Integer
resp.location.relative_file_version #=> String, one of "BEFORE", "AFTER"
resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String
resp.comment.caller_reactions #=> Array
resp.comment.caller_reactions[0] #=> String
resp.comment.reaction_counts #=> Hash
resp.comment.reaction_counts["ReactionValue"] #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :repository_name (required, String)

    The name of the repository where you want to post a comment on a pull request.

  • :before_commit_id (required, String)

    The full commit ID of the commit in the destination branch that was the tip of the branch at the time the pull request was created.

  • :after_commit_id (required, String)

    The full commit ID of the commit in the source branch that is the current tip of the branch for the pull request when you post the comment.

  • :location (Types::Location)

    The location of the change where you want to post your comment. If no location is provided, the comment is posted as a general comment on the pull request difference between the before commit ID and the after commit ID.

  • :content (required, String)

    The content of your comment on the change.

  • :client_request_token (String)

    A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

Returns:

See Also:



4198
4199
4200
4201
# File 'lib/aws-sdk-codecommit/client.rb', line 4198

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

#post_comment_reply(params = {}) ⇒ Types::PostCommentReplyOutput

Posts a comment in reply to an existing comment on a comparison between commits or a pull request.

Examples:

Request syntax with placeholder values


resp = client.post_comment_reply({
  in_reply_to: "CommentId", # required
  client_request_token: "ClientRequestToken",
  content: "Content", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String
resp.comment.caller_reactions #=> Array
resp.comment.caller_reactions[0] #=> String
resp.comment.reaction_counts #=> Hash
resp.comment.reaction_counts["ReactionValue"] #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :in_reply_to (required, String)

    The system-generated ID of the comment to which you want to reply. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

  • :client_request_token (String)

    A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request is received with the same parameters and a token is included, the request returns information about the initial request that used that token.

    **A suitable default value is auto-generated.** You should normally not need to pass this option.**

  • :content (required, String)

    The contents of your reply to a comment.

Returns:

See Also:



4255
4256
4257
4258
# File 'lib/aws-sdk-codecommit/client.rb', line 4255

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

#put_comment_reaction(params = {}) ⇒ Struct

Adds or updates a reaction to a specified comment for the user whose identity is used to make the request. You can only add or update a reaction for yourself. You cannot add, modify, or delete a reaction for another user.

Examples:

Request syntax with placeholder values


resp = client.put_comment_reaction({
  comment_id: "CommentId", # required
  reaction_value: "ReactionValue", # required
})

Parameters:

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

    ({})

Options Hash (params):

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4291
4292
4293
4294
# File 'lib/aws-sdk-codecommit/client.rb', line 4291

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

#put_file(params = {}) ⇒ Types::PutFileOutput

Adds or updates a file in a branch in an CodeCommit repository, and generates a commit for the addition in the specified branch.

Examples:

Request syntax with placeholder values


resp = client.put_file({
  repository_name: "RepositoryName", # required
  branch_name: "BranchName", # required
  file_content: "data", # required
  file_path: "Path", # required
  file_mode: "EXECUTABLE", # accepts EXECUTABLE, NORMAL, SYMLINK
  parent_commit_id: "CommitId",
  commit_message: "Message",
  name: "Name",
  email: "Email",
})

Response structure


resp.commit_id #=> String
resp.blob_id #=> String
resp.tree_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to add or update the file.

  • :branch_name (required, String)

    The name of the branch where you want to add or update the file. If this is an empty repository, this branch is created.

  • :file_content (required, String, StringIO, File)

    The content of the file, in binary object format.

  • :file_path (required, String)

    The name of the file you want to add or update, including the relative path to the file in the repository.

    <note markdown=“1”> If the path does not currently exist in the repository, the path is created as part of adding the file.

    </note>
    
  • :file_mode (String)

    The file mode permissions of the blob. Valid file mode permissions are listed here.

  • :parent_commit_id (String)

    The full commit ID of the head commit in the branch where you want to add or update the file. If this is an empty repository, no commit ID is required. If this is not an empty repository, a commit ID is required.

    The commit ID must match the ID of the head commit at the time of the operation. Otherwise, an error occurs, and the file is not added or updated.

  • :commit_message (String)

    A message about why this file was added or updated. Although it is optional, a message makes the commit history for your repository more useful.

  • :name (String)

    The name of the person adding or updating the file. Although it is optional, a name makes the commit history for your repository more useful.

  • :email (String)

    An email address for the person adding or updating the file.

Returns:

See Also:



4375
4376
4377
4378
# File 'lib/aws-sdk-codecommit/client.rb', line 4375

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

#put_repository_triggers(params = {}) ⇒ Types::PutRepositoryTriggersOutput

Replaces all triggers for a repository. Used to create or delete triggers.

Examples:

Request syntax with placeholder values


resp = client.put_repository_triggers({
  repository_name: "RepositoryName", # required
  triggers: [ # required
    {
      name: "RepositoryTriggerName", # required
      destination_arn: "Arn", # required
      custom_data: "RepositoryTriggerCustomData",
      branches: ["BranchName"],
      events: ["all"], # required, accepts all, updateReference, createReference, deleteReference
    },
  ],
})

Response structure


resp.configuration_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository where you want to create or update the trigger.

  • :triggers (required, Array<Types::RepositoryTrigger>)

    The JSON block of configuration information for each trigger.

Returns:

See Also:



4417
4418
4419
4420
# File 'lib/aws-sdk-codecommit/client.rb', line 4417

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

#tag_resource(params = {}) ⇒ Struct

Adds or updates tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see [CodeCommit Resources and Operations] in the *CodeCommit User Guide*.

[1]: docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats

Examples:

Request syntax with placeholder values


resp = client.tag_resource({
  resource_arn: "ResourceArn", # required
  tags: { # required
    "TagKey" => "TagValue",
  },
})

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tags (required, Hash<String,String>)

    The key-value pair to use when tagging this repository.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4452
4453
4454
4455
# File 'lib/aws-sdk-codecommit/client.rb', line 4452

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

#test_repository_triggers(params = {}) ⇒ Types::TestRepositoryTriggersOutput

Tests the functionality of repository triggers by sending information to the trigger target. If real data is available in the repository, the test sends data from the last commit. If no data is available, sample data is generated.

Examples:

Request syntax with placeholder values


resp = client.test_repository_triggers({
  repository_name: "RepositoryName", # required
  triggers: [ # required
    {
      name: "RepositoryTriggerName", # required
      destination_arn: "Arn", # required
      custom_data: "RepositoryTriggerCustomData",
      branches: ["BranchName"],
      events: ["all"], # required, accepts all, updateReference, createReference, deleteReference
    },
  ],
})

Response structure


resp.successful_executions #=> Array
resp.successful_executions[0] #=> String
resp.failed_executions #=> Array
resp.failed_executions[0].trigger #=> String
resp.failed_executions[0].failure_message #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository in which to test the triggers.

  • :triggers (required, Array<Types::RepositoryTrigger>)

    The list of triggers to test.

Returns:

See Also:



4500
4501
4502
4503
# File 'lib/aws-sdk-codecommit/client.rb', line 4500

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

#untag_resource(params = {}) ⇒ Struct

Removes tags for a resource in CodeCommit. For a list of valid resources in CodeCommit, see [CodeCommit Resources and Operations] in the *CodeCommit User Guide*.

[1]: docs.aws.amazon.com/codecommit/latest/userguide/auth-and-access-control-iam-access-control-identity-based.html#arn-formats

Examples:

Request syntax with placeholder values


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

Parameters:

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

    ({})

Options Hash (params):

  • :resource_arn (required, String)

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

  • :tag_keys (required, Array<String>)

    The tag key for each tag that you want to remove from the resource.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4533
4534
4535
4536
# File 'lib/aws-sdk-codecommit/client.rb', line 4533

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

#update_approval_rule_template_content(params = {}) ⇒ Types::UpdateApprovalRuleTemplateContentOutput

Updates the content of an approval rule template. You can change the number of required approvals, the membership of the approval rule, and whether an approval pool is defined.

Examples:

Request syntax with placeholder values


resp = client.update_approval_rule_template_content({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  new_rule_content: "ApprovalRuleTemplateContent", # required
  existing_rule_content_sha_256: "RuleContentSha256",
})

Response structure


resp.approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule_template.approval_rule_template_name #=> String
resp.approval_rule_template.approval_rule_template_description #=> String
resp.approval_rule_template.approval_rule_template_content #=> String
resp.approval_rule_template.rule_content_sha_256 #=> String
resp.approval_rule_template.last_modified_date #=> Time
resp.approval_rule_template.creation_date #=> Time
resp.approval_rule_template.last_modified_user #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the approval rule template where you want to update the content of the rule.

  • :new_rule_content (required, String)

    The content that replaces the existing content of the rule. Content statements must be complete. You cannot provide only the changes.

  • :existing_rule_content_sha_256 (String)

    The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.

Returns:

See Also:



4581
4582
4583
4584
# File 'lib/aws-sdk-codecommit/client.rb', line 4581

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

#update_approval_rule_template_description(params = {}) ⇒ Types::UpdateApprovalRuleTemplateDescriptionOutput

Updates the description for a specified approval rule template.

Examples:

Request syntax with placeholder values


resp = client.update_approval_rule_template_description({
  approval_rule_template_name: "ApprovalRuleTemplateName", # required
  approval_rule_template_description: "ApprovalRuleTemplateDescription", # required
})

Response structure


resp.approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule_template.approval_rule_template_name #=> String
resp.approval_rule_template.approval_rule_template_description #=> String
resp.approval_rule_template.approval_rule_template_content #=> String
resp.approval_rule_template.rule_content_sha_256 #=> String
resp.approval_rule_template.last_modified_date #=> Time
resp.approval_rule_template.creation_date #=> Time
resp.approval_rule_template.last_modified_user #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :approval_rule_template_name (required, String)

    The name of the template for which you want to update the description.

  • :approval_rule_template_description (required, String)

    The updated description of the approval rule template.

Returns:

See Also:



4620
4621
4622
4623
# File 'lib/aws-sdk-codecommit/client.rb', line 4620

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

#update_approval_rule_template_name(params = {}) ⇒ Types::UpdateApprovalRuleTemplateNameOutput

Updates the name of a specified approval rule template.

Examples:

Request syntax with placeholder values


resp = client.update_approval_rule_template_name({
  old_approval_rule_template_name: "ApprovalRuleTemplateName", # required
  new_approval_rule_template_name: "ApprovalRuleTemplateName", # required
})

Response structure


resp.approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule_template.approval_rule_template_name #=> String
resp.approval_rule_template.approval_rule_template_description #=> String
resp.approval_rule_template.approval_rule_template_content #=> String
resp.approval_rule_template.rule_content_sha_256 #=> String
resp.approval_rule_template.last_modified_date #=> Time
resp.approval_rule_template.creation_date #=> Time
resp.approval_rule_template.last_modified_user #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :old_approval_rule_template_name (required, String)

    The current name of the approval rule template.

  • :new_approval_rule_template_name (required, String)

    The new name you want to apply to the approval rule template.

Returns:

See Also:



4659
4660
4661
4662
# File 'lib/aws-sdk-codecommit/client.rb', line 4659

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

#update_comment(params = {}) ⇒ Types::UpdateCommentOutput

Replaces the contents of a comment.

Examples:

Request syntax with placeholder values


resp = client.update_comment({
  comment_id: "CommentId", # required
  content: "Content", # required
})

Response structure


resp.comment.comment_id #=> String
resp.comment.content #=> String
resp.comment.in_reply_to #=> String
resp.comment.creation_date #=> Time
resp.comment.last_modified_date #=> Time
resp.comment.author_arn #=> String
resp.comment.deleted #=> Boolean
resp.comment.client_request_token #=> String
resp.comment.caller_reactions #=> Array
resp.comment.caller_reactions[0] #=> String
resp.comment.reaction_counts #=> Hash
resp.comment.reaction_counts["ReactionValue"] #=> Integer

Parameters:

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

    ({})

Options Hash (params):

  • :comment_id (required, String)

    The system-generated ID of the comment you want to update. To get this ID, use GetCommentsForComparedCommit or GetCommentsForPullRequest.

  • :content (required, String)

    The updated content to replace the existing content of the comment.

Returns:

See Also:



4703
4704
4705
4706
# File 'lib/aws-sdk-codecommit/client.rb', line 4703

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

#update_default_branch(params = {}) ⇒ Struct

Sets or changes the default branch name for the specified repository.

<note markdown=“1”> If you use this operation to change the default branch name to the current default branch name, a success message is returned even though the default branch did not change.

</note>

Examples:

Request syntax with placeholder values


resp = client.update_default_branch({
  repository_name: "RepositoryName", # required
  default_branch_name: "BranchName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which you want to set or change the default branch.

  • :default_branch_name (required, String)

    The name of the branch to set as the default branch.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4736
4737
4738
4739
# File 'lib/aws-sdk-codecommit/client.rb', line 4736

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

#update_pull_request_approval_rule_content(params = {}) ⇒ Types::UpdatePullRequestApprovalRuleContentOutput

Updates the structure of an approval rule created specifically for a pull request. For example, you can change the number of required approvers and the approval pool for approvers.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_approval_rule_content({
  pull_request_id: "PullRequestId", # required
  approval_rule_name: "ApprovalRuleName", # required
  existing_rule_content_sha_256: "RuleContentSha256",
  new_rule_content: "ApprovalRuleContent", # required
})

Response structure


resp.approval_rule.approval_rule_id #=> String
resp.approval_rule.approval_rule_name #=> String
resp.approval_rule.approval_rule_content #=> String
resp.approval_rule.rule_content_sha_256 #=> String
resp.approval_rule.last_modified_date #=> Time
resp.approval_rule.creation_date #=> Time
resp.approval_rule.last_modified_user #=> String
resp.approval_rule.origin_approval_rule_template.approval_rule_template_id #=> String
resp.approval_rule.origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request.

  • :approval_rule_name (required, String)

    The name of the approval rule you want to update.

  • :existing_rule_content_sha_256 (String)

    The SHA-256 hash signature for the content of the approval rule. You can retrieve this information by using GetPullRequest.

  • :new_rule_content (required, String)

    The updated content for the approval rule.

    <note markdown=“1”> When you update the content of the approval rule, you can specify approvers in an approval pool in one of two ways:

    * **CodeCommitApprovers**: This option only requires an Amazon Web
     Services account and a resource. It can be used for both IAM users
     and federated access users whose name matches the provided resource
     name. This is a very powerful option that offers a great deal of
     flexibility. For example, if you specify the Amazon Web Services
     account *123456789012* and *Mary\_Major*, all of the following are
     counted as approvals coming from that user:
    
     * An IAM user in the account
       (arn:aws:iam::*123456789012*:user/*Mary\_Major*)
    
     * A federated user identified in IAM as Mary\_Major
       (arn:aws:sts::*123456789012*:federated-user/*Mary\_Major*)
     This option does not recognize an active session of someone assuming
     the role of CodeCommitReview with a role session name of
     *Mary\_Major*
     (arn:aws:sts::*123456789012*:assumed-role/CodeCommitReview/*Mary\_Major*)
     unless you include a wildcard (*Mary\_Major).
    
    • **Fully qualified ARN**: This option allows you to specify the fully qualified Amazon Resource Name (ARN) of the IAM user or role.

    For more information about IAM ARNs, wildcards, and formats, see [IAM
    

    Identifiers] in the *IAM User Guide*.

    </note>
    

    [1]: docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html

Returns:

See Also:



4821
4822
4823
4824
# File 'lib/aws-sdk-codecommit/client.rb', line 4821

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

#update_pull_request_approval_state(params = {}) ⇒ Struct

Updates the state of a user’s approval on a pull request. The user is derived from the signed-in account when the request is made.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_approval_state({
  pull_request_id: "PullRequestId", # required
  revision_id: "RevisionId", # required
  approval_state: "APPROVE", # required, accepts APPROVE, REVOKE
})

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request.

  • :revision_id (required, String)

    The system-generated ID of the revision.

  • :approval_state (required, String)

    The approval state to associate with the user on the pull request.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



4852
4853
4854
4855
# File 'lib/aws-sdk-codecommit/client.rb', line 4852

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

#update_pull_request_description(params = {}) ⇒ Types::UpdatePullRequestDescriptionOutput

Replaces the contents of the description of a pull request.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_description({
  pull_request_id: "PullRequestId", # required
  description: "Description", # required
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :description (required, String)

    The updated content of the description for the pull request. This content replaces the existing description.

Returns:

See Also:



4915
4916
4917
4918
# File 'lib/aws-sdk-codecommit/client.rb', line 4915

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

#update_pull_request_status(params = {}) ⇒ Types::UpdatePullRequestStatusOutput

Updates the status of a pull request.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_status({
  pull_request_id: "PullRequestId", # required
  pull_request_status: "OPEN", # required, accepts OPEN, CLOSED
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :pull_request_status (required, String)

    The status of the pull request. The only valid operations are to update the status from ‘OPEN` to `OPEN`, `OPEN` to `CLOSED` or from `CLOSED` to `CLOSED`.

Returns:

See Also:



4979
4980
4981
4982
# File 'lib/aws-sdk-codecommit/client.rb', line 4979

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

#update_pull_request_title(params = {}) ⇒ Types::UpdatePullRequestTitleOutput

Replaces the title of a pull request.

Examples:

Request syntax with placeholder values


resp = client.update_pull_request_title({
  pull_request_id: "PullRequestId", # required
  title: "Title", # required
})

Response structure


resp.pull_request.pull_request_id #=> String
resp.pull_request.title #=> String
resp.pull_request.description #=> String
resp.pull_request.last_activity_date #=> Time
resp.pull_request.creation_date #=> Time
resp.pull_request.pull_request_status #=> String, one of "OPEN", "CLOSED"
resp.pull_request.author_arn #=> String
resp.pull_request.pull_request_targets #=> Array
resp.pull_request.pull_request_targets[0].repository_name #=> String
resp.pull_request.pull_request_targets[0].source_reference #=> String
resp.pull_request.pull_request_targets[0].destination_reference #=> String
resp.pull_request.pull_request_targets[0].destination_commit #=> String
resp.pull_request.pull_request_targets[0].source_commit #=> String
resp.pull_request.pull_request_targets[0].merge_base #=> String
resp.pull_request.pull_request_targets[0]..is_merged #=> Boolean
resp.pull_request.pull_request_targets[0]..merged_by #=> String
resp.pull_request.pull_request_targets[0]..merge_commit_id #=> String
resp.pull_request.pull_request_targets[0]..merge_option #=> String, one of "FAST_FORWARD_MERGE", "SQUASH_MERGE", "THREE_WAY_MERGE"
resp.pull_request.client_request_token #=> String
resp.pull_request.revision_id #=> String
resp.pull_request.approval_rules #=> Array
resp.pull_request.approval_rules[0].approval_rule_id #=> String
resp.pull_request.approval_rules[0].approval_rule_name #=> String
resp.pull_request.approval_rules[0].approval_rule_content #=> String
resp.pull_request.approval_rules[0].rule_content_sha_256 #=> String
resp.pull_request.approval_rules[0].last_modified_date #=> Time
resp.pull_request.approval_rules[0].creation_date #=> Time
resp.pull_request.approval_rules[0].last_modified_user #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_id #=> String
resp.pull_request.approval_rules[0].origin_approval_rule_template.approval_rule_template_name #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :pull_request_id (required, String)

    The system-generated ID of the pull request. To get this ID, use ListPullRequests.

  • :title (required, String)

    The updated title of the pull request. This replaces the existing title.

Returns:

See Also:



5042
5043
5044
5045
# File 'lib/aws-sdk-codecommit/client.rb', line 5042

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

#update_repository_description(params = {}) ⇒ Struct

Sets or changes the comment or description for a repository.

<note markdown=“1”> The description field for a repository accepts all HTML characters and all valid Unicode characters. Applications that do not HTML-encode the description and display it in a webpage can expose users to potentially malicious code. Make sure that you HTML-encode the description field in any application that uses this API to display the repository description on a webpage.

</note>

Examples:

Request syntax with placeholder values


resp = client.update_repository_description({
  repository_name: "RepositoryName", # required
  repository_description: "RepositoryDescription",
})

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository to set or change the comment or description for.

  • :repository_description (String)

    The new comment or description for the specified repository. Repository descriptions are limited to 1,000 characters.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5079
5080
5081
5082
# File 'lib/aws-sdk-codecommit/client.rb', line 5079

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

#update_repository_encryption_key(params = {}) ⇒ Types::UpdateRepositoryEncryptionKeyOutput

Updates the Key Management Service encryption key used to encrypt and decrypt a CodeCommit repository.

Examples:

Request syntax with placeholder values


resp = client.update_repository_encryption_key({
  repository_name: "RepositoryName", # required
  kms_key_id: "KmsKeyId", # required
})

Response structure


resp.repository_id #=> String
resp.kms_key_id #=> String
resp.original_kms_key_id #=> String

Parameters:

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

    ({})

Options Hash (params):

  • :repository_name (required, String)

    The name of the repository for which you want to update the KMS encryption key used to encrypt and decrypt the repository.

  • :kms_key_id (required, String)

    The ID of the encryption key. You can view the ID of an encryption key in the KMS console, or use the KMS APIs to programmatically retrieve a key ID. For more information about acceptable values for keyID, see

    KeyId][1

    in the Decrypt API description in the *Key Management

    Service API Reference*.

    [1]: docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html#KMS-Decrypt-request-KeyId

Returns:

See Also:



5125
5126
5127
5128
# File 'lib/aws-sdk-codecommit/client.rb', line 5125

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

#update_repository_name(params = {}) ⇒ Struct

Renames a repository. The repository name must be unique across the calling Amazon Web Services account. Repository names are limited to 100 alphanumeric, dash, and underscore characters, and cannot include certain characters. The suffix .git is prohibited. For more information about the limits on repository names, see [Quotas] in the CodeCommit User Guide.

[1]: docs.aws.amazon.com/codecommit/latest/userguide/limits.html

Examples:

Request syntax with placeholder values


resp = client.update_repository_name({
  old_name: "RepositoryName", # required
  new_name: "RepositoryName", # required
})

Parameters:

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

    ({})

Options Hash (params):

  • :old_name (required, String)

    The current name of the repository.

  • :new_name (required, String)

    The new name for the repository.

Returns:

  • (Struct)

    Returns an empty response.

See Also:



5160
5161
5162
5163
# File 'lib/aws-sdk-codecommit/client.rb', line 5160

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

#waiter_namesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.


5189
5190
5191
# File 'lib/aws-sdk-codecommit/client.rb', line 5189

def waiter_names
  []
end