aws-sdk-codegurureviewer 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bd769e7bc0b3132eb35b53e25f9cbb08ff99f6eaa044facc70be540692c35eb
4
- data.tar.gz: d04d4b2ad7da307c135f7540fb56a4ad472f991940028788ed9e0271677d5b79
3
+ metadata.gz: a17597e3cae8c8f99e884e68fce8cc5f282960dc0032046c4b4f71c6bb5bcb48
4
+ data.tar.gz: 1a7883959a6263a010d49ad360e2e914ea4e484c1f80ce567797627025609699
5
5
  SHA512:
6
- metadata.gz: cee7db1232aef825999084f109e838510c2ee4a3d89a6afb6ad876c5d125ee34a76a7435afdcb55399ebecdc55aa94675c4123a984fcae3f42a188ab5875c337
7
- data.tar.gz: 7e7af76b4a583102b073ec60c0b9e7efece0c962104a4b46d3c879df2e2782070c0a6bdd33dbbd696f364ac2780470c453a8b6cf70223ce6a7d4928d7b474aab
6
+ metadata.gz: 77617b34fe72d1fa4c7495c52e5ef3cb96bc708f265d5cf80898248fdf6be87a95ddaf7188c7722926eb28322ab91238321fea87ced67bb79be8ac7dfb12f2be
7
+ data.tar.gz: 3d1fca8b60788280361736f86df5288d299d3eb52f98f342e3c869db2c7784affae1f44bc37434e94df39e2667ea64aff31200d98d8ffb47c1abe77724858026
@@ -47,6 +47,6 @@ require_relative 'aws-sdk-codegurureviewer/customizations'
47
47
  # @!group service
48
48
  module Aws::CodeGuruReviewer
49
49
 
50
- GEM_VERSION = '1.10.0'
50
+ GEM_VERSION = '1.11.0'
51
51
 
52
52
  end
@@ -362,25 +362,6 @@ module Aws::CodeGuruReviewer
362
362
  # The repository to associate.
363
363
  #
364
364
  # @option params [String] :client_request_token
365
- # Unique, case-sensitive identifier that you provide to ensure the
366
- # idempotency of the request.
367
- #
368
- # To add a new repository association, this parameter specifies a unique
369
- # identifier for the new repository association that helps ensure
370
- # idempotency.
371
- #
372
- # If you use the AWS CLI or one of the AWS SDKs to call this operation,
373
- # you can leave this parameter empty. The CLI or SDK generates a random
374
- # UUID for you and includes that in the request. If you don't use the
375
- # SDK and instead generate a raw HTTP request to the Secrets Manager
376
- # service endpoint, you must generate a ClientRequestToken yourself for
377
- # new versions and include that value in the request.
378
- #
379
- # You typically interact with this value if you implement your own retry
380
- # logic and want to ensure that a given repository association is not
381
- # created twice. We recommend that you generate a UUID-type value to
382
- # ensure uniqueness within the specified repository association.
383
- #
384
365
  # Amazon CodeGuru Reviewer uses this value to prevent the accidental
385
366
  # creation of duplicate repository associations if there are failures
386
367
  # and retries.
@@ -435,6 +416,85 @@ module Aws::CodeGuruReviewer
435
416
  req.send_request(options)
436
417
  end
437
418
 
419
+ # Use to create a code review for a repository analysis.
420
+ #
421
+ # @option params [required, String] :name
422
+ # The name of the code review. Each code review of the same code review
423
+ # type must have a unique name in your AWS account.
424
+ #
425
+ # @option params [required, String] :repository_association_arn
426
+ # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1]
427
+ # object. You can retrieve this ARN by calling `ListRepositories`.
428
+ #
429
+ # A code review can only be created on an associated repository. This is
430
+ # the ARN of the associated repository.
431
+ #
432
+ #
433
+ #
434
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html
435
+ #
436
+ # @option params [required, Types::CodeReviewType] :type
437
+ # The type of code review to create. This is specified using a [
438
+ # `CodeReviewType` ][1] object.
439
+ #
440
+ #
441
+ #
442
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html
443
+ #
444
+ # @option params [String] :client_request_token
445
+ # Amazon CodeGuru Reviewer uses this value to prevent the accidental
446
+ # creation of duplicate code reviews if there are failures and retries.
447
+ #
448
+ # **A suitable default value is auto-generated.** You should normally
449
+ # not need to pass this option.**
450
+ #
451
+ # @return [Types::CreateCodeReviewResponse] Returns a {Seahorse::Client::Response response} object which responds to the following methods:
452
+ #
453
+ # * {Types::CreateCodeReviewResponse#code_review #code_review} => Types::CodeReview
454
+ #
455
+ # @example Request syntax with placeholder values
456
+ #
457
+ # resp = client.create_code_review({
458
+ # name: "CodeReviewName", # required
459
+ # repository_association_arn: "Arn", # required
460
+ # type: { # required
461
+ # repository_analysis: { # required
462
+ # repository_head: { # required
463
+ # branch_name: "BranchName", # required
464
+ # },
465
+ # },
466
+ # },
467
+ # client_request_token: "ClientRequestToken",
468
+ # })
469
+ #
470
+ # @example Response structure
471
+ #
472
+ # resp.code_review.name #=> String
473
+ # resp.code_review.code_review_arn #=> String
474
+ # resp.code_review.repository_name #=> String
475
+ # resp.code_review.owner #=> String
476
+ # resp.code_review.provider_type #=> String, one of "CodeCommit", "GitHub", "Bitbucket", "GitHubEnterpriseServer"
477
+ # resp.code_review.state #=> String, one of "Completed", "Pending", "Failed", "Deleting"
478
+ # resp.code_review.state_reason #=> String
479
+ # resp.code_review.created_time_stamp #=> Time
480
+ # resp.code_review.last_updated_time_stamp #=> Time
481
+ # resp.code_review.type #=> String, one of "PullRequest", "RepositoryAnalysis"
482
+ # resp.code_review.pull_request_id #=> String
483
+ # resp.code_review.source_code_type.commit_diff.source_commit #=> String
484
+ # resp.code_review.source_code_type.commit_diff.destination_commit #=> String
485
+ # resp.code_review.source_code_type.repository_head.branch_name #=> String
486
+ # resp.code_review.metrics.metered_lines_of_code_count #=> Integer
487
+ # resp.code_review.metrics.findings_count #=> Integer
488
+ #
489
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview AWS API Documentation
490
+ #
491
+ # @overload create_code_review(params = {})
492
+ # @param [Hash] params ({})
493
+ def create_code_review(params = {}, options = {})
494
+ req = build_request(:create_code_review, params)
495
+ req.send_request(options)
496
+ end
497
+
438
498
  # Returns the metadata associated with the code review along with its
