From d74b040ceb12d170bd1d5d62cc800efbc78ff129 Mon Sep 17 00:00:00 2001 From: awssdkgo Date: Tue, 1 Sep 2020 18:16:43 +0000 Subject: [PATCH] Release v1.34.15 (2020-09-01) === ### Service Client Updates * `service/codeguru-reviewer`: Updates service API and documentation * `service/securityhub`: Updates service API and documentation --- CHANGELOG.md | 7 + aws/version.go | 2 +- .../codeguru-reviewer/2019-09-19/api-2.json | 80 ++- .../codeguru-reviewer/2019-09-19/docs-2.json | 87 +++- models/apis/securityhub/2018-10-26/api-2.json | 20 +- .../apis/securityhub/2018-10-26/docs-2.json | 17 + service/codegurureviewer/api.go | 469 ++++++++++++++++-- .../codegururevieweriface/interface.go | 4 + service/securityhub/api.go | 158 ++++++ 9 files changed, 769 insertions(+), 75 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e3cfe5bc4db..ef28f93d0bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Release v1.34.15 (2020-09-01) +=== + +### Service Client Updates +* `service/codeguru-reviewer`: Updates service API and documentation +* `service/securityhub`: Updates service API and documentation + Release v1.34.14 (2020-08-31) === diff --git a/aws/version.go b/aws/version.go index 1d19f8ad33b..7429d97b76f 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.34.14" +const SDKVersion = "1.34.15" diff --git a/models/apis/codeguru-reviewer/2019-09-19/api-2.json b/models/apis/codeguru-reviewer/2019-09-19/api-2.json index 71ac90b44e8..1e86fd38062 100644 --- a/models/apis/codeguru-reviewer/2019-09-19/api-2.json +++ b/models/apis/codeguru-reviewer/2019-09-19/api-2.json @@ -29,6 +29,23 @@ {"shape":"ThrottlingException"} ] }, + "CreateCodeReview":{ + "name":"CreateCodeReview", + "http":{ + "method":"POST", + "requestUri":"/codereviews" + }, + "input":{"shape":"CreateCodeReviewRequest"}, + "output":{"shape":"CreateCodeReviewResponse"}, + "errors":[ + {"shape":"ResourceNotFoundException"}, + {"shape":"InternalServerException"}, + {"shape":"ValidationException"}, + {"shape":"ConflictException"}, + {"shape":"AccessDeniedException"}, + {"shape":"ThrottlingException"} + ] + }, "DescribeCodeReview":{ "name":"DescribeCodeReview", "http":{ @@ -209,6 +226,11 @@ "max":64, "min":1 }, + "BranchName":{ + "type":"string", + "max":256, + "min":1 + }, "ClientRequestToken":{ "type":"string", "max":64, @@ -240,6 +262,12 @@ "Metrics":{"shape":"Metrics"} } }, + "CodeReviewName":{ + "type":"string", + "max":100, + "min":1, + "pattern":"[a-zA-Z0-9-_]*" + }, "CodeReviewSummaries":{ "type":"list", "member":{"shape":"CodeReviewSummary"} @@ -260,6 +288,13 @@ "MetricsSummary":{"shape":"MetricsSummary"} } }, + "CodeReviewType":{ + "type":"structure", + "required":["RepositoryAnalysis"], + "members":{ + "RepositoryAnalysis":{"shape":"RepositoryAnalysis"} + } + }, "CommitDiffSourceCodeType":{ "type":"structure", "members":{ @@ -286,6 +321,29 @@ "min":0, "pattern":"arn:aws(-[\\w]+)*:.+:.+:[0-9]{12}:.+" }, + "CreateCodeReviewRequest":{ + "type":"structure", + "required":[ + "Name", + "RepositoryAssociationArn", + "Type" + ], + "members":{ + "Name":{"shape":"CodeReviewName"}, + "RepositoryAssociationArn":{"shape":"Arn"}, + "Type":{"shape":"CodeReviewType"}, + "ClientRequestToken":{ + "shape":"ClientRequestToken", + "idempotencyToken":true + } + } + }, + "CreateCodeReviewResponse":{ + "type":"structure", + "members":{ + "CodeReview":{"shape":"CodeReview"} + } + }, "DescribeCodeReviewRequest":{ "type":"structure", "required":["CodeReviewArn"], @@ -719,6 +777,13 @@ "GitHubEnterpriseServer":{"shape":"ThirdPartySourceRepository"} } }, + "RepositoryAnalysis":{ + "type":"structure", + "required":["RepositoryHead"], + "members":{ + "RepositoryHead":{"shape":"RepositoryHeadSourceCodeType"} + } + }, "RepositoryAssociation":{ "type":"structure", "members":{ @@ -766,6 +831,13 @@ "State":{"shape":"RepositoryAssociationState"} } }, + "RepositoryHeadSourceCodeType":{ + "type":"structure", + "required":["BranchName"], + "members":{ + "BranchName":{"shape":"BranchName"} + } + }, "RepositoryNames":{ "type":"list", "member":{"shape":"Name"}, @@ -783,7 +855,8 @@ "SourceCodeType":{ "type":"structure", "members":{ - "CommitDiff":{"shape":"CommitDiffSourceCodeType"} + "CommitDiff":{"shape":"CommitDiffSourceCodeType"}, + "RepositoryHead":{"shape":"RepositoryHeadSourceCodeType"} } }, "StateReason":{ @@ -820,7 +893,10 @@ "TimeStamp":{"type":"timestamp"}, "Type":{ "type":"string", - "enum":["PullRequest"] + "enum":[ + "PullRequest", + "RepositoryAnalysis" + ] }, "UserId":{ "type":"string", diff --git a/models/apis/codeguru-reviewer/2019-09-19/docs-2.json b/models/apis/codeguru-reviewer/2019-09-19/docs-2.json index 3ace3c1c3c6..6997baca768 100644 --- a/models/apis/codeguru-reviewer/2019-09-19/docs-2.json +++ b/models/apis/codeguru-reviewer/2019-09-19/docs-2.json @@ -2,7 +2,8 @@ "version": "2.0", "service": "

This section provides documentation for the Amazon CodeGuru Reviewer API operations. CodeGuru Reviewer is a service that uses program analysis and machine learning to detect potential defects that are difficult for developers to find and recommends fixes in your Java code.

By proactively detecting and providing recommendations for addressing code defects and implementing best practices, CodeGuru Reviewer improves the overall quality and maintainability of your code base during the code review stage. For more information about CodeGuru Reviewer, see the Amazon CodeGuru Reviewer User Guide.

", "operations": { - "AssociateRepository": "

Use to associate an AWS CodeCommit repository or a repostory managed by AWS CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide.

If you associate a CodeCommit repository, it must be in the same AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.

Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Connect to a repository source provider in the Amazon CodeGuru Reviewer User Guide.

You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.

", + "AssociateRepository": "

Use to associate an AWS CodeCommit repository or a repostory managed by AWS CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a repository, CodeGuru Reviewer reviews source code changes in the repository's pull requests and provides automatic recommendations. You can view recommendations using the CodeGuru Reviewer console. For more information, see Recommendations in Amazon CodeGuru Reviewer in the Amazon CodeGuru Reviewer User Guide.

If you associate a CodeCommit repository, it must be in the same AWS Region and AWS account where its CodeGuru Reviewer code reviews are configured.

Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar Connections to connect to CodeGuru Reviewer. For more information, see Connect to a repository source provider in the Amazon CodeGuru Reviewer User Guide.

You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a GitHub repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, use the console. For more information, see Getting started with CodeGuru Reviewer in the CodeGuru Reviewer User Guide.

", + "CreateCodeReview": "

Use to create a code review for a repository analysis.

", "DescribeCodeReview": "

Returns the metadata associated with the code review along with its status.

", "DescribeRecommendationFeedback": "

Describes the customer feedback for a CodeGuru Reviewer recommendation.

", "DescribeRepositoryAssociation": "

Returns a RepositoryAssociation object that contains information about the requested repository association.

", @@ -24,16 +25,17 @@ "refs": { "CodeReview$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", "CodeReviewSummary$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", + "CreateCodeReviewRequest$RepositoryAssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositories.

A code review can only be created on an associated repository. This is the ARN of the associated repository.

", "DescribeCodeReviewRequest$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", "DescribeRecommendationFeedbackRequest$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", - "DescribeRepositoryAssociationRequest$AssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositories.

", - "DisassociateRepositoryRequest$AssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object.

", + "DescribeRepositoryAssociationRequest$AssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositories.

", + "DisassociateRepositoryRequest$AssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositories.

", "ListRecommendationFeedbackRequest$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", "ListRecommendationsRequest$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", "PutRecommendationFeedbackRequest$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", "RecommendationFeedback$CodeReviewArn": "

The Amazon Resource Name (ARN) of the CodeReview object.

", "RepositoryAssociation$AssociationArn": "

The Amazon Resource Name (ARN) identifying the repository association.

", - "RepositoryAssociationSummary$AssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object.

" + "RepositoryAssociationSummary$AssociationArn": "

The Amazon Resource Name (ARN) of the RepositoryAssociation object. You can retrieve this ARN by calling ListRepositories.

" } }, "AssociateRepositoryRequest": { @@ -53,10 +55,17 @@ "RepositoryAssociationSummary$AssociationId": "

The repository association ID.

" } }, + "BranchName": { + "base": null, + "refs": { + "RepositoryHeadSourceCodeType$BranchName": "

The name of the branch in an associated repository. The RepositoryHeadSourceCodeType specifies the tip of this branch.

" + } + }, "ClientRequestToken": { "base": null, "refs": { - "AssociateRepositoryRequest$ClientRequestToken": "

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request.

To add a new repository association, this parameter specifies a unique identifier for the new repository association that helps ensure idempotency.

If you use the AWS CLI or one of the AWS SDKs to call this operation, you can leave this parameter empty. The CLI or SDK generates a random UUID for you and includes that in the request. If you don't use the SDK and instead generate a raw HTTP request to the Secrets Manager service endpoint, you must generate a ClientRequestToken yourself for new versions and include that value in the request.

You typically interact with this value if you implement your own retry logic and want to ensure that a given repository association is not created twice. We recommend that you generate a UUID-type value to ensure uniqueness within the specified repository association.

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries.

" + "AssociateRepositoryRequest$ClientRequestToken": "

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate repository associations if there are failures and retries.

", + "CreateCodeReviewRequest$ClientRequestToken": "

Amazon CodeGuru Reviewer uses this value to prevent the accidental creation of duplicate code reviews if there are failures and retries.

" } }, "CodeCommitRepository": { @@ -68,9 +77,16 @@ "CodeReview": { "base": "

Information about a code review.

", "refs": { + "CreateCodeReviewResponse$CodeReview": null, "DescribeCodeReviewResponse$CodeReview": "

Information about the code review.

" } }, + "CodeReviewName": { + "base": null, + "refs": { + "CreateCodeReviewRequest$Name": "

The name of the code review. Each code review of the same code review type must have a unique name in your AWS account.

" + } + }, "CodeReviewSummaries": { "base": null, "refs": { @@ -83,17 +99,23 @@ "CodeReviewSummaries$member": null } }, + "CodeReviewType": { + "base": "

The type of a code review. There are two code review types:

", + "refs": { + "CreateCodeReviewRequest$Type": "

The type of code review to create. This is specified using a CodeReviewType object.

" + } + }, "CommitDiffSourceCodeType": { - "base": "

The commit diff for the pull request.

", + "base": "

A type of SourceCodeType that specifies the commit diff for a pull request on an associated repository.

", "refs": { - "SourceCodeType$CommitDiff": "

The commit diff for the pull request.

" + "SourceCodeType$CommitDiff": "

A SourceCodeType that specifies a commit diff created by a pull request on an associated repository.

" } }, "CommitId": { "base": null, "refs": { - "CommitDiffSourceCodeType$SourceCommit": "

The SHA of the source commit.

", - "CommitDiffSourceCodeType$DestinationCommit": "

The SHA of the destination commit.

" + "CommitDiffSourceCodeType$SourceCommit": "

The SHA of the source commit used to generate a commit diff.

", + "CommitDiffSourceCodeType$DestinationCommit": "

The SHA of the destination commit used to generate a commit diff.

" } }, "ConflictException": { @@ -104,9 +126,19 @@ "ConnectionArn": { "base": null, "refs": { - "RepositoryAssociation$ConnectionArn": "

The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the AWS CodeStar Connections API Reference.

", - "RepositoryAssociationSummary$ConnectionArn": "

The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the AWS CodeStar Connections API Reference.

", - "ThirdPartySourceRepository$ConnectionArn": "

The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the AWS CodeStar Connections API Reference.

" + "RepositoryAssociation$ConnectionArn": "

The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the AWS CodeStar Connections API Reference.

", + "RepositoryAssociationSummary$ConnectionArn": "

The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the AWS CodeStar Connections API Reference.

", + "ThirdPartySourceRepository$ConnectionArn": "

The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. For more information, see Connection in the AWS CodeStar Connections API Reference.

" + } + }, + "CreateCodeReviewRequest": { + "base": null, + "refs": { + } + }, + "CreateCodeReviewResponse": { + "base": null, + "refs": { } }, "DescribeCodeReviewRequest": { @@ -315,18 +347,18 @@ "Owner": { "base": null, "refs": { - "CodeReview$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub or Bitbucket repository, this is the username for the account that owns the repository.

", - "CodeReviewSummary$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub or Bitbucket repository, this is the username for the account that owns the repository.

", + "CodeReview$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.

", + "CodeReviewSummary$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.

", "Owners$member": null, - "RepositoryAssociation$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub or Bitbucket repository, this is the username for the account that owns the repository.

", - "RepositoryAssociationSummary$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub or Bitbucket repository, this is the username for the account that owns the repository.

", + "RepositoryAssociation$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.

", + "RepositoryAssociationSummary$Owner": "

The owner of the repository. For an AWS CodeCommit repository, this is the AWS account ID of the account that owns the repository. For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is the username for the account that owns the repository.

", "ThirdPartySourceRepository$Owner": "

The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket repository, this is the username for the account that owns the repository.

" } }, "Owners": { "base": null, "refs": { - "ListRepositoryAssociationsRequest$Owners": "

List of owners to use as a filter. For AWS CodeCommit, it is the name of the CodeCommit account that was used to associate the repository. For other repository source providers, such as Bitbucket, this is name of the account that was used to associate the repository.

" + "ListRepositoryAssociationsRequest$Owners": "

List of owners to use as a filter. For AWS CodeCommit, it is the name of the CodeCommit account that was used to associate the repository. For other repository source providers, such as Bitbucket and GitHub Enterprise Server, this is name of the account that was used to associate the repository.

" } }, "ProviderType": { @@ -430,6 +462,12 @@ "AssociateRepositoryRequest$Repository": "

The repository to associate.

" } }, + "RepositoryAnalysis": { + "base": "

A code review type that analyzes all code under a specified branch in an associated respository. The assocated repository is specified using its ARN when you call CreateCodeReview .

", + "refs": { + "CodeReviewType$RepositoryAnalysis": "

A code review that analyzes all code under a specified branch in an associated respository. The assocated repository is specified using its ARN in CreateCodeReview

" + } + }, "RepositoryAssociation": { "base": "

Information about a repository association. The DescribeRepositoryAssociation operation returns a RepositoryAssociation object.

", "refs": { @@ -441,15 +479,15 @@ "RepositoryAssociationState": { "base": null, "refs": { - "RepositoryAssociation$State": "

The state of the repository association.

The valid repository association states are:

", + "RepositoryAssociation$State": "

The state of the repository association.

The valid repository association states are:

", "RepositoryAssociationStates$member": null, - "RepositoryAssociationSummary$State": "

The state of the repository association.

The valid repository association states are:

" + "RepositoryAssociationSummary$State": "

The state of the repository association.

The valid repository association states are:

" } }, "RepositoryAssociationStates": { "base": null, "refs": { - "ListRepositoryAssociationsRequest$States": "

List of repository association states to use as a filter.

The valid repository association states are:

" + "ListRepositoryAssociationsRequest$States": "

List of repository association states to use as a filter.

The valid repository association states are:

" } }, "RepositoryAssociationSummaries": { @@ -464,6 +502,13 @@ "RepositoryAssociationSummaries$member": null } }, + "RepositoryHeadSourceCodeType": { + "base": "

A SourceCodeType that specifies the tip of a branch in an associated repository.

", + "refs": { + "RepositoryAnalysis$RepositoryHead": "

A SourceCodeType that specifies the tip of a branch in an associated repository.

", + "SourceCodeType$RepositoryHead": null + } + }, "RepositoryNames": { "base": null, "refs": { @@ -476,7 +521,7 @@ } }, "SourceCodeType": { - "base": "

Information about the source code type.

", + "base": "

Specifies the source code that is analyzed in a code review. A code review can analyze the source code that is specified using a pull request diff or a branch in an associated repository.

", "refs": { "CodeReview$SourceCodeType": "

The type of the source code for the code review.

" } diff --git a/models/apis/securityhub/2018-10-26/api-2.json b/models/apis/securityhub/2018-10-26/api-2.json index 4ab24bf57ed..657ca59040f 100644 --- a/models/apis/securityhub/2018-10-26/api-2.json +++ b/models/apis/securityhub/2018-10-26/api-2.json @@ -1883,7 +1883,8 @@ "RecordState":{"shape":"RecordState"}, "RelatedFindings":{"shape":"RelatedFindingList"}, "Note":{"shape":"Note"}, - "Vulnerabilities":{"shape":"VulnerabilityList"} + "Vulnerabilities":{"shape":"VulnerabilityList"}, + "PatchSummary":{"shape":"PatchSummary"} } }, "AwsSecurityFindingFilters":{ @@ -3084,6 +3085,23 @@ "aws-us-gov" ] }, + "PatchSummary":{ + "type":"structure", + "required":["Id"], + "members":{ + "Id":{"shape":"NonEmptyString"}, + "InstalledCount":{"shape":"Integer"}, + "MissingCount":{"shape":"Integer"}, + "FailedCount":{"shape":"Integer"}, + "InstalledOtherCount":{"shape":"Integer"}, + "InstalledRejectedCount":{"shape":"Integer"}, + "InstalledPendingReboot":{"shape":"Integer"}, + "OperationStartTime":{"shape":"NonEmptyString"}, + "OperationEndTime":{"shape":"NonEmptyString"}, + "RebootOption":{"shape":"NonEmptyString"}, + "Operation":{"shape":"NonEmptyString"} + } + }, "PortRange":{ "type":"structure", "members":{ diff --git a/models/apis/securityhub/2018-10-26/docs-2.json b/models/apis/securityhub/2018-10-26/docs-2.json index fd54de0f346..826011a9c15 100644 --- a/models/apis/securityhub/2018-10-26/docs-2.json +++ b/models/apis/securityhub/2018-10-26/docs-2.json @@ -1521,6 +1521,12 @@ "InsightResultValue$Count": "

The number of findings returned for each GroupByAttributeValue.

", "Network$SourcePort": "

The source port of network-related information about a finding.

", "Network$DestinationPort": "

The destination port of network-related information about a finding.

", + "PatchSummary$InstalledCount": "

The number of patches from the compliance standard that were installed successfully.

", + "PatchSummary$MissingCount": "

The number of patches that are part of the compliance standard but are not installed. The count includes patches that failed to install.

", + "PatchSummary$FailedCount": "

The number of patches from the compliance standard that failed to install.

", + "PatchSummary$InstalledOtherCount": "

The number of installed patches that are not part of the compliance standard.

", + "PatchSummary$InstalledRejectedCount": "

The number of patches that are installed but are also on a list of patches that the customer rejected.

", + "PatchSummary$InstalledPendingReboot": "

The number of patches that were installed since the last time the instance was rebooted.

", "PortRange$Begin": "

The first port in the port range.

", "PortRange$End": "

The last port in the port range.

", "ProcessDetails$Pid": "

The process ID.

", @@ -2241,6 +2247,11 @@ "Note$UpdatedAt": "

The timestamp of when the note was updated.

Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z.

", "NoteUpdate$Text": "

The updated note text.

", "NoteUpdate$UpdatedBy": "

The principal that updated the note.

", + "PatchSummary$Id": "

The identifier of the compliance standard that was used to determine the patch compliance status.

", + "PatchSummary$OperationStartTime": "

Indicates when the operation started.

Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z.

", + "PatchSummary$OperationEndTime": "

Indicates when the operation completed.

Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z.

", + "PatchSummary$RebootOption": "

The reboot option specified for the instance.

", + "PatchSummary$Operation": "

The type of patch operation performed. For Patch Manager, the values are SCAN and INSTALL.

", "ProcessDetails$Name": "

The name of the process.

", "ProcessDetails$Path": "

The path to the process executable.

", "ProcessDetails$LaunchedAt": "

Indicates when the process was launched.

Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces. For example, 2020-03-22T13:22:13.933Z.

", @@ -2368,6 +2379,12 @@ "Resource$Partition": "

The canonical AWS partition name that the Region is assigned to.

" } }, + "PatchSummary": { + "base": "

Provides an overview of the patch compliance status for an instance against a selected compliance standard.

", + "refs": { + "AwsSecurityFinding$PatchSummary": "

Provides an overview of the patch compliance status for an instance against a selected compliance standard.

" + } + }, "PortRange": { "base": "

A range of ports.

", "refs": { diff --git a/service/codegurureviewer/api.go b/service/codegurureviewer/api.go index f7b14fe30fd..2348782decc 100644 --- a/service/codegurureviewer/api.go +++ b/service/codegurureviewer/api.go @@ -126,6 +126,102 @@ func (c *CodeGuruReviewer) AssociateRepositoryWithContext(ctx aws.Context, input return out, req.Send() } +const opCreateCodeReview = "CreateCodeReview" + +// CreateCodeReviewRequest generates a "aws/request.Request" representing the +// client's request for the CreateCodeReview operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See CreateCodeReview for more information on using the CreateCodeReview +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the CreateCodeReviewRequest method. +// req, resp := client.CreateCodeReviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview +func (c *CodeGuruReviewer) CreateCodeReviewRequest(input *CreateCodeReviewInput) (req *request.Request, output *CreateCodeReviewOutput) { + op := &request.Operation{ + Name: opCreateCodeReview, + HTTPMethod: "POST", + HTTPPath: "/codereviews", + } + + if input == nil { + input = &CreateCodeReviewInput{} + } + + output = &CreateCodeReviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateCodeReview API operation for Amazon CodeGuru Reviewer. +// +// Use to create a code review for a repository analysis. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon CodeGuru Reviewer's +// API operation CreateCodeReview for usage and error information. +// +// Returned Error Types: +// * ResourceNotFoundException +// The resource specified in the request was not found. +// +// * InternalServerException +// The server encountered an internal error and is unable to complete the request. +// +// * ValidationException +// The input fails to satisfy the specified constraints. +// +// * ConflictException +// The requested operation would cause a conflict with the current state of +// a service resource associated with the request. Resolve the conflict before +// retrying this request. +// +// * AccessDeniedException +// You do not have sufficient access to perform this action. +// +// * ThrottlingException +// The request was denied due to request throttling. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview +func (c *CodeGuruReviewer) CreateCodeReview(input *CreateCodeReviewInput) (*CreateCodeReviewOutput, error) { + req, out := c.CreateCodeReviewRequest(input) + return out, req.Send() +} + +// CreateCodeReviewWithContext is the same as CreateCodeReview with the addition of +// the ability to pass a context and additional request options. +// +// See CreateCodeReview for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *CodeGuruReviewer) CreateCodeReviewWithContext(ctx aws.Context, input *CreateCodeReviewInput, opts ...request.Option) (*CreateCodeReviewOutput, error) { + req, out := c.CreateCodeReviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeCodeReview = "DescribeCodeReview" // DescribeCodeReviewRequest generates a "aws/request.Request" representing the @@ -1242,24 +1338,6 @@ func (s *AccessDeniedException) RequestID() string { type AssociateRepositoryInput struct { _ struct{} `type:"structure"` - // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. - // - // To add a new repository association, this parameter specifies a unique identifier - // for the new repository association that helps ensure idempotency. - // - // If you use the AWS CLI or one of the AWS SDKs to call this operation, you - // can leave this parameter empty. The CLI or SDK generates a random UUID for - // you and includes that in the request. If you don't use the SDK and instead - // generate a raw HTTP request to the Secrets Manager service endpoint, you - // must generate a ClientRequestToken yourself for new versions and include - // that value in the request. - // - // You typically interact with this value if you implement your own retry logic - // and want to ensure that a given repository association is not created twice. - // We recommend that you generate a UUID-type value to ensure uniqueness within - // the specified repository association. - // // Amazon CodeGuru Reviewer uses this value to prevent the accidental creation // of duplicate repository associations if there are failures and retries. ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` @@ -1404,8 +1482,9 @@ type CodeReview struct { Name *string `min:"1" type:"string"` // The owner of the repository. For an AWS CodeCommit repository, this is the - // AWS account ID of the account that owns the repository. For a GitHub or Bitbucket - // repository, this is the username for the account that owns the repository. + // AWS account ID of the account that owns the repository. For a GitHub, GitHub + // Enterprise Server, or Bitbucket repository, this is the username for the + // account that owns the repository. Owner *string `min:"1" type:"string"` // The type of repository that contains the reviewed code (for example, GitHub @@ -1549,8 +1628,9 @@ type CodeReviewSummary struct { Name *string `min:"1" type:"string"` // The owner of the repository. For an AWS CodeCommit repository, this is the - // AWS account ID of the account that owns the repository. For a GitHub or Bitbucket - // repository, this is the username for the account that owns the repository. + // AWS account ID of the account that owns the repository. For a GitHub, GitHub + // Enterprise Server, or Bitbucket repository, this is the username for the + // account that owns the repository. Owner *string `min:"1" type:"string"` // The provider type of the repository association. @@ -1655,14 +1735,70 @@ func (s *CodeReviewSummary) SetType(v string) *CodeReviewSummary { return s } -// The commit diff for the pull request. +// The type of a code review. There are two code review types: +// +// * PullRequest - A code review that is automatically triggered by a pull +// request on an assocaited repository. Because this type of code review +// is automatically generated, you cannot specify this code review type using +// CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). +// +// * RepositoryAnalysis - A code review that analyzes all code under a specified +// branch in an associated respository. The assocated repository is specified +// using its ARN in CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). +type CodeReviewType struct { + _ struct{} `type:"structure"` + + // A code review that analyzes all code under a specified branch in an associated + // respository. The assocated repository is specified using its ARN in CreateCodeReview + // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview) + // + // RepositoryAnalysis is a required field + RepositoryAnalysis *RepositoryAnalysis `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CodeReviewType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CodeReviewType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CodeReviewType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CodeReviewType"} + if s.RepositoryAnalysis == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryAnalysis")) + } + if s.RepositoryAnalysis != nil { + if err := s.RepositoryAnalysis.Validate(); err != nil { + invalidParams.AddNested("RepositoryAnalysis", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRepositoryAnalysis sets the RepositoryAnalysis field's value. +func (s *CodeReviewType) SetRepositoryAnalysis(v *RepositoryAnalysis) *CodeReviewType { + s.RepositoryAnalysis = v + return s +} + +// A type of SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) +// that specifies the commit diff for a pull request on an associated repository. type CommitDiffSourceCodeType struct { _ struct{} `type:"structure"` - // The SHA of the destination commit. + // The SHA of the destination commit used to generate a commit diff. DestinationCommit *string `min:"6" type:"string"` - // The SHA of the source commit. + // The SHA of the source commit used to generate a commit diff. SourceCommit *string `min:"6" type:"string"` } @@ -1746,6 +1882,126 @@ func (s *ConflictException) RequestID() string { return s.RespMetadata.RequestID } +type CreateCodeReviewInput struct { + _ struct{} `type:"structure"` + + // Amazon CodeGuru Reviewer uses this value to prevent the accidental creation + // of duplicate code reviews if there are failures and retries. + ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` + + // The name of the code review. Each code review of the same code review type + // must have a unique name in your AWS account. + // + // Name is a required field + Name *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) + // object. You can retrieve this ARN by calling ListRepositories. + // + // A code review can only be created on an associated repository. This is the + // ARN of the associated repository. + // + // RepositoryAssociationArn is a required field + RepositoryAssociationArn *string `min:"1" type:"string" required:"true"` + + // The type of code review to create. This is specified using a CodeReviewType + // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html) + // object. + // + // Type is a required field + Type *CodeReviewType `type:"structure" required:"true"` +} + +// String returns the string representation +func (s CreateCodeReviewInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCodeReviewInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateCodeReviewInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateCodeReviewInput"} + if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) + } + if s.Name == nil { + invalidParams.Add(request.NewErrParamRequired("Name")) + } + if s.Name != nil && len(*s.Name) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Name", 1)) + } + if s.RepositoryAssociationArn == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryAssociationArn")) + } + if s.RepositoryAssociationArn != nil && len(*s.RepositoryAssociationArn) < 1 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryAssociationArn", 1)) + } + if s.Type == nil { + invalidParams.Add(request.NewErrParamRequired("Type")) + } + if s.Type != nil { + if err := s.Type.Validate(); err != nil { + invalidParams.AddNested("Type", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientRequestToken sets the ClientRequestToken field's value. +func (s *CreateCodeReviewInput) SetClientRequestToken(v string) *CreateCodeReviewInput { + s.ClientRequestToken = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateCodeReviewInput) SetName(v string) *CreateCodeReviewInput { + s.Name = &v + return s +} + +// SetRepositoryAssociationArn sets the RepositoryAssociationArn field's value. +func (s *CreateCodeReviewInput) SetRepositoryAssociationArn(v string) *CreateCodeReviewInput { + s.RepositoryAssociationArn = &v + return s +} + +// SetType sets the Type field's value. +func (s *CreateCodeReviewInput) SetType(v *CodeReviewType) *CreateCodeReviewInput { + s.Type = v + return s +} + +type CreateCodeReviewOutput struct { + _ struct{} `type:"structure"` + + // Information about a code review. + CodeReview *CodeReview `type:"structure"` +} + +// String returns the string representation +func (s CreateCodeReviewOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateCodeReviewOutput) GoString() string { + return s.String() +} + +// SetCodeReview sets the CodeReview field's value. +func (s *CreateCodeReviewOutput) SetCodeReview(v *CodeReview) *CreateCodeReviewOutput { + s.CodeReview = v + return s +} + type DescribeCodeReviewInput struct { _ struct{} `type:"structure"` @@ -1981,7 +2237,7 @@ type DisassociateRepositoryInput struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) - // object. + // object. You can retrieve this ARN by calling ListRepositories. // // AssociationArn is a required field AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"` @@ -2505,8 +2761,8 @@ type ListRepositoryAssociationsInput struct { // List of owners to use as a filter. For AWS CodeCommit, it is the name of // the CodeCommit account that was used to associate the repository. For other - // repository source providers, such as Bitbucket, this is name of the account - // that was used to associate the repository. + // repository source providers, such as Bitbucket and GitHub Enterprise Server, + // this is name of the account that was used to associate the repository. Owners []*string `location:"querystring" locationName:"Owner" min:"1" type:"list"` // List of provider types to use as a filter. @@ -2520,11 +2776,12 @@ type ListRepositoryAssociationsInput struct { // // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. // This is required for pull requests to trigger a CodeGuru Reviewer review. - // If your repository ProviderType is GitHub or Bitbucket, CodeGuru Reviewer - // creates webhooks in your repository to trigger CodeGuru Reviewer reviews. - // If you delete these webhooks, reviews of code in your repository cannot - // be triggered. Setting up source code access. This is required for CodeGuru - // Reviewer to securely clone code in your repository. + // If your repository ProviderType is GitHub, GitHub Enterprise Server, or + // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger + // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code + // in your repository cannot be triggered. Setting up source code access. + // This is required for CodeGuru Reviewer to securely clone code in your + // repository. // // * Failed: The repository failed to associate or disassociate. // @@ -3133,6 +3390,53 @@ func (s *Repository) SetGitHubEnterpriseServer(v *ThirdPartySourceRepository) *R return s } +// A code review type that analyzes all code under a specified branch in an +// associated respository. The assocated repository is specified using its ARN +// when you call CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). +type RepositoryAnalysis struct { + _ struct{} `type:"structure"` + + // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) + // that specifies the tip of a branch in an associated repository. + // + // RepositoryHead is a required field + RepositoryHead *RepositoryHeadSourceCodeType `type:"structure" required:"true"` +} + +// String returns the string representation +func (s RepositoryAnalysis) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RepositoryAnalysis) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RepositoryAnalysis) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RepositoryAnalysis"} + if s.RepositoryHead == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryHead")) + } + if s.RepositoryHead != nil { + if err := s.RepositoryHead.Validate(); err != nil { + invalidParams.AddNested("RepositoryHead", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetRepositoryHead sets the RepositoryHead field's value. +func (s *RepositoryAnalysis) SetRepositoryHead(v *RepositoryHeadSourceCodeType) *RepositoryAnalysis { + s.RepositoryHead = v + return s +} + // Information about a repository association. The DescribeRepositoryAssociation // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_DescribeRepositoryAssociation.html) // operation returns a RepositoryAssociation object. @@ -3163,8 +3467,9 @@ type RepositoryAssociation struct { Name *string `min:"1" type:"string"` // The owner of the repository. For an AWS CodeCommit repository, this is the - // AWS account ID of the account that owns the repository. For a GitHub or Bitbucket - // repository, this is the username for the account that owns the repository. + // AWS account ID of the account that owns the repository. For a GitHub, GitHub + // Enterprise Server, or Bitbucket repository, this is the username for the + // account that owns the repository. Owner *string `min:"1" type:"string"` // The provider type of the repository association. @@ -3178,11 +3483,12 @@ type RepositoryAssociation struct { // // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. // This is required for pull requests to trigger a CodeGuru Reviewer review. - // If your repository ProviderType is GitHub or Bitbucket, CodeGuru Reviewer - // creates webhooks in your repository to trigger CodeGuru Reviewer reviews. - // If you delete these webhooks, reviews of code in your repository cannot - // be triggered. Setting up source code access. This is required for CodeGuru - // Reviewer to securely clone code in your repository. + // If your repository ProviderType is GitHub, GitHub Enterprise Server, or + // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger + // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code + // in your repository cannot be triggered. Setting up source code access. + // This is required for CodeGuru Reviewer to securely clone code in your + // repository. // // * Failed: The repository failed to associate or disassociate. // @@ -3271,7 +3577,7 @@ type RepositoryAssociationSummary struct { _ struct{} `type:"structure"` // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) - // object. + // object. You can retrieve this ARN by calling ListRepositories. AssociationArn *string `min:"1" type:"string"` // The repository association ID. @@ -3291,8 +3597,9 @@ type RepositoryAssociationSummary struct { Name *string `min:"1" type:"string"` // The owner of the repository. For an AWS CodeCommit repository, this is the - // AWS account ID of the account that owns the repository. For a GitHub or Bitbucket - // repository, this is the username for the account that owns the repository. + // AWS account ID of the account that owns the repository. For a GitHub, GitHub + // Enterprise Server, or Bitbucket repository, this is the username for the + // account that owns the repository. Owner *string `min:"1" type:"string"` // The provider type of the repository association. @@ -3306,11 +3613,12 @@ type RepositoryAssociationSummary struct { // // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. // This is required for pull requests to trigger a CodeGuru Reviewer review. - // If your repository ProviderType is GitHub or Bitbucket, CodeGuru Reviewer - // creates webhooks in your repository to trigger CodeGuru Reviewer reviews. - // If you delete these webhooks, reviews of code in your repository cannot - // be triggered. Setting up source code access. This is required for CodeGuru - // Reviewer to securely clone code in your repository. + // If your repository ProviderType is GitHub, GitHub Enterprise Server, or + // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger + // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code + // in your repository cannot be triggered. Setting up source code access. + // This is required for CodeGuru Reviewer to securely clone code in your + // repository. // // * Failed: The repository failed to associate or disassociate. // @@ -3377,6 +3685,50 @@ func (s *RepositoryAssociationSummary) SetState(v string) *RepositoryAssociation return s } +// A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) +// that specifies the tip of a branch in an associated repository. +type RepositoryHeadSourceCodeType struct { + _ struct{} `type:"structure"` + + // The name of the branch in an associated repository. The RepositoryHeadSourceCodeType + // specifies the tip of this branch. + // + // BranchName is a required field + BranchName *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s RepositoryHeadSourceCodeType) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RepositoryHeadSourceCodeType) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RepositoryHeadSourceCodeType) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RepositoryHeadSourceCodeType"} + if s.BranchName == nil { + invalidParams.Add(request.NewErrParamRequired("BranchName")) + } + if s.BranchName != nil && len(*s.BranchName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranchName sets the BranchName field's value. +func (s *RepositoryHeadSourceCodeType) SetBranchName(v string) *RepositoryHeadSourceCodeType { + s.BranchName = &v + return s +} + // The resource specified in the request was not found. type ResourceNotFoundException struct { _ struct{} `type:"structure"` @@ -3433,12 +3785,19 @@ func (s *ResourceNotFoundException) RequestID() string { return s.RespMetadata.RequestID } -// Information about the source code type. +// Specifies the source code that is analyzed in a code review. A code review +// can analyze the source code that is specified using a pull request diff or +// a branch in an associated repository. type SourceCodeType struct { _ struct{} `type:"structure"` - // The commit diff for the pull request. + // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) + // that specifies a commit diff created by a pull request on an associated repository. CommitDiff *CommitDiffSourceCodeType `type:"structure"` + + // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) + // that specifies the tip of a branch in an associated repository. + RepositoryHead *RepositoryHeadSourceCodeType `type:"structure"` } // String returns the string representation @@ -3457,6 +3816,12 @@ func (s *SourceCodeType) SetCommitDiff(v *CommitDiffSourceCodeType) *SourceCodeT return s } +// SetRepositoryHead sets the RepositoryHead field's value. +func (s *SourceCodeType) SetRepositoryHead(v *RepositoryHeadSourceCodeType) *SourceCodeType { + s.RepositoryHead = v + return s +} + // Information about a third-party source repository connected to CodeGuru Reviewer. type ThirdPartySourceRepository struct { _ struct{} `type:"structure"` @@ -3737,11 +4102,15 @@ func RepositoryAssociationState_Values() []string { const ( // TypePullRequest is a Type enum value TypePullRequest = "PullRequest" + + // TypeRepositoryAnalysis is a Type enum value + TypeRepositoryAnalysis = "RepositoryAnalysis" ) // Type_Values returns all elements of the Type enum func Type_Values() []string { return []string{ TypePullRequest, + TypeRepositoryAnalysis, } } diff --git a/service/codegurureviewer/codegururevieweriface/interface.go b/service/codegurureviewer/codegururevieweriface/interface.go index 7a2de3a8ffa..735cd2b7024 100644 --- a/service/codegurureviewer/codegururevieweriface/interface.go +++ b/service/codegurureviewer/codegururevieweriface/interface.go @@ -64,6 +64,10 @@ type CodeGuruReviewerAPI interface { AssociateRepositoryWithContext(aws.Context, *codegurureviewer.AssociateRepositoryInput, ...request.Option) (*codegurureviewer.AssociateRepositoryOutput, error) AssociateRepositoryRequest(*codegurureviewer.AssociateRepositoryInput) (*request.Request, *codegurureviewer.AssociateRepositoryOutput) + CreateCodeReview(*codegurureviewer.CreateCodeReviewInput) (*codegurureviewer.CreateCodeReviewOutput, error) + CreateCodeReviewWithContext(aws.Context, *codegurureviewer.CreateCodeReviewInput, ...request.Option) (*codegurureviewer.CreateCodeReviewOutput, error) + CreateCodeReviewRequest(*codegurureviewer.CreateCodeReviewInput) (*request.Request, *codegurureviewer.CreateCodeReviewOutput) + DescribeCodeReview(*codegurureviewer.DescribeCodeReviewInput) (*codegurureviewer.DescribeCodeReviewOutput, error) DescribeCodeReviewWithContext(aws.Context, *codegurureviewer.DescribeCodeReviewInput, ...request.Option) (*codegurureviewer.DescribeCodeReviewOutput, error) DescribeCodeReviewRequest(*codegurureviewer.DescribeCodeReviewInput) (*request.Request, *codegurureviewer.DescribeCodeReviewOutput) diff --git a/service/securityhub/api.go b/service/securityhub/api.go index 543ae2d5cdb..f3db2b8f0e8 100644 --- a/service/securityhub/api.go +++ b/service/securityhub/api.go @@ -11229,6 +11229,10 @@ type AwsSecurityFinding struct { // A user-defined note added to a finding. Note *Note `type:"structure"` + // Provides an overview of the patch compliance status for an instance against + // a selected compliance standard. + PatchSummary *PatchSummary `type:"structure"` + // The details of process-related information about a finding. Process *ProcessDetails `type:"structure"` @@ -11386,6 +11390,11 @@ func (s *AwsSecurityFinding) Validate() error { invalidParams.AddNested("Note", err.(request.ErrInvalidParams)) } } + if s.PatchSummary != nil { + if err := s.PatchSummary.Validate(); err != nil { + invalidParams.AddNested("PatchSummary", err.(request.ErrInvalidParams)) + } + } if s.RelatedFindings != nil { for i, v := range s.RelatedFindings { if v == nil { @@ -11507,6 +11516,12 @@ func (s *AwsSecurityFinding) SetNote(v *Note) *AwsSecurityFinding { return s } +// SetPatchSummary sets the PatchSummary field's value. +func (s *AwsSecurityFinding) SetPatchSummary(v *PatchSummary) *AwsSecurityFinding { + s.PatchSummary = v + return s +} + // SetProcess sets the Process field's value. func (s *AwsSecurityFinding) SetProcess(v *ProcessDetails) *AwsSecurityFinding { s.Process = v @@ -16920,6 +16935,149 @@ func (s *NumberFilter) SetLte(v float64) *NumberFilter { return s } +// Provides an overview of the patch compliance status for an instance against +// a selected compliance standard. +type PatchSummary struct { + _ struct{} `type:"structure"` + + // The number of patches from the compliance standard that failed to install. + FailedCount *int64 `type:"integer"` + + // The identifier of the compliance standard that was used to determine the + // patch compliance status. + // + // Id is a required field + Id *string `type:"string" required:"true"` + + // The number of patches from the compliance standard that were installed successfully. + InstalledCount *int64 `type:"integer"` + + // The number of installed patches that are not part of the compliance standard. + InstalledOtherCount *int64 `type:"integer"` + + // The number of patches that were installed since the last time the instance + // was rebooted. + InstalledPendingReboot *int64 `type:"integer"` + + // The number of patches that are installed but are also on a list of patches + // that the customer rejected. + InstalledRejectedCount *int64 `type:"integer"` + + // The number of patches that are part of the compliance standard but are not + // installed. The count includes patches that failed to install. + MissingCount *int64 `type:"integer"` + + // The type of patch operation performed. For Patch Manager, the values are + // SCAN and INSTALL. + Operation *string `type:"string"` + + // Indicates when the operation completed. + // + // Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time + // Format (https://tools.ietf.org/html/rfc3339#section-5.6). The value cannot + // contain spaces. For example, 2020-03-22T13:22:13.933Z. + OperationEndTime *string `type:"string"` + + // Indicates when the operation started. + // + // Uses the date-time format specified in RFC 3339 section 5.6, Internet Date/Time + // Format (https://tools.ietf.org/html/rfc3339#section-5.6). The value cannot + // contain spaces. For example, 2020-03-22T13:22:13.933Z. + OperationStartTime *string `type:"string"` + + // The reboot option specified for the instance. + RebootOption *string `type:"string"` +} + +// String returns the string representation +func (s PatchSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PatchSummary) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PatchSummary) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PatchSummary"} + if s.Id == nil { + invalidParams.Add(request.NewErrParamRequired("Id")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFailedCount sets the FailedCount field's value. +func (s *PatchSummary) SetFailedCount(v int64) *PatchSummary { + s.FailedCount = &v + return s +} + +// SetId sets the Id field's value. +func (s *PatchSummary) SetId(v string) *PatchSummary { + s.Id = &v + return s +} + +// SetInstalledCount sets the InstalledCount field's value. +func (s *PatchSummary) SetInstalledCount(v int64) *PatchSummary { + s.InstalledCount = &v + return s +} + +// SetInstalledOtherCount sets the InstalledOtherCount field's value. +func (s *PatchSummary) SetInstalledOtherCount(v int64) *PatchSummary { + s.InstalledOtherCount = &v + return s +} + +// SetInstalledPendingReboot sets the InstalledPendingReboot field's value. +func (s *PatchSummary) SetInstalledPendingReboot(v int64) *PatchSummary { + s.InstalledPendingReboot = &v + return s +} + +// SetInstalledRejectedCount sets the InstalledRejectedCount field's value. +func (s *PatchSummary) SetInstalledRejectedCount(v int64) *PatchSummary { + s.InstalledRejectedCount = &v + return s +} + +// SetMissingCount sets the MissingCount field's value. +func (s *PatchSummary) SetMissingCount(v int64) *PatchSummary { + s.MissingCount = &v + return s +} + +// SetOperation sets the Operation field's value. +func (s *PatchSummary) SetOperation(v string) *PatchSummary { + s.Operation = &v + return s +} + +// SetOperationEndTime sets the OperationEndTime field's value. +func (s *PatchSummary) SetOperationEndTime(v string) *PatchSummary { + s.OperationEndTime = &v + return s +} + +// SetOperationStartTime sets the OperationStartTime field's value. +func (s *PatchSummary) SetOperationStartTime(v string) *PatchSummary { + s.OperationStartTime = &v + return s +} + +// SetRebootOption sets the RebootOption field's value. +func (s *PatchSummary) SetRebootOption(v string) *PatchSummary { + s.RebootOption = &v + return s +} + // A range of ports. type PortRange struct { _ struct{} `type:"structure"`