aws-sdk-codecommit 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/aws-sdk-codecommit.rb +47 -0
- data/lib/aws-sdk-codecommit/client.rb +680 -0
- data/lib/aws-sdk-codecommit/client_api.rb +584 -0
- data/lib/aws-sdk-codecommit/customizations.rb +7 -0
- data/lib/aws-sdk-codecommit/errors.rb +23 -0
- data/lib/aws-sdk-codecommit/resource.rb +25 -0
- data/lib/aws-sdk-codecommit/types.rb +702 -0
- metadata +80 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 934b1e42b1198e74266c712e959edd4a773280d4
|
4
|
+
data.tar.gz: 378170d9657c81278350464b5fad4d6ab55394ca
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 155460e210b00cdbef0dc058dfaf319ce660fc59945ff8ba9891131133f2c07b7c59e2ec76fce96be4b2049e01b3917b40dda8ab85b75019dd8b2c41794ff773
|
7
|
+
data.tar.gz: 57f3991729362e4a6007aa67facc87c45aa9b980e2b2dba43246bb3bd0ecccbdd4c00c6f60c344f9d20e1e75b6fe39bb17f882075ab5e3317f5211d3c30c2dfb
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'aws-sdk-core'
|
9
|
+
require 'aws-sigv4'
|
10
|
+
|
11
|
+
require_relative 'aws-sdk-codecommit/types'
|
12
|
+
require_relative 'aws-sdk-codecommit/client_api'
|
13
|
+
require_relative 'aws-sdk-codecommit/client'
|
14
|
+
require_relative 'aws-sdk-codecommit/errors'
|
15
|
+
require_relative 'aws-sdk-codecommit/resource'
|
16
|
+
require_relative 'aws-sdk-codecommit/customizations'
|
17
|
+
|
18
|
+
# This module provides support for AWS CodeCommit. This module is available in the
|
19
|
+
# `aws-sdk-codecommit` gem.
|
20
|
+
#
|
21
|
+
# # Client
|
22
|
+
#
|
23
|
+
# The {Client} class provides one method for each API operation. Operation
|
24
|
+
# methods each accept a hash of request parameters and return a response
|
25
|
+
# structure.
|
26
|
+
#
|
27
|
+
# See {Client} for more information.
|
28
|
+
#
|
29
|
+
# # Errors
|
30
|
+
#
|
31
|
+
# Errors returned from AWS CodeCommit all
|
32
|
+
# extend {Errors::ServiceError}.
|
33
|
+
#
|
34
|
+
# begin
|
35
|
+
# # do stuff
|
36
|
+
# rescue Aws::CodeCommit::Errors::ServiceError
|
37
|
+
# # rescues all service API errors
|
38
|
+
# end
|
39
|
+
#
|
40
|
+
# See {Errors} for more information.
|
41
|
+
#
|
42
|
+
# @service
|
43
|
+
module Aws::CodeCommit
|
44
|
+
|
45
|
+
GEM_VERSION = '1.0.0.rc1'
|
46
|
+
|
47
|
+
end
|
@@ -0,0 +1,680 @@
|
|
1
|
+
# WARNING ABOUT GENERATED CODE
|
2
|
+
#
|
3
|
+
# This file is generated. See the contributing for info on making contributions:
|
4
|
+
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
|
5
|
+
#
|
6
|
+
# WARNING ABOUT GENERATED CODE
|
7
|
+
|
8
|
+
require 'seahorse/client/plugins/content_length.rb'
|
9
|
+
require 'aws-sdk-core/plugins/credentials_configuration.rb'
|
10
|
+
require 'aws-sdk-core/plugins/logging.rb'
|
11
|
+
require 'aws-sdk-core/plugins/param_converter.rb'
|
12
|
+
require 'aws-sdk-core/plugins/param_validator.rb'
|
13
|
+
require 'aws-sdk-core/plugins/user_agent.rb'
|
14
|
+
require 'aws-sdk-core/plugins/helpful_socket_errors.rb'
|
15
|
+
require 'aws-sdk-core/plugins/retry_errors.rb'
|
16
|
+
require 'aws-sdk-core/plugins/global_configuration.rb'
|
17
|
+
require 'aws-sdk-core/plugins/regional_endpoint.rb'
|
18
|
+
require 'aws-sdk-core/plugins/response_paging.rb'
|
19
|
+
require 'aws-sdk-core/plugins/stub_responses.rb'
|
20
|
+
require 'aws-sdk-core/plugins/idempotency_token.rb'
|
21
|
+
require 'aws-sdk-core/plugins/signature_v4.rb'
|
22
|
+
require 'aws-sdk-core/plugins/protocols/json_rpc.rb'
|
23
|
+
|
24
|
+
Aws::Plugins::GlobalConfiguration.add_identifier(:codecommit)
|
25
|
+
|
26
|
+
module Aws
|
27
|
+
module CodeCommit
|
28
|
+
class Client < Seahorse::Client::Base
|
29
|
+
|
30
|
+
include Aws::ClientStubs
|
31
|
+
|
32
|
+
@identifier = :codecommit
|
33
|
+
|
34
|
+
set_api(ClientApi::API)
|
35
|
+
|
36
|
+
add_plugin(Seahorse::Client::Plugins::ContentLength)
|
37
|
+
add_plugin(Aws::Plugins::CredentialsConfiguration)
|
38
|
+
add_plugin(Aws::Plugins::Logging)
|
39
|
+
add_plugin(Aws::Plugins::ParamConverter)
|
40
|
+
add_plugin(Aws::Plugins::ParamValidator)
|
41
|
+
add_plugin(Aws::Plugins::UserAgent)
|
42
|
+
add_plugin(Aws::Plugins::HelpfulSocketErrors)
|
43
|
+
add_plugin(Aws::Plugins::RetryErrors)
|
44
|
+
add_plugin(Aws::Plugins::GlobalConfiguration)
|
45
|
+
add_plugin(Aws::Plugins::RegionalEndpoint)
|
46
|
+
add_plugin(Aws::Plugins::ResponsePaging)
|
47
|
+
add_plugin(Aws::Plugins::StubResponses)
|
48
|
+
add_plugin(Aws::Plugins::IdempotencyToken)
|
49
|
+
add_plugin(Aws::Plugins::SignatureV4)
|
50
|
+
add_plugin(Aws::Plugins::Protocols::JsonRpc)
|
51
|
+
|
52
|
+
# @option options [required, Aws::CredentialProvider] :credentials
|
53
|
+
# Your AWS credentials. This can be an instance of any one of the
|
54
|
+
# following classes:
|
55
|
+
#
|
56
|
+
# * `Aws::Credentials` - Used for configuring static, non-refreshing
|
57
|
+
# credentials.
|
58
|
+
#
|
59
|
+
# * `Aws::InstanceProfileCredentials` - Used for loading credentials
|
60
|
+
# from an EC2 IMDS on an EC2 instance.
|
61
|
+
#
|
62
|
+
# * `Aws::SharedCredentials` - Used for loading credentials from a
|
63
|
+
# shared file, such as `~/.aws/config`.
|
64
|
+
#
|
65
|
+
# * `Aws::AssumeRoleCredentials` - Used when you need to assume a role.
|
66
|
+
#
|
67
|
+
# When `:credentials` are not configured directly, the following
|
68
|
+
# locations will be searched for credentials:
|
69
|
+
#
|
70
|
+
# * `Aws.config[:credentials]`
|
71
|
+
# * The `:access_key_id`, `:secret_access_key`, and `:session_token` options.
|
72
|
+
# * ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY']
|
73
|
+
# * `~/.aws/credentials`
|
74
|
+
# * `~/.aws/config`
|
75
|
+
# * EC2 IMDS instance profile - When used by default, the timeouts are
|
76
|
+
# very aggressive. Construct and pass an instance of
|
77
|
+
# `Aws::InstanceProfileCredentails` to enable retries and extended
|
78
|
+
# timeouts.
|
79
|
+
# @option options [required, String] :region
|
80
|
+
# The AWS region to connect to. The configured `:region` is
|
81
|
+
# used to determine the service `:endpoint`. When not passed,
|
82
|
+
# a default `:region` is search for in the following locations:
|
83
|
+
#
|
84
|
+
# * `Aws.config[:region]`
|
85
|
+
# * `ENV['AWS_REGION']`
|
86
|
+
# * `ENV['AMAZON_REGION']`
|
87
|
+
# * `ENV['AWS_DEFAULT_REGION']`
|
88
|
+
# * `~/.aws/credentials`
|
89
|
+
# * `~/.aws/config`
|
90
|
+
# @option options [String] :access_key_id
|
91
|
+
# @option options [Boolean] :convert_params (true)
|
92
|
+
# When `true`, an attempt is made to coerce request parameters into
|
93
|
+
# the required types.
|
94
|
+
# @option options [String] :endpoint
|
95
|
+
# The client endpoint is normally constructed from the `:region`
|
96
|
+
# option. You should only configure an `:endpoint` when connecting
|
97
|
+
# to test endpoints. This should be avalid HTTP(S) URI.
|
98
|
+
# @option options [Aws::Log::Formatter] :log_formatter (Aws::Log::Formatter.default)
|
99
|
+
# The log formatter.
|
100
|
+
# @option options [Symbol] :log_level (:info)
|
101
|
+
# The log level to send messages to the `:logger` at.
|
102
|
+
# @option options [Logger] :logger
|
103
|
+
# The Logger instance to send log messages to. If this option
|
104
|
+
# is not set, logging will be disabled.
|
105
|
+
# @option options [String] :profile ("default")
|
106
|
+
# Used when loading credentials from the shared credentials file
|
107
|
+
# at HOME/.aws/credentials. When not specified, 'default' is used.
|
108
|
+
# @option options [Integer] :retry_limit (3)
|
109
|
+
# The maximum number of times to retry failed requests. Only
|
110
|
+
# ~ 500 level server errors and certain ~ 400 level client errors
|
111
|
+
# are retried. Generally, these are throttling errors, data
|
112
|
+
# checksum errors, networking errors, timeout errors and auth
|
113
|
+
# errors from expired credentials.
|
114
|
+
# @option options [String] :secret_access_key
|
115
|
+
# @option options [String] :session_token
|
116
|
+
# @option options [Boolean] :simple_json (false)
|
117
|
+
# Disables request parameter conversion, validation, and formatting.
|
118
|
+
# Also disable response data type conversions. This option is useful
|
119
|
+
# when you want to ensure the highest level of performance by
|
120
|
+
# avoiding overhead of walking request parameters and response data
|
121
|
+
# structures.
|
122
|
+
#
|
123
|
+
# When `:simple_json` is enabled, the request parameters hash must
|
124
|
+
# be formatted exactly as the DynamoDB API expects.
|
125
|
+
# @option options [Boolean] :stub_responses (false)
|
126
|
+
# Causes the client to return stubbed responses. By default
|
127
|
+
# fake responses are generated and returned. You can specify
|
128
|
+
# the response data to return or errors to raise by calling
|
129
|
+
# {ClientStubs#stub_responses}. See {ClientStubs} for more information.
|
130
|
+
#
|
131
|
+
# ** Please note ** When response stubbing is enabled, no HTTP
|
132
|
+
# requests are made, and retries are disabled.
|
133
|
+
# @option options [Boolean] :validate_params (true)
|
134
|
+
# When `true`, request parameters are validated before
|
135
|
+
# sending the request.
|
136
|
+
def initialize(*args)
|
137
|
+
super
|
138
|
+
end
|
139
|
+
|
140
|
+
# @!group API Operations
|
141
|
+
|
142
|
+
# Returns information about one or more repositories.
|
143
|
+
#
|
144
|
+
# <note markdown="1">The description field for a repository accepts all HTML characters and
|
145
|
+
# all valid Unicode characters. Applications that do not HTML-encode the
|
146
|
+
# description and display it in a web page could expose users to
|
147
|
+
# potentially malicious code. Make sure that you HTML-encode the
|
148
|
+
# description field in any application that uses this API to display the
|
149
|
+
# repository description on a web page.
|
150
|
+
#
|
151
|
+
# </note>
|
152
|
+
# @option params [required, Array<String>] :repository_names
|
153
|
+
# The names of the repositories to get information about.
|
154
|
+
# @return [Types::BatchGetRepositoriesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
155
|
+
#
|
156
|
+
# * {Types::BatchGetRepositoriesOutput#repositories #repositories} => Array<Types::RepositoryMetadata>
|
157
|
+
# * {Types::BatchGetRepositoriesOutput#repositories_not_found #repositoriesNotFound} => Array<String>
|
158
|
+
#
|
159
|
+
# @example Request syntax with placeholder values
|
160
|
+
# resp = client.batch_get_repositories({
|
161
|
+
# repository_names: ["RepositoryName"], # required
|
162
|
+
# })
|
163
|
+
#
|
164
|
+
# @example Response structure
|
165
|
+
# resp.repositories #=> Array
|
166
|
+
# resp.repositories[0].account_id #=> String
|
167
|
+
# resp.repositories[0].repository_id #=> String
|
168
|
+
# resp.repositories[0].repository_name #=> String
|
169
|
+
# resp.repositories[0].repository_description #=> String
|
170
|
+
# resp.repositories[0].default_branch #=> String
|
171
|
+
# resp.repositories[0].last_modified_date #=> Time
|
172
|
+
# resp.repositories[0].creation_date #=> Time
|
173
|
+
# resp.repositories[0].clone_url_http #=> String
|
174
|
+
# resp.repositories[0].clone_url_ssh #=> String
|
175
|
+
# resp.repositories[0].arn #=> String
|
176
|
+
# resp.repositories_not_found #=> Array
|
177
|
+
# resp.repositories_not_found[0] #=> String
|
178
|
+
# @overload batch_get_repositories(params = {})
|
179
|
+
# @param [Hash] params ({})
|
180
|
+
def batch_get_repositories(params = {}, options = {})
|
181
|
+
req = build_request(:batch_get_repositories, params)
|
182
|
+
req.send_request(options)
|
183
|
+
end
|
184
|
+
|
185
|
+
# Creates a new branch in a repository and points the branch to a
|
186
|
+
# commit.
|
187
|
+
#
|
188
|
+
# <note markdown="1">Calling the create branch operation does not set a repository's
|
189
|
+
# default branch. To do this, call the update default branch operation.
|
190
|
+
#
|
191
|
+
# </note>
|
192
|
+
# @option params [required, String] :repository_name
|
193
|
+
# The name of the repository in which you want to create the new branch.
|
194
|
+
# @option params [required, String] :branch_name
|
195
|
+
# The name of the new branch to create.
|
196
|
+
# @option params [required, String] :commit_id
|
197
|
+
# The ID of the commit to point the new branch to.
|
198
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
199
|
+
#
|
200
|
+
# @example Request syntax with placeholder values
|
201
|
+
# resp = client.create_branch({
|
202
|
+
# repository_name: "RepositoryName", # required
|
203
|
+
# branch_name: "BranchName", # required
|
204
|
+
# commit_id: "CommitId", # required
|
205
|
+
# })
|
206
|
+
# @overload create_branch(params = {})
|
207
|
+
# @param [Hash] params ({})
|
208
|
+
def create_branch(params = {}, options = {})
|
209
|
+
req = build_request(:create_branch, params)
|
210
|
+
req.send_request(options)
|
211
|
+
end
|
212
|
+
|
213
|
+
# Creates a new, empty repository.
|
214
|
+
# @option params [required, String] :repository_name
|
215
|
+
# The name of the new repository to be created.
|
216
|
+
#
|
217
|
+
# <note markdown="1">The repository name must be unique across the calling AWS account. In
|
218
|
+
# addition, repository names are limited to 100 alphanumeric, dash, and
|
219
|
+
# underscore characters, and cannot include certain characters. For a
|
220
|
+
# full description of the limits on repository names, see [Limits][1] in
|
221
|
+
# the AWS CodeCommit User Guide. The suffix ".git" is prohibited.
|
222
|
+
#
|
223
|
+
# </note>
|
224
|
+
#
|
225
|
+
#
|
226
|
+
#
|
227
|
+
# [1]: http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html
|
228
|
+
# @option params [String] :repository_description
|
229
|
+
# A comment or description about the new repository.
|
230
|
+
#
|
231
|
+
# <note markdown="1">The description field for a repository accepts all HTML characters and
|
232
|
+
# all valid Unicode characters. Applications that do not HTML-encode the
|
233
|
+
# description and display it in a web page could expose users to
|
234
|
+
# potentially malicious code. Make sure that you HTML-encode the
|
235
|
+
# description field in any application that uses this API to display the
|
236
|
+
# repository description on a web page.
|
237
|
+
#
|
238
|
+
# </note>
|
239
|
+
# @return [Types::CreateRepositoryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
240
|
+
#
|
241
|
+
# * {Types::CreateRepositoryOutput#repository_metadata #repositoryMetadata} => Types::RepositoryMetadata
|
242
|
+
#
|
243
|
+
# @example Request syntax with placeholder values
|
244
|
+
# resp = client.create_repository({
|
245
|
+
# repository_name: "RepositoryName", # required
|
246
|
+
# repository_description: "RepositoryDescription",
|
247
|
+
# })
|
248
|
+
#
|
249
|
+
# @example Response structure
|
250
|
+
# resp.repository_metadata.account_id #=> String
|
251
|
+
# resp.repository_metadata.repository_id #=> String
|
252
|
+
# resp.repository_metadata.repository_name #=> String
|
253
|
+
# resp.repository_metadata.repository_description #=> String
|
254
|
+
# resp.repository_metadata.default_branch #=> String
|
255
|
+
# resp.repository_metadata.last_modified_date #=> Time
|
256
|
+
# resp.repository_metadata.creation_date #=> Time
|
257
|
+
# resp.repository_metadata.clone_url_http #=> String
|
258
|
+
# resp.repository_metadata.clone_url_ssh #=> String
|
259
|
+
# resp.repository_metadata.arn #=> String
|
260
|
+
# @overload create_repository(params = {})
|
261
|
+
# @param [Hash] params ({})
|
262
|
+
def create_repository(params = {}, options = {})
|
263
|
+
req = build_request(:create_repository, params)
|
264
|
+
req.send_request(options)
|
265
|
+
end
|
266
|
+
|
267
|
+
# Deletes a repository. If a specified repository was already deleted, a
|
268
|
+
# null repository ID will be returned.
|
269
|
+
#
|
270
|
+
# Deleting a repository also deletes all associated objects and
|
271
|
+
# metadata. After a repository is deleted, all future push calls to the
|
272
|
+
# deleted repository will fail.
|
273
|
+
# @option params [required, String] :repository_name
|
274
|
+
# The name of the repository to delete.
|
275
|
+
# @return [Types::DeleteRepositoryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
276
|
+
#
|
277
|
+
# * {Types::DeleteRepositoryOutput#repository_id #repositoryId} => String
|
278
|
+
#
|
279
|
+
# @example Request syntax with placeholder values
|
280
|
+
# resp = client.delete_repository({
|
281
|
+
# repository_name: "RepositoryName", # required
|
282
|
+
# })
|
283
|
+
#
|
284
|
+
# @example Response structure
|
285
|
+
# resp.repository_id #=> String
|
286
|
+
# @overload delete_repository(params = {})
|
287
|
+
# @param [Hash] params ({})
|
288
|
+
def delete_repository(params = {}, options = {})
|
289
|
+
req = build_request(:delete_repository, params)
|
290
|
+
req.send_request(options)
|
291
|
+
end
|
292
|
+
|
293
|
+
# Returns information about a repository branch, including its name and
|
294
|
+
# the last commit ID.
|
295
|
+
# @option params [String] :repository_name
|
296
|
+
# The name of the repository that contains the branch for which you want
|
297
|
+
# to retrieve information.
|
298
|
+
# @option params [String] :branch_name
|
299
|
+
# The name of the branch for which you want to retrieve information.
|
300
|
+
# @return [Types::GetBranchOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
301
|
+
#
|
302
|
+
# * {Types::GetBranchOutput#branch #branch} => Types::BranchInfo
|
303
|
+
#
|
304
|
+
# @example Request syntax with placeholder values
|
305
|
+
# resp = client.get_branch({
|
306
|
+
# repository_name: "RepositoryName",
|
307
|
+
# branch_name: "BranchName",
|
308
|
+
# })
|
309
|
+
#
|
310
|
+
# @example Response structure
|
311
|
+
# resp.branch.branch_name #=> String
|
312
|
+
# resp.branch.commit_id #=> String
|
313
|
+
# @overload get_branch(params = {})
|
314
|
+
# @param [Hash] params ({})
|
315
|
+
def get_branch(params = {}, options = {})
|
316
|
+
req = build_request(:get_branch, params)
|
317
|
+
req.send_request(options)
|
318
|
+
end
|
319
|
+
|
320
|
+
# Returns information about a commit, including commit message and
|
321
|
+
# committer information.
|
322
|
+
# @option params [required, String] :repository_name
|
323
|
+
# The name of the repository to which the commit was made.
|
324
|
+
# @option params [required, String] :commit_id
|
325
|
+
# The commit ID.
|
326
|
+
# @return [Types::GetCommitOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
327
|
+
#
|
328
|
+
# * {Types::GetCommitOutput#commit #commit} => Types::Commit
|
329
|
+
#
|
330
|
+
# @example Request syntax with placeholder values
|
331
|
+
# resp = client.get_commit({
|
332
|
+
# repository_name: "RepositoryName", # required
|
333
|
+
# commit_id: "ObjectId", # required
|
334
|
+
# })
|
335
|
+
#
|
336
|
+
# @example Response structure
|
337
|
+
# resp.commit.tree_id #=> String
|
338
|
+
# resp.commit.parents #=> Array
|
339
|
+
# resp.commit.parents[0] #=> String
|
340
|
+
# resp.commit.message #=> String
|
341
|
+
# resp.commit.author.name #=> String
|
342
|
+
# resp.commit.author.email #=> String
|
343
|
+
# resp.commit.author.date #=> String
|
344
|
+
# resp.commit.committer.name #=> String
|
345
|
+
# resp.commit.committer.email #=> String
|
346
|
+
# resp.commit.committer.date #=> String
|
347
|
+
# resp.commit.additional_data #=> String
|
348
|
+
# @overload get_commit(params = {})
|
349
|
+
# @param [Hash] params ({})
|
350
|
+
def get_commit(params = {}, options = {})
|
351
|
+
req = build_request(:get_commit, params)
|
352
|
+
req.send_request(options)
|
353
|
+
end
|
354
|
+
|
355
|
+
# Returns information about a repository.
|
356
|
+
#
|
357
|
+
# <note markdown="1">The description field for a repository accepts all HTML characters and
|
358
|
+
# all valid Unicode characters. Applications that do not HTML-encode the
|
359
|
+
# description and display it in a web page could expose users to
|
360
|
+
# potentially malicious code. Make sure that you HTML-encode the
|
361
|
+
# description field in any application that uses this API to display the
|
362
|
+
# repository description on a web page.
|
363
|
+
#
|
364
|
+
# </note>
|
365
|
+
# @option params [required, String] :repository_name
|
366
|
+
# The name of the repository to get information about.
|
367
|
+
# @return [Types::GetRepositoryOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
368
|
+
#
|
369
|
+
# * {Types::GetRepositoryOutput#repository_metadata #repositoryMetadata} => Types::RepositoryMetadata
|
370
|
+
#
|
371
|
+
# @example Request syntax with placeholder values
|
372
|
+
# resp = client.get_repository({
|
373
|
+
# repository_name: "RepositoryName", # required
|
374
|
+
# })
|
375
|
+
#
|
376
|
+
# @example Response structure
|
377
|
+
# resp.repository_metadata.account_id #=> String
|
378
|
+
# resp.repository_metadata.repository_id #=> String
|
379
|
+
# resp.repository_metadata.repository_name #=> String
|
380
|
+
# resp.repository_metadata.repository_description #=> String
|
381
|
+
# resp.repository_metadata.default_branch #=> String
|
382
|
+
# resp.repository_metadata.last_modified_date #=> Time
|
383
|
+
# resp.repository_metadata.creation_date #=> Time
|
384
|
+
# resp.repository_metadata.clone_url_http #=> String
|
385
|
+
# resp.repository_metadata.clone_url_ssh #=> String
|
386
|
+
# resp.repository_metadata.arn #=> String
|
387
|
+
# @overload get_repository(params = {})
|
388
|
+
# @param [Hash] params ({})
|
389
|
+
def get_repository(params = {}, options = {})
|
390
|
+
req = build_request(:get_repository, params)
|
391
|
+
req.send_request(options)
|
392
|
+
end
|
393
|
+
|
394
|
+
# Gets information about triggers configured for a repository.
|
395
|
+
# @option params [String] :repository_name
|
396
|
+
# The name of the repository for which the trigger is configured.
|
397
|
+
# @return [Types::GetRepositoryTriggersOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
398
|
+
#
|
399
|
+
# * {Types::GetRepositoryTriggersOutput#configuration_id #configurationId} => String
|
400
|
+
# * {Types::GetRepositoryTriggersOutput#triggers #triggers} => Array<Types::RepositoryTrigger>
|
401
|
+
#
|
402
|
+
# @example Request syntax with placeholder values
|
403
|
+
# resp = client.get_repository_triggers({
|
404
|
+
# repository_name: "RepositoryName",
|
405
|
+
# })
|
406
|
+
#
|
407
|
+
# @example Response structure
|
408
|
+
# resp.configuration_id #=> String
|
409
|
+
# resp.triggers #=> Array
|
410
|
+
# resp.triggers[0].name #=> String
|
411
|
+
# resp.triggers[0].destination_arn #=> String
|
412
|
+
# resp.triggers[0].custom_data #=> String
|
413
|
+
# resp.triggers[0].branches #=> Array
|
414
|
+
# resp.triggers[0].branches[0] #=> String
|
415
|
+
# resp.triggers[0].events #=> Array
|
416
|
+
# resp.triggers[0].events[0] #=> String, one of "all", "updateReference", "createReference", "deleteReference"
|
417
|
+
# @overload get_repository_triggers(params = {})
|
418
|
+
# @param [Hash] params ({})
|
419
|
+
def get_repository_triggers(params = {}, options = {})
|
420
|
+
req = build_request(:get_repository_triggers, params)
|
421
|
+
req.send_request(options)
|
422
|
+
end
|
423
|
+
|
424
|
+
# Gets information about one or more branches in a repository.
|
425
|
+
# @option params [required, String] :repository_name
|
426
|
+
# The name of the repository that contains the branches.
|
427
|
+
# @option params [String] :next_token
|
428
|
+
# An enumeration token that allows the operation to batch the results.
|
429
|
+
# @return [Types::ListBranchesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
430
|
+
#
|
431
|
+
# * {Types::ListBranchesOutput#branches #branches} => Array<String>
|
432
|
+
# * {Types::ListBranchesOutput#next_token #nextToken} => String
|
433
|
+
#
|
434
|
+
# @example Request syntax with placeholder values
|
435
|
+
# resp = client.list_branches({
|
436
|
+
# repository_name: "RepositoryName", # required
|
437
|
+
# next_token: "NextToken",
|
438
|
+
# })
|
439
|
+
#
|
440
|
+
# @example Response structure
|
441
|
+
# resp.branches #=> Array
|
442
|
+
# resp.branches[0] #=> String
|
443
|
+
# resp.next_token #=> String
|
444
|
+
# @overload list_branches(params = {})
|
445
|
+
# @param [Hash] params ({})
|
446
|
+
def list_branches(params = {}, options = {})
|
447
|
+
req = build_request(:list_branches, params)
|
448
|
+
req.send_request(options)
|
449
|
+
end
|
450
|
+
|
451
|
+
# Gets information about one or more repositories.
|
452
|
+
# @option params [String] :next_token
|
453
|
+
# An enumeration token that allows the operation to batch the results of
|
454
|
+
# the operation. Batch sizes are 1,000 for list repository operations.
|
455
|
+
# When the client sends the token back to AWS CodeCommit, another page
|
456
|
+
# of 1,000 records is retrieved.
|
457
|
+
# @option params [String] :sort_by
|
458
|
+
# The criteria used to sort the results of a list repositories
|
459
|
+
# operation.
|
460
|
+
# @option params [String] :order
|
461
|
+
# The order in which to sort the results of a list repositories
|
462
|
+
# operation.
|
463
|
+
# @return [Types::ListRepositoriesOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
464
|
+
#
|
465
|
+
# * {Types::ListRepositoriesOutput#repositories #repositories} => Array<Types::RepositoryNameIdPair>
|
466
|
+
# * {Types::ListRepositoriesOutput#next_token #nextToken} => String
|
467
|
+
#
|
468
|
+
# @example Request syntax with placeholder values
|
469
|
+
# resp = client.list_repositories({
|
470
|
+
# next_token: "NextToken",
|
471
|
+
# sort_by: "repositoryName", # accepts repositoryName, lastModifiedDate
|
472
|
+
# order: "ascending", # accepts ascending, descending
|
473
|
+
# })
|
474
|
+
#
|
475
|
+
# @example Response structure
|
476
|
+
# resp.repositories #=> Array
|
477
|
+
# resp.repositories[0].repository_name #=> String
|
478
|
+
# resp.repositories[0].repository_id #=> String
|
479
|
+
# resp.next_token #=> String
|
480
|
+
# @overload list_repositories(params = {})
|
481
|
+
# @param [Hash] params ({})
|
482
|
+
def list_repositories(params = {}, options = {})
|
483
|
+
req = build_request(:list_repositories, params)
|
484
|
+
req.send_request(options)
|
485
|
+
end
|
486
|
+
|
487
|
+
# Replaces all triggers for a repository. This can be used to create or
|
488
|
+
# delete triggers.
|
489
|
+
# @option params [String] :repository_name
|
490
|
+
# The name of the repository where you want to create or update the
|
491
|
+
# trigger.
|
492
|
+
# @option params [Array<Types::RepositoryTrigger>] :triggers
|
493
|
+
# The JSON block of configuration information for each trigger.
|
494
|
+
# @return [Types::PutRepositoryTriggersOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
495
|
+
#
|
496
|
+
# * {Types::PutRepositoryTriggersOutput#configuration_id #configurationId} => String
|
497
|
+
#
|
498
|
+
# @example Request syntax with placeholder values
|
499
|
+
# resp = client.put_repository_triggers({
|
500
|
+
# repository_name: "RepositoryName",
|
501
|
+
# triggers: [
|
502
|
+
# {
|
503
|
+
# name: "RepositoryTriggerName",
|
504
|
+
# destination_arn: "Arn",
|
505
|
+
# custom_data: "RepositoryTriggerCustomData",
|
506
|
+
# branches: ["BranchName"],
|
507
|
+
# events: ["all"], # accepts all, updateReference, createReference, deleteReference
|
508
|
+
# },
|
509
|
+
# ],
|
510
|
+
# })
|
511
|
+
#
|
512
|
+
# @example Response structure
|
513
|
+
# resp.configuration_id #=> String
|
514
|
+
# @overload put_repository_triggers(params = {})
|
515
|
+
# @param [Hash] params ({})
|
516
|
+
def put_repository_triggers(params = {}, options = {})
|
517
|
+
req = build_request(:put_repository_triggers, params)
|
518
|
+
req.send_request(options)
|
519
|
+
end
|
520
|
+
|
521
|
+
# Tests the functionality of repository triggers by sending information
|
522
|
+
# to the trigger target. If real data is available in the repository,
|
523
|
+
# the test will send data from the last commit. If no data is available,
|
524
|
+
# sample data will be generated.
|
525
|
+
# @option params [String] :repository_name
|
526
|
+
# The name of the repository in which to test the triggers.
|
527
|
+
# @option params [Array<Types::RepositoryTrigger>] :triggers
|
528
|
+
# The list of triggers to test.
|
529
|
+
# @return [Types::TestRepositoryTriggersOutput] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
|
530
|
+
#
|
531
|
+
# * {Types::TestRepositoryTriggersOutput#successful_executions #successfulExecutions} => Array<String>
|
532
|
+
# * {Types::TestRepositoryTriggersOutput#failed_executions #failedExecutions} => Array<Types::RepositoryTriggerExecutionFailure>
|
533
|
+
#
|
534
|
+
# @example Request syntax with placeholder values
|
535
|
+
# resp = client.test_repository_triggers({
|
536
|
+
# repository_name: "RepositoryName",
|
537
|
+
# triggers: [
|
538
|
+
# {
|
539
|
+
# name: "RepositoryTriggerName",
|
540
|
+
# destination_arn: "Arn",
|
541
|
+
# custom_data: "RepositoryTriggerCustomData",
|
542
|
+
# branches: ["BranchName"],
|
543
|
+
# events: ["all"], # accepts all, updateReference, createReference, deleteReference
|
544
|
+
# },
|
545
|
+
# ],
|
546
|
+
# })
|
547
|
+
#
|
548
|
+
# @example Response structure
|
549
|
+
# resp.successful_executions #=> Array
|
550
|
+
# resp.successful_executions[0] #=> String
|
551
|
+
# resp.failed_executions #=> Array
|
552
|
+
# resp.failed_executions[0].trigger #=> String
|
553
|
+
# resp.failed_executions[0].failure_message #=> String
|
554
|
+
# @overload test_repository_triggers(params = {})
|
555
|
+
# @param [Hash] params ({})
|
556
|
+
def test_repository_triggers(params = {}, options = {})
|
557
|
+
req = build_request(:test_repository_triggers, params)
|
558
|
+
req.send_request(options)
|
559
|
+
end
|
560
|
+
|
561
|
+
# Sets or changes the default branch name for the specified repository.
|
562
|
+
#
|
563
|
+
# <note markdown="1">If you use this operation to change the default branch name to the
|
564
|
+
# current default branch name, a success message is returned even though
|
565
|
+
# the default branch did not change.
|
566
|
+
#
|
567
|
+
# </note>
|
568
|
+
# @option params [required, String] :repository_name
|
569
|
+
# The name of the repository to set or change the default branch for.
|
570
|
+
# @option params [required, String] :default_branch_name
|
571
|
+
# The name of the branch to set as the default.
|
572
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
573
|
+
#
|
574
|
+
# @example Request syntax with placeholder values
|
575
|
+
# resp = client.update_default_branch({
|
576
|
+
# repository_name: "RepositoryName", # required
|
577
|
+
# default_branch_name: "BranchName", # required
|
578
|
+
# })
|
579
|
+
# @overload update_default_branch(params = {})
|
580
|
+
# @param [Hash] params ({})
|
581
|
+
def update_default_branch(params = {}, options = {})
|
582
|
+
req = build_request(:update_default_branch, params)
|
583
|
+
req.send_request(options)
|
584
|
+
end
|
585
|
+
|
586
|
+
# Sets or changes the comment or description for a repository.
|
587
|
+
#
|
588
|
+
# <note markdown="1">The description field for a repository accepts all HTML characters and
|
589
|
+
# all valid Unicode characters. Applications that do not HTML-encode the
|
590
|
+
# description and display it in a web page could expose users to
|
591
|
+
# potentially malicious code. Make sure that you HTML-encode the
|
592
|
+
# description field in any application that uses this API to display the
|
593
|
+
# repository description on a web page.
|
594
|
+
#
|
595
|
+
# </note>
|
596
|
+
# @option params [required, String] :repository_name
|
597
|
+
# The name of the repository to set or change the comment or description
|
598
|
+
# for.
|
599
|
+
# @option params [String] :repository_description
|
600
|
+
# The new comment or description for the specified repository.
|
601
|
+
# Repository descriptions are limited to 1,000 characters.
|
602
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
603
|
+
#
|
604
|
+
# @example Request syntax with placeholder values
|
605
|
+
# resp = client.update_repository_description({
|
606
|
+
# repository_name: "RepositoryName", # required
|
607
|
+
# repository_description: "RepositoryDescription",
|
608
|
+
# })
|
609
|
+
# @overload update_repository_description(params = {})
|
610
|
+
# @param [Hash] params ({})
|
611
|
+
def update_repository_description(params = {}, options = {})
|
612
|
+
req = build_request(:update_repository_description, params)
|
613
|
+
req.send_request(options)
|
614
|
+
end
|
615
|
+
|
616
|
+
# Renames a repository. The repository name must be unique across the
|
617
|
+
# calling AWS account. In addition, repository names are limited to 100
|
618
|
+
# alphanumeric, dash, and underscore characters, and cannot include
|
619
|
+
# certain characters. The suffix ".git" is prohibited. For a full
|
620
|
+
# description of the limits on repository names, see [Limits][1] in the
|
621
|
+
# AWS CodeCommit User Guide.
|
622
|
+
#
|
623
|
+
#
|
624
|
+
#
|
625
|
+
# [1]: http://docs.aws.amazon.com/codecommit/latest/userguide/limits.html
|
626
|
+
# @option params [required, String] :old_name
|
627
|
+
# The existing name of the repository.
|
628
|
+
# @option params [required, String] :new_name
|
629
|
+
# The new name for the repository.
|
630
|
+
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
631
|
+
#
|
632
|
+
# @example Request syntax with placeholder values
|
633
|
+
# resp = client.update_repository_name({
|
634
|
+
# old_name: "RepositoryName", # required
|
635
|
+
# new_name: "RepositoryName", # required
|
636
|
+
# })
|
637
|
+
# @overload update_repository_name(params = {})
|
638
|
+
# @param [Hash] params ({})
|
639
|
+
def update_repository_name(params = {}, options = {})
|
640
|
+
req = build_request(:update_repository_name, params)
|
641
|
+
req.send_request(options)
|
642
|
+
end
|
643
|
+
|
644
|
+
# @!endgroup
|
645
|
+
|
646
|
+
# @param params ({})
|
647
|
+
# @api private
|
648
|
+
def build_request(operation_name, params = {})
|
649
|
+
handlers = @handlers.for(operation_name)
|
650
|
+
context = Seahorse::Client::RequestContext.new(
|
651
|
+
operation_name: operation_name,
|
652
|
+
operation: config.api.operation(operation_name),
|
653
|
+
client: self,
|
654
|
+
params: params,
|
655
|
+
config: config)
|
656
|
+
context[:gem_name] = 'aws-sdk-codecommit'
|
657
|
+
context[:gem_version] = '1.0.0.rc1'
|
658
|
+
Seahorse::Client::Request.new(handlers, context)
|
659
|
+
end
|
660
|
+
|
661
|
+
# @api private
|
662
|
+
# @deprecated
|
663
|
+
def waiter_names
|
664
|
+
[]
|
665
|
+
end
|
666
|
+
|
667
|
+
class << self
|
668
|
+
|
669
|
+
# @api private
|
670
|
+
attr_reader :identifier
|
671
|
+
|
672
|
+
# @api private
|
673
|
+
def errors_module
|
674
|
+
Errors
|
675
|
+
end
|
676
|
+
|
677
|
+
end
|
678
|
+
end
|
679
|
+
end
|
680
|
+
end
|