439
499
  # status.
440
500
  #
@@ -466,10 +526,11 @@ module Aws::CodeGuruReviewer
466
526
  # resp.code_review.state_reason #=> String
467
527
  # resp.code_review.created_time_stamp #=> Time
468
528
  # resp.code_review.last_updated_time_stamp #=> Time
469
- # resp.code_review.type #=> String, one of "PullRequest"
529
+ # resp.code_review.type #=> String, one of "PullRequest", "RepositoryAnalysis"
470
530
  # resp.code_review.pull_request_id #=> String
471
531
  # resp.code_review.source_code_type.commit_diff.source_commit #=> String
472
532
  # resp.code_review.source_code_type.commit_diff.destination_commit #=> String
533
+ # resp.code_review.source_code_type.repository_head.branch_name #=> String
473
534
  # resp.code_review.metrics.metered_lines_of_code_count #=> Integer
474
535
  # resp.code_review.metrics.findings_count #=> Integer
475
536
  #
@@ -592,7 +653,7 @@ module Aws::CodeGuruReviewer
592
653
  #
593
654
  # @option params [required, String] :association_arn
594
655
  # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1]
595
- # object.
656
+ # object. You can retrieve this ARN by calling `ListRepositories`.
596
657
  #
597
658
  #
598
659
  #
@@ -683,7 +744,7 @@ module Aws::CodeGuruReviewer
683
744
  # provider_types: ["CodeCommit"], # accepts CodeCommit, GitHub, Bitbucket, GitHubEnterpriseServer
684
745
  # states: ["Completed"], # accepts Completed, Pending, Failed, Deleting
685
746
  # repository_names: ["Name"],
686
- # type: "PullRequest", # required, accepts PullRequest
747
+ # type: "PullRequest", # required, accepts PullRequest, RepositoryAnalysis
687
748
  # max_results: 1,
688
749
  # next_token: "NextToken",
689
750
  # })
@@ -699,7 +760,7 @@ module Aws::CodeGuruReviewer
699
760
  # resp.code_review_summaries[0].state #=> String, one of "Completed", "Pending", "Failed", "Deleting"
700
761
  # resp.code_review_summaries[0].created_time_stamp #=> Time
701
762
  # resp.code_review_summaries[0].last_updated_time_stamp #=> Time
702
- # resp.code_review_summaries[0].type #=> String, one of "PullRequest"
763
+ # resp.code_review_summaries[0].type #=> String, one of "PullRequest", "RepositoryAnalysis"
703
764
  # resp.code_review_summaries[0].pull_request_id #=> String
704
765
  # resp.code_review_summaries[0].metrics_summary.metered_lines_of_code_count #=> Integer
705
766
  # resp.code_review_summaries[0].metrics_summary.findings_count #=> Integer
@@ -868,10 +929,11 @@ module Aws::CodeGuruReviewer
868
929
  # * Setting up pull request notifications. This is required for pull
869
930
  # requests to trigger a CodeGuru Reviewer review.
870
931
  #
871
- # <note markdown="1"> If your repository `ProviderType` is `GitHub` or `Bitbucket`,
872
- # CodeGuru Reviewer creates webhooks in your repository to trigger
873
- # CodeGuru Reviewer reviews. If you delete these webhooks, reviews
874
- # of code in your repository cannot be triggered.
932
+ # <note markdown="1"> If your repository `ProviderType` is `GitHub`, `GitHub Enterprise
933
+ # Server`, or `Bitbucket`, CodeGuru Reviewer creates webhooks in
934
+ # your repository to trigger CodeGuru Reviewer reviews. If you
935
+ # delete these webhooks, reviews of code in your repository cannot
936
+ # be triggered.
875
937
  #
876
938
  # </note>
877
939
  #
@@ -889,8 +951,9 @@ module Aws::CodeGuruReviewer
889
951
  # @option params [Array<String>] :owners
890
952
  # List of owners to use as a filter. For AWS CodeCommit, it is the name
891
953
  # of the CodeCommit account that was used to associate the repository.
892
- # For other repository source providers, such as Bitbucket, this is name
893
- # of the account that was used to associate the repository.
954
+ # For other repository source providers, such as Bitbucket and GitHub
955
+ # Enterprise Server, this is name of the account that was used to
956
+ # associate the repository.
894
957
  #
895
958
  # @option params [Integer] :max_results
896
959
  # The maximum number of repository association results returned by
@@ -1006,7 +1069,7 @@ module Aws::CodeGuruReviewer
1006
1069
  params: params,
1007
1070
  config: config)
1008
1071
  context[:gem_name] = 'aws-sdk-codegurureviewer'
1009
- context[:gem_version] = '1.10.0'
1072
+ context[:gem_version] = '1.11.0'
1010
1073
  Seahorse::Client::Request.new(handlers, context)
1011
1074
  end
1012
1075
 
@@ -18,15 +18,20 @@ module Aws::CodeGuruReviewer
18
18
  AssociateRepositoryRequest = Shapes::StructureShape.new(name: 'AssociateRepositoryRequest')
19
19
  AssociateRepositoryResponse = Shapes::StructureShape.new(name: 'AssociateRepositoryResponse')
20
20
  AssociationId = Shapes::StringShape.new(name: 'AssociationId')
21
+ BranchName = Shapes::StringShape.new(name: 'BranchName')
21
22
  ClientRequestToken = Shapes::StringShape.new(name: 'ClientRequestToken')
22
23
  CodeCommitRepository = Shapes::StructureShape.new(name: 'CodeCommitRepository')
23
24
  CodeReview = Shapes::StructureShape.new(name: 'CodeReview')
25
+ CodeReviewName = Shapes::StringShape.new(name: 'CodeReviewName')
24
26
  CodeReviewSummaries = Shapes::ListShape.new(name: 'CodeReviewSummaries')
25
27
  CodeReviewSummary = Shapes::StructureShape.new(name: 'CodeReviewSummary')
28
+ CodeReviewType = Shapes::StructureShape.new(name: 'CodeReviewType')
26
29
  CommitDiffSourceCodeType = Shapes::StructureShape.new(name: 'CommitDiffSourceCodeType')
27
30
  CommitId = Shapes::StringShape.new(name: 'CommitId')
28
31
  ConflictException = Shapes::StructureShape.new(name: 'ConflictException')
29
32
  ConnectionArn = Shapes::StringShape.new(name: 'ConnectionArn')
33
+ CreateCodeReviewRequest = Shapes::StructureShape.new(name: 'CreateCodeReviewRequest')
34
+ CreateCodeReviewResponse = Shapes::StructureShape.new(name: 'CreateCodeReviewResponse')
30
35
  DescribeCodeReviewRequest = Shapes::StructureShape.new(name: 'DescribeCodeReviewRequest')
31
36
  DescribeCodeReviewResponse = Shapes::StructureShape.new(name: 'DescribeCodeReviewResponse')
32
37
  DescribeRecommendationFeedbackRequest = Shapes::StructureShape.new(name: 'DescribeRecommendationFeedbackRequest')
@@ -76,11 +81,13 @@ module Aws::CodeGuruReviewer
76
81
  RecommendationSummaries = Shapes::ListShape.new(name: 'RecommendationSummaries')
77
82
  RecommendationSummary = Shapes::StructureShape.new(name: 'RecommendationSummary')
78
83
  Repository = Shapes::StructureShape.new(name: 'Repository')
84
+ RepositoryAnalysis = Shapes::StructureShape.new(name: 'RepositoryAnalysis')
79
85
  RepositoryAssociation = Shapes::StructureShape.new(name: 'RepositoryAssociation')
80
86
  RepositoryAssociationState = Shapes::StringShape.new(name: 'RepositoryAssociationState')
81
87
  RepositoryAssociationStates = Shapes::ListShape.new(name: 'RepositoryAssociationStates')
82
88
  RepositoryAssociationSummaries = Shapes::ListShape.new(name: 'RepositoryAssociationSummaries')
83
89
  RepositoryAssociationSummary = Shapes::StructureShape.new(name: 'RepositoryAssociationSummary')
90
+ RepositoryHeadSourceCodeType = Shapes::StructureShape.new(name: 'RepositoryHeadSourceCodeType')
84
91
  RepositoryNames = Shapes::ListShape.new(name: 'RepositoryNames')
85
92
  ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
86
93
  SourceCodeType = Shapes::StructureShape.new(name: 'SourceCodeType')
@@ -137,6 +144,9 @@ module Aws::CodeGuruReviewer
137
144
  CodeReviewSummary.add_member(:metrics_summary, Shapes::ShapeRef.new(shape: MetricsSummary, location_name: "MetricsSummary"))
138
145
  CodeReviewSummary.struct_class = Types::CodeReviewSummary
139
146
 
147
+ CodeReviewType.add_member(:repository_analysis, Shapes::ShapeRef.new(shape: RepositoryAnalysis, required: true, location_name: "RepositoryAnalysis"))
148
+ CodeReviewType.struct_class = Types::CodeReviewType
149
+
140
150
  CommitDiffSourceCodeType.add_member(:source_commit, Shapes::ShapeRef.new(shape: CommitId, location_name: "SourceCommit"))
141
151
  CommitDiffSourceCodeType.add_member(:destination_commit, Shapes::ShapeRef.new(shape: CommitId, location_name: "DestinationCommit"))
142
152
  CommitDiffSourceCodeType.struct_class = Types::CommitDiffSourceCodeType
@@ -144,6 +154,15 @@ module Aws::CodeGuruReviewer
144
154
  ConflictException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
145
155
  ConflictException.struct_class = Types::ConflictException
146
156
 
157
+ CreateCodeReviewRequest.add_member(:name, Shapes::ShapeRef.new(shape: CodeReviewName, required: true, location_name: "Name"))
158
+ CreateCodeReviewRequest.add_member(:repository_association_arn, Shapes::ShapeRef.new(shape: Arn, required: true, location_name: "RepositoryAssociationArn"))
159
+ CreateCodeReviewRequest.add_member(:type, Shapes::ShapeRef.new(shape: CodeReviewType, required: true, location_name: "Type"))
160
+ CreateCodeReviewRequest.add_member(:client_request_token, Shapes::ShapeRef.new(shape: ClientRequestToken, location_name: "ClientRequestToken", metadata: {"idempotencyToken"=>true}))
161
+ CreateCodeReviewRequest.struct_class = Types::CreateCodeReviewRequest
162
+
163
+ CreateCodeReviewResponse.add_member(:code_review, Shapes::ShapeRef.new(shape: CodeReview, location_name: "CodeReview"))
164
+ CreateCodeReviewResponse.struct_class = Types::CreateCodeReviewResponse
165
+
147
166
  DescribeCodeReviewRequest.add_member(:code_review_arn, Shapes::ShapeRef.new(shape: Arn, required: true, location: "uri", location_name: "CodeReviewArn"))
148
167
  DescribeCodeReviewRequest.struct_class = Types::DescribeCodeReviewRequest
149
168
 
@@ -276,6 +295,9 @@ module Aws::CodeGuruReviewer
276
295
  Repository.add_member(:git_hub_enterprise_server, Shapes::ShapeRef.new(shape: ThirdPartySourceRepository, location_name: "GitHubEnterpriseServer"))
277
296
  Repository.struct_class = Types::Repository
278
297
 
298
+ RepositoryAnalysis.add_member(:repository_head, Shapes::ShapeRef.new(shape: RepositoryHeadSourceCodeType, required: true, location_name: "RepositoryHead"))
299
+ RepositoryAnalysis.struct_class = Types::RepositoryAnalysis
300
+
279
301
  RepositoryAssociation.add_member(:association_id, Shapes::ShapeRef.new(shape: AssociationId, location_name: "AssociationId"))
280
302
  RepositoryAssociation.add_member(:association_arn, Shapes::ShapeRef.new(shape: Arn, location_name: "AssociationArn"))
281
303
  RepositoryAssociation.add_member(:connection_arn, Shapes::ShapeRef.new(shape: ConnectionArn, location_name: "ConnectionArn"))
@@ -302,12 +324,16 @@ module Aws::CodeGuruReviewer
302
324
  RepositoryAssociationSummary.add_member(:state, Shapes::ShapeRef.new(shape: RepositoryAssociationState, location_name: "State"))
303
325
  RepositoryAssociationSummary.struct_class = Types::RepositoryAssociationSummary
304
326
 
327
+ RepositoryHeadSourceCodeType.add_member(:branch_name, Shapes::ShapeRef.new(shape: BranchName, required: true, location_name: "BranchName"))
328
+ RepositoryHeadSourceCodeType.struct_class = Types::RepositoryHeadSourceCodeType
329
+
305
330
  RepositoryNames.member = Shapes::ShapeRef.new(shape: Name)
306
331
 
307
332
  ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: ErrorMessage, location_name: "Message"))
308
333
  ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
309
334
 
310
335
  SourceCodeType.add_member(:commit_diff, Shapes::ShapeRef.new(shape: CommitDiffSourceCodeType, location_name: "CommitDiff"))
336
+ SourceCodeType.add_member(:repository_head, Shapes::ShapeRef.new(shape: RepositoryHeadSourceCodeType, location_name: "RepositoryHead"))
311
337
  SourceCodeType.struct_class = Types::SourceCodeType
312
338
 
313
339
  ThirdPartySourceRepository.add_member(:name, Shapes::ShapeRef.new(shape: Name, required: true, location_name: "Name"))
@@ -355,6 +381,20 @@ module Aws::CodeGuruReviewer
355
381
  o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
356
382
  end)
357
383
 
384
+ api.add_operation(:create_code_review, Seahorse::Model::Operation.new.tap do |o|
385
+ o.name = "CreateCodeReview"
386
+ o.http_method = "POST"
387
+ o.http_request_uri = "/codereviews"
388
+ o.input = Shapes::ShapeRef.new(shape: CreateCodeReviewRequest)
389
+ o.output = Shapes::ShapeRef.new(shape: CreateCodeReviewResponse)
390
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
391
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
392
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
393
+ o.errors << Shapes::ShapeRef.new(shape: ConflictException)
394
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
395
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
396
+ end)
397
+
358
398
  api.add_operation(:describe_code_review, Seahorse::Model::Operation.new.tap do |o|
359
399
  o.name = "DescribeCodeReview"
360
400
  o.http_method = "GET"
@@ -50,27 +50,6 @@ module Aws::CodeGuruReviewer
50
50
  # @return [Types::Repository]
51
51
  #
52
52
  # @!attribute [rw] client_request_token
53
- # Unique, case-sensitive identifier that you provide to ensure the
54
- # idempotency of the request.
55
- #
56
- # To add a new repository association, this parameter specifies a
57
- # unique identifier for the new repository association that helps
58
- # ensure idempotency.
59
- #
60
- # If you use the AWS CLI or one of the AWS SDKs to call this
61
- # operation, you can leave this parameter empty. The CLI or SDK
62
- # generates a random UUID for you and includes that in the request. If
63
- # you don't use the SDK and instead generate a raw HTTP request to
64
- # the Secrets Manager service endpoint, you must generate a
65
- # ClientRequestToken yourself for new versions and include that value
66
- # in the request.
67
- #
68
- # You typically interact with this value if you implement your own
69
- # retry logic and want to ensure that a given repository association
70
- # is not created twice. We recommend that you generate a UUID-type
71
- # value to ensure uniqueness within the specified repository
72
- # association.
73
- #
74
53
  # Amazon CodeGuru Reviewer uses this value to prevent the accidental
75
54
  # creation of duplicate repository associations if there are failures
76
55
  # and retries.
@@ -149,8 +128,8 @@ module Aws::CodeGuruReviewer
149
128
  # @!attribute [rw] owner
150
129
  # The owner of the repository. For an AWS CodeCommit repository, this
151
130
  # is the AWS account ID of the account that owns the repository. For a
152
- # GitHub or Bitbucket repository, this is the username for the account
153
- # that owns the repository.
131
+ # GitHub, GitHub Enterprise Server, or Bitbucket repository, this is
132
+ # the username for the account that owns the repository.
154
133
  # @return [String]
155
134
  #
156
135
  # @!attribute [rw] provider_type
@@ -242,8 +221,8 @@ module Aws::CodeGuruReviewer
242
221
  # @!attribute [rw] owner
243
222
  # The owner of the repository. For an AWS CodeCommit repository, this
244
223
  # is the AWS account ID of the account that owns the repository. For a
245
- # GitHub or Bitbucket repository, this is the username for the account
246
- # that owns the repository.
224
+ # GitHub, GitHub Enterprise Server, or Bitbucket repository, this is
225
+ # the username for the account that owns the repository.
247
226
  # @return [String]
248
227
  #
249
228
  # @!attribute [rw] provider_type
@@ -305,14 +284,63 @@ module Aws::CodeGuruReviewer
305
284
  include Aws::Structure
306
285
  end
307
286
 
308
- # The commit diff for the pull request.
287
+ # The type of a code review. There are two code review types:
288
+ #
289
+ # * `PullRequest` - A code review that is automatically triggered by a
290
+ # pull request on an assocaited repository. Because this type of code
291
+ # review is automatically generated, you cannot specify this code
292
+ # review type using [ `CreateCodeReview` ][1].
293
+ #
294
+ # * `RepositoryAnalysis` - A code review that analyzes all code under a
295
+ # specified branch in an associated respository. The assocated
296
+ # repository is specified using its ARN in [ `CreateCodeReview` ][1].
297
+ #
298
+ #
299
+ #
300
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview
301
+ #
302
+ # @note When making an API call, you may pass CodeReviewType
303
+ # data as a hash:
304
+ #
305
+ # {
306
+ # repository_analysis: { # required
307
+ # repository_head: { # required
308
+ # branch_name: "BranchName", # required
309
+ # },
310
+ # },
311
+ # }
312
+ #
313
+ # @!attribute [rw] repository_analysis
314
+ # A code review that analyzes all code under a specified branch in an
315
+ # associated respository. The assocated repository is specified using
316
+ # its ARN in [ `CreateCodeReview` ][1]
317
+ #
318
+ #
319
+ #
320
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview
321
+ # @return [Types::RepositoryAnalysis]
322
+ #
323
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CodeReviewType AWS API Documentation
324
+ #
325
+ class CodeReviewType < Struct.new(
326
+ :repository_analysis)
327
+ SENSITIVE = []
328
+ include Aws::Structure
329
+ end
330
+
331
+ # A type of [ `SourceCodeType` ][1] that specifies the commit diff for a
332
+ # pull request on an associated repository.
333
+ #
334
+ #
335
+ #
336
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType
309
337
  #
310
338
  # @!attribute [rw] source_commit
311
- # The SHA of the source commit.
339
+ # The SHA of the source commit used to generate a commit diff.
312
340
  # @return [String]
313
341
  #
314
342
  # @!attribute [rw] destination_commit
315
- # The SHA of the destination commit.
343
+ # The SHA of the destination commit used to generate a commit diff.
316
344
  # @return [String]
317
345
  #
318
346
  # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CommitDiffSourceCodeType AWS API Documentation
@@ -339,6 +367,80 @@ module Aws::CodeGuruReviewer
339
367
  include Aws::Structure
340
368
  end
341
369
 
370
+ # @note When making an API call, you may pass CreateCodeReviewRequest
371
+ # data as a hash:
372
+ #
373
+ # {
374
+ # name: "CodeReviewName", # required
375
+ # repository_association_arn: "Arn", # required
376
+ # type: { # required
377
+ # repository_analysis: { # required
378
+ # repository_head: { # required
379
+ # branch_name: "BranchName", # required
380
+ # },
381
+ # },
382
+ # },
383
+ # client_request_token: "ClientRequestToken",
384
+ # }
385
+ #
386
+ # @!attribute [rw] name
387
+ # The name of the code review. Each code review of the same code
388
+ # review type must have a unique name in your AWS account.
389
+ # @return [String]
390
+ #
391
+ # @!attribute [rw] repository_association_arn
392
+ # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1]
393
+ # object. You can retrieve this ARN by calling `ListRepositories`.
394
+ #
395
+ # A code review can only be created on an associated repository. This
396
+ # is the ARN of the associated repository.
397
+ #
398
+ #
399
+ #
400
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html
401
+ # @return [String]
402
+ #
403
+ # @!attribute [rw] type
404
+ # The type of code review to create. This is specified using a [
405
+ # `CodeReviewType` ][1] object.
406
+ #
407
+ #
408
+ #
409
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html
410
+ # @return [Types::CodeReviewType]
411
+ #
412
+ # @!attribute [rw] client_request_token
413
+ # Amazon CodeGuru Reviewer uses this value to prevent the accidental
414
+ # creation of duplicate code reviews if there are failures and
415
+ # retries.
416
+ #
417
+ # **A suitable default value is auto-generated.** You should normally
418
+ # not need to pass this option.
419
+ # @return [String]
420
+ #
421
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReviewRequest AWS API Documentation
422
+ #
423
+ class CreateCodeReviewRequest < Struct.new(
424
+ :name,
425
+ :repository_association_arn,
426
+ :type,
427
+ :client_request_token)
428
+ SENSITIVE = []
429
+ include Aws::Structure
430
+ end
431
+
432
+ # @!attribute [rw] code_review
433
+ # Information about a code review.
434
+ # @return [Types::CodeReview]
435
+ #
436
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReviewResponse AWS API Documentation
437
+ #
438
+ class CreateCodeReviewResponse < Struct.new(
439
+ :code_review)
440
+ SENSITIVE = []
441
+ include Aws::Structure
442
+ end
443
+
342
444
  # @note When making an API call, you may pass DescribeCodeReviewRequest
343
445
  # data as a hash:
344
446
  #
@@ -477,7 +579,7 @@ module Aws::CodeGuruReviewer
477
579
  #
478
580
  # @!attribute [rw] association_arn
479
581
  # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1]
480
- # object.
582
+ # object. You can retrieve this ARN by calling `ListRepositories`.
481
583
  #
482
584
  #
483
585
  #
@@ -525,7 +627,7 @@ module Aws::CodeGuruReviewer
525
627
  # provider_types: ["CodeCommit"], # accepts CodeCommit, GitHub, Bitbucket, GitHubEnterpriseServer
526
628
  # states: ["Completed"], # accepts Completed, Pending, Failed, Deleting
527
629
  # repository_names: ["Name"],
528
- # type: "PullRequest", # required, accepts PullRequest
630
+ # type: "PullRequest", # required, accepts PullRequest, RepositoryAnalysis
529
631
  # max_results: 1,
530
632
  # next_token: "NextToken",
531
633
  # }
@@ -769,10 +871,11 @@ module Aws::CodeGuruReviewer
769
871
  # * Setting up pull request notifications. This is required for pull
770
872
  # requests to trigger a CodeGuru Reviewer review.
771
873
  #
772
- # <note markdown="1"> If your repository `ProviderType` is `GitHub` or `Bitbucket`,
773
- # CodeGuru Reviewer creates webhooks in your repository to trigger
774
- # CodeGuru Reviewer reviews. If you delete these webhooks, reviews
775
- # of code in your repository cannot be triggered.
874
+ # <note markdown="1"> If your repository `ProviderType` is `GitHub`, `GitHub
875
+ # Enterprise Server`, or `Bitbucket`, CodeGuru Reviewer creates
876
+ # webhooks in your repository to trigger CodeGuru Reviewer
877
+ # reviews. If you delete these webhooks, reviews of code in your
878
+ # repository cannot be triggered.
776
879
  #
777
880
  # </note>
778
881
  #
@@ -792,9 +895,9 @@ module Aws::CodeGuruReviewer
792
895
  # @!attribute [rw] owners
793
896
  # List of owners to use as a filter. For AWS CodeCommit, it is the
794
897
  # name of the CodeCommit account that was used to associate the
795
- # repository. For other repository source providers, such as
796
- # Bitbucket, this is name of the account that was used to associate
797
- # the repository.
898
+ # repository. For other repository source providers, such as Bitbucket
899
+ # and GitHub Enterprise Server, this is name of the account that was
900
+ # used to associate the repository.
798
901
  # @return [Array<String>]
799
902
  #
800
903
  # @!attribute [rw] max_results
@@ -1146,6 +1249,40 @@ module Aws::CodeGuruReviewer
1146
1249
  include Aws::Structure
1147
1250
  end
1148
1251
 
1252
+ # A code review type that analyzes all code under a specified branch in
1253
+ # an associated respository. The assocated repository is specified using
1254
+ # its ARN when you call [ `CreateCodeReview` ][1].
1255
+ #
1256
+ #
1257
+ #
1258
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview
1259
+ #
1260
+ # @note When making an API call, you may pass RepositoryAnalysis
1261
+ # data as a hash:
1262
+ #
1263
+ # {
1264
+ # repository_head: { # required
1265
+ # branch_name: "BranchName", # required
1266
+ # },
1267
+ # }
1268
+ #
1269
+ # @!attribute [rw] repository_head
1270
+ # A [ `SourceCodeType` ][1] that specifies the tip of a branch in an
1271
+ # associated repository.
1272
+ #
1273
+ #
1274
+ #
1275
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType
1276
+ # @return [Types::RepositoryHeadSourceCodeType]
1277
+ #
1278
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/RepositoryAnalysis AWS API Documentation
1279
+ #
1280
+ class RepositoryAnalysis < Struct.new(
1281
+ :repository_head)
1282
+ SENSITIVE = []
1283
+ include Aws::Structure
1284
+ end
1285
+
1149
1286
  # Information about a repository association. The [
1150
1287
  # `DescribeRepositoryAssociation` ][1] operation returns a
1151
1288
  # `RepositoryAssociation` object.
@@ -1167,7 +1304,7 @@ module Aws::CodeGuruReviewer
1167
1304
  # The Amazon Resource Name (ARN) of an AWS CodeStar Connections
1168
1305
  # connection. Its format is
1169
1306
  # `arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id`.
1170
- # For more information, see [Connection][1] in the *AWS CodeStar
1307
+ # For more information, see [ `Connection` ][1] in the *AWS CodeStar
1171
1308
  # Connections API Reference*.
1172
1309
  #
1173
1310
  #
@@ -1182,8 +1319,8 @@ module Aws::CodeGuruReviewer
1182
1319
  # @!attribute [rw] owner
1183
1320
  # The owner of the repository. For an AWS CodeCommit repository, this
1184
1321
  # is the AWS account ID of the account that owns the repository. For a
1185
- # GitHub or Bitbucket repository, this is the username for the account
1186
- # that owns the repository.
1322
+ # GitHub, GitHub Enterprise Server, or Bitbucket repository, this is
1323
+ # the username for the account that owns the repository.
1187
1324
  # @return [String]
1188
1325
  #
1189
1326
  # @!attribute [rw] provider_type
@@ -1202,10 +1339,11 @@ module Aws::CodeGuruReviewer
1202
1339
  # * Setting up pull request notifications. This is required for pull
1203
1340
  # requests to trigger a CodeGuru Reviewer review.
1204
1341
  #
1205
- # <note markdown="1"> If your repository `ProviderType` is `GitHub` or `Bitbucket`,
1206
- # CodeGuru Reviewer creates webhooks in your repository to trigger
1207
- # CodeGuru Reviewer reviews. If you delete these webhooks, reviews
1208
- # of code in your repository cannot be triggered.
1342
+ # <note markdown="1"> If your repository `ProviderType` is `GitHub`, `GitHub
1343
+ # Enterprise Server`, or `Bitbucket`, CodeGuru Reviewer creates
1344
+ # webhooks in your repository to trigger CodeGuru Reviewer
1345
+ # reviews. If you delete these webhooks, reviews of code in your
1346
+ # repository cannot be triggered.
1209
1347
  #
1210
1348
  # </note>
1211
1349
  #
@@ -1260,7 +1398,7 @@ module Aws::CodeGuruReviewer
1260
1398
  #
1261
1399
  # @!attribute [rw] association_arn
1262
1400
  # The Amazon Resource Name (ARN) of the [ `RepositoryAssociation` ][1]
1263
- # object.
1401
+ # object. You can retrieve this ARN by calling `ListRepositories`.
1264
1402
  #
1265
1403
  #
1266
1404
  #
@@ -1271,7 +1409,7 @@ module Aws::CodeGuruReviewer
1271
1409
  # The Amazon Resource Name (ARN) of an AWS CodeStar Connections
1272
1410
  # connection. Its format is
1273
1411
  # `arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id`.
1274
- # For more information, see [Connection][1] in the *AWS CodeStar
1412
+ # For more information, see [ `Connection` ][1] in the *AWS CodeStar
1275
1413
  # Connections API Reference*.
1276
1414
  #
1277
1415
  #
@@ -1295,8 +1433,8 @@ module Aws::CodeGuruReviewer
1295
1433
  # @!attribute [rw] owner
1296
1434
  # The owner of the repository. For an AWS CodeCommit repository, this
1297
1435
  # is the AWS account ID of the account that owns the repository. For a
1298
- # GitHub or Bitbucket repository, this is the username for the account
1299
- # that owns the repository.
1436
+ # GitHub, GitHub Enterprise Server, or Bitbucket repository, this is
1437
+ # the username for the account that owns the repository.
1300
1438
  # @return [String]
1301
1439
  #
1302
1440
  # @!attribute [rw] provider_type
@@ -1315,10 +1453,11 @@ module Aws::CodeGuruReviewer
1315
1453
  # * Setting up pull request notifications. This is required for pull
1316
1454
  # requests to trigger a CodeGuru Reviewer review.
1317
1455
  #
1318
- # <note markdown="1"> If your repository `ProviderType` is `GitHub` or `Bitbucket`,
1319
- # CodeGuru Reviewer creates webhooks in your repository to trigger
1320
- # CodeGuru Reviewer reviews. If you delete these webhooks, reviews
1321
- # of code in your repository cannot be triggered.
1456
+ # <note markdown="1"> If your repository `ProviderType` is `GitHub`, `GitHub
1457
+ # Enterprise Server`, or `Bitbucket`, CodeGuru Reviewer creates
1458
+ # webhooks in your repository to trigger CodeGuru Reviewer
1459
+ # reviews. If you delete these webhooks, reviews of code in your
1460
+ # repository cannot be triggered.
1322
1461
  #
1323
1462
  # </note>
1324
1463
  #
@@ -1346,6 +1485,33 @@ module Aws::CodeGuruReviewer
1346
1485
  include Aws::Structure
1347
1486
  end
1348
1487
 
1488
+ # A [ `SourceCodeType` ][1] that specifies the tip of a branch in an
1489
+ # associated repository.
1490
+ #
1491
+ #
1492
+ #
1493
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType
1494
+ #
1495
+ # @note When making an API call, you may pass RepositoryHeadSourceCodeType
1496
+ # data as a hash:
1497
+ #
1498
+ # {
1499
+ # branch_name: "BranchName", # required
1500
+ # }
1501
+ #
1502
+ # @!attribute [rw] branch_name
1503
+ # The name of the branch in an associated repository. The
1504
+ # `RepositoryHeadSourceCodeType` specifies the tip of this branch.
1505
+ # @return [String]
1506
+ #
1507
+ # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/RepositoryHeadSourceCodeType AWS API Documentation
1508
+ #
1509
+ class RepositoryHeadSourceCodeType < Struct.new(
1510
+ :branch_name)
1511
+ SENSITIVE = []
1512
+ include Aws::Structure
1513
+ end
1514
+
1349
1515
  # The resource specified in the request was not found.
1350
1516
  #
1351
1517
  # @!attribute [rw] message
@@ -1359,16 +1525,33 @@ module Aws::CodeGuruReviewer
1359
1525
  include Aws::Structure
1360
1526
  end
1361
1527
 
1362
- # Information about the source code type.
1528
+ # Specifies the source code that is analyzed in a code review. A code
1529
+ # review can analyze the source code that is specified using a pull
1530
+ # request diff or a branch in an associated repository.
1363
1531
  #
1364
1532
  # @!attribute [rw] commit_diff
1365
- # The commit diff for the pull request.
1533
+ # A [ `SourceCodeType` ][1] that specifies a commit diff created by a
1534
+ # pull request on an associated repository.
1535
+ #
1536
+ #
1537
+ #
1538
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType
1366
1539
  # @return [Types::CommitDiffSourceCodeType]
1367
1540
  #
1541
+ # @!attribute [rw] repository_head
1542
+ # A [ `SourceCodeType` ][1] that specifies the tip of a branch in an
1543
+ # associated repository.
1544
+ #
1545
+ #
1546
+ #
1547
+ # [1]: https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType
1548
+ # @return [Types::RepositoryHeadSourceCodeType]
1549
+ #
1368
1550
  # @see http://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/SourceCodeType AWS API Documentation
1369
1551
  #
1370
1552
  class SourceCodeType < Struct.new(
1371
- :commit_diff)
1553
+ :commit_diff,
1554
+ :repository_head)
1372
1555
  SENSITIVE = []
1373
1556
  include Aws::Structure
1374
1557
  end
@@ -1393,7 +1576,7 @@ module Aws::CodeGuruReviewer
1393
1576
  # The Amazon Resource Name (ARN) of an AWS CodeStar Connections
1394
1577
  # connection. Its format is
1395
1578
  # `arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id`.
1396
- # For more information, see [Connection][1] in the *AWS CodeStar
1579
+ # For more information, see [ `Connection` ][1] in the *AWS CodeStar
1397
1580
  # Connections API Reference*.
1398
1581
  #
1399
1582
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aws-sdk-codegurureviewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.0
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amazon Web Services
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-25 00:00:00.000000000 Z
11
+ date: 2020-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core