diff --git a/CHANGELOG.md b/CHANGELOG.md index e29f6e2dd6..0e42d8783b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +Release v1.25.20 (2019-10-28) +=== + +### Service Client Updates +* `service/ecr`: Updates service API, documentation, and paginators + * This release of Amazon Elastic Container Registry Service (Amazon ECR) introduces support for image scanning. This identifies the software vulnerabilities in the container image based on the Common Vulnerabilities and Exposures (CVE) database. +* `service/elasticache`: Updates service API and documentation + * Amazon ElastiCache adds support for migrating Redis workloads hosted on Amazon EC2 into ElastiCache by syncing the data between the source Redis cluster and target ElastiCache for Redis cluster in real time. For more information, see https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/migrate-to-elasticache.html. +* `service/transfer`: Updates service API and documentation + * This release adds logical directories support to your AWS SFTP server endpoint, so you can now create logical directory structures mapped to Amazon Simple Storage Service (Amazon S3) bucket paths for users created and stored within the service. Amazon S3 bucket names and paths can now be hidden from AWS SFTP users, providing an additional level of privacy to meet security requirements. You can lock down your SFTP users' access to designated folders (commonly referred to as 'chroot'), and simplify complex folder structures for data distribution through SFTP without replicating files across multiple users. + +### SDK Enhancements +* `aws/client`: Add PartitionID to Config ([#2902](https://github.com/aws/aws-sdk-go/pull/2902)) +* `aws/client/metadata`: Add PartitionID to ClientInfo ([#2902](https://github.com/aws/aws-sdk-go/pull/2902)) +* `aws/endpoints`: Add PartitionID to ResolvedEndpoint ([#2902](https://github.com/aws/aws-sdk-go/pull/2902)) + +### SDK Bugs +* `aws/endpoints`: Fix resolve endpoint with empty region ([#2911](https://github.com/aws/aws-sdk-go/pull/2911)) + * Fixes the SDK's behavior when attempting to resolve a service's endpoint when no region was provided. Adds legacy support for services that were able to resolve a valid endpoint. No new service will support resolving an endpoint without an region. + * Fixes [#2909](https://github.com/aws/aws-sdk-go/issues/2909) + Release v1.25.19 (2019-10-24) === diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 273bc267f3..8a1927a39c 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -1,11 +1,5 @@ ### SDK Features ### SDK Enhancements -* `aws/client`: Add PartitionID to Config ([#2902](https://github.com/aws/aws-sdk-go/pull/2902)) -* `aws/client/metadata`: Add PartitionID to ClientInfo ([#2902](https://github.com/aws/aws-sdk-go/pull/2902)) -* `aws/endpoints`: Add PartitionID to ResolvedEndpoint ([#2902](https://github.com/aws/aws-sdk-go/pull/2902)) ### SDK Bugs -* `aws/endpoints`: Fix resolve endpoint with empty region ([#2911](https://github.com/aws/aws-sdk-go/pull/2911)) - * Fixes the SDK's behavior when attempting to resolve a service's endpoint when no region was provided. Adds legacy support for services that were able to resolve a valid endpoint. No new service will support resolving an endpoint without an region. - * Fixes [#2909](https://github.com/aws/aws-sdk-go/issues/2909) diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index b799188863..4b701de436 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -463,6 +463,7 @@ var awsPartition = partition{ "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-1": endpoint{}, @@ -1683,6 +1684,28 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "forecast": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "forecastquery": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "fsx": service{ Endpoints: endpoints{ @@ -3709,6 +3732,17 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "transcribestreaming": service{ + + Endpoints: endpoints{ + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "transfer": service{ Endpoints: endpoints{ @@ -4124,6 +4158,12 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "glue": service{ + + Endpoints: endpoints{ + "cn-northwest-1": endpoint{}, + }, + }, "greengrass": service{ IsRegionalized: boxedTrue, Defaults: endpoint{ diff --git a/aws/version.go b/aws/version.go index fc23a6c6fa..ee0cb4393d 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.25.19" +const SDKVersion = "1.25.20" diff --git a/models/apis/ecr/2015-09-21/api-2.json b/models/apis/ecr/2015-09-21/api-2.json index 644da50b56..50bd001389 100644 --- a/models/apis/ecr/2015-09-21/api-2.json +++ b/models/apis/ecr/2015-09-21/api-2.json @@ -137,6 +137,22 @@ {"shape":"RepositoryPolicyNotFoundException"} ] }, + "DescribeImageScanFindings":{ + "name":"DescribeImageScanFindings", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"DescribeImageScanFindingsRequest"}, + "output":{"shape":"DescribeImageScanFindingsResponse"}, + "errors":[ + {"shape":"ServerException"}, + {"shape":"InvalidParameterException"}, + {"shape":"RepositoryNotFoundException"}, + {"shape":"ImageNotFoundException"}, + {"shape":"ScanNotFoundException"} + ] + }, "DescribeImages":{ "name":"DescribeImages", "http":{ @@ -300,6 +316,20 @@ {"shape":"ImageTagAlreadyExistsException"} ] }, + "PutImageScanningConfiguration":{ + "name":"PutImageScanningConfiguration", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutImageScanningConfigurationRequest"}, + "output":{"shape":"PutImageScanningConfigurationResponse"}, + "errors":[ + {"shape":"ServerException"}, + {"shape":"InvalidParameterException"}, + {"shape":"RepositoryNotFoundException"} + ] + }, "PutImageTagMutability":{ "name":"PutImageTagMutability", "http":{ @@ -342,6 +372,21 @@ {"shape":"RepositoryNotFoundException"} ] }, + "StartImageScan":{ + "name":"StartImageScan", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StartImageScanRequest"}, + "output":{"shape":"StartImageScanResponse"}, + "errors":[ + {"shape":"ServerException"}, + {"shape":"InvalidParameterException"}, + {"shape":"RepositoryNotFoundException"}, + {"shape":"ImageNotFoundException"} + ] + }, "StartLifecyclePolicyPreview":{ "name":"StartLifecyclePolicyPreview", "http":{ @@ -410,6 +455,30 @@ }, "shapes":{ "Arn":{"type":"string"}, + "Attribute":{ + "type":"structure", + "required":["key"], + "members":{ + "key":{"shape":"AttributeKey"}, + "value":{"shape":"AttributeValue"} + } + }, + "AttributeKey":{ + "type":"string", + "max":128, + "min":1 + }, + "AttributeList":{ + "type":"list", + "member":{"shape":"Attribute"}, + "max":50, + "min":0 + }, + "AttributeValue":{ + "type":"string", + "max":256, + "min":1 + }, "AuthorizationData":{ "type":"structure", "members":{ @@ -524,7 +593,8 @@ "members":{ "repositoryName":{"shape":"RepositoryName"}, "tags":{"shape":"TagList"}, - "imageTagMutability":{"shape":"ImageTagMutability"} + "imageTagMutability":{"shape":"ImageTagMutability"}, + "imageScanningConfiguration":{"shape":"ImageScanningConfiguration"} } }, "CreateRepositoryResponse":{ @@ -582,6 +652,31 @@ "repository":{"shape":"Repository"} } }, + "DescribeImageScanFindingsRequest":{ + "type":"structure", + "required":[ + "repositoryName", + "imageId" + ], + "members":{ + "registryId":{"shape":"RegistryId"}, + "repositoryName":{"shape":"RepositoryName"}, + "imageId":{"shape":"ImageIdentifier"}, + "nextToken":{"shape":"NextToken"}, + "maxResults":{"shape":"MaxResults"} + } + }, + "DescribeImageScanFindingsResponse":{ + "type":"structure", + "members":{ + "registryId":{"shape":"RegistryId"}, + "repositoryName":{"shape":"RepositoryName"}, + "imageId":{"shape":"ImageIdentifier"}, + "imageScanStatus":{"shape":"ImageScanStatus"}, + "imageScanFindings":{"shape":"ImageScanFindings"}, + "nextToken":{"shape":"NextToken"} + } + }, "DescribeImagesFilter":{ "type":"structure", "members":{ @@ -633,6 +728,24 @@ "EvaluationTimestamp":{"type":"timestamp"}, "ExceptionMessage":{"type":"string"}, "ExpirationTimestamp":{"type":"timestamp"}, + "FindingDescription":{"type":"string"}, + "FindingName":{"type":"string"}, + "FindingSeverity":{ + "type":"string", + "enum":[ + "INFORMATIONAL", + "LOW", + "MEDIUM", + "HIGH", + "CRITICAL", + "UNDEFINED" + ] + }, + "FindingSeverityCounts":{ + "type":"map", + "key":{"shape":"FindingSeverity"}, + "value":{"shape":"SeverityCount"} + }, "ForceFlag":{"type":"boolean"}, "GetAuthorizationTokenRegistryIdList":{ "type":"list", @@ -760,7 +873,9 @@ "imageDigest":{"shape":"ImageDigest"}, "imageTags":{"shape":"ImageTagList"}, "imageSizeInBytes":{"shape":"ImageSizeInBytes"}, - "imagePushedAt":{"shape":"PushTimestamp"} + "imagePushedAt":{"shape":"PushTimestamp"}, + "imageScanStatus":{"shape":"ImageScanStatus"}, + "imageScanFindingsSummary":{"shape":"ImageScanFindingsSummary"} } }, "ImageDetailList":{ @@ -808,7 +923,11 @@ "type":"list", "member":{"shape":"Image"} }, - "ImageManifest":{"type":"string"}, + "ImageManifest":{ + "type":"string", + "max":4194304, + "min":1 + }, "ImageNotFoundException":{ "type":"structure", "members":{ @@ -816,6 +935,50 @@ }, "exception":true }, + "ImageScanFinding":{ + "type":"structure", + "members":{ + "name":{"shape":"FindingName"}, + "description":{"shape":"FindingDescription"}, + "uri":{"shape":"Url"}, + "severity":{"shape":"FindingSeverity"}, + "attributes":{"shape":"AttributeList"} + } + }, + "ImageScanFindingList":{ + "type":"list", + "member":{"shape":"ImageScanFinding"} + }, + "ImageScanFindings":{ + "type":"structure", + "members":{ + "imageScanCompletedAt":{"shape":"ScanTimestamp"}, + "vulnerabilitySourceUpdatedAt":{"shape":"VulnerabilitySourceUpdateTimestamp"}, + "findings":{"shape":"ImageScanFindingList"}, + "findingSeverityCounts":{"shape":"FindingSeverityCounts"} + } + }, + "ImageScanFindingsSummary":{ + "type":"structure", + "members":{ + "imageScanCompletedAt":{"shape":"ScanTimestamp"}, + "vulnerabilitySourceUpdatedAt":{"shape":"VulnerabilitySourceUpdateTimestamp"}, + "findingSeverityCounts":{"shape":"FindingSeverityCounts"} + } + }, + "ImageScanStatus":{ + "type":"structure", + "members":{ + "status":{"shape":"ScanStatus"}, + "description":{"shape":"ScanStatusDescription"} + } + }, + "ImageScanningConfiguration":{ + "type":"structure", + "members":{ + "scanOnPush":{"shape":"ScanOnPushFlag"} + } + }, "ImageSizeInBytes":{"type":"long"}, "ImageTag":{ "type":"string", @@ -951,7 +1114,11 @@ "type":"list", "member":{"shape":"Layer"} }, - "LayerPartBlob":{"type":"blob"}, + "LayerPartBlob":{ + "type":"blob", + "max":20971520, + "min":0 + }, "LayerPartTooSmallException":{ "type":"structure", "members":{ @@ -1125,6 +1292,26 @@ "image":{"shape":"Image"} } }, + "PutImageScanningConfigurationRequest":{ + "type":"structure", + "required":[ + "repositoryName", + "imageScanningConfiguration" + ], + "members":{ + "registryId":{"shape":"RegistryId"}, + "repositoryName":{"shape":"RepositoryName"}, + "imageScanningConfiguration":{"shape":"ImageScanningConfiguration"} + } + }, + "PutImageScanningConfigurationResponse":{ + "type":"structure", + "members":{ + "registryId":{"shape":"RegistryId"}, + "repositoryName":{"shape":"RepositoryName"}, + "imageScanningConfiguration":{"shape":"ImageScanningConfiguration"} + } + }, "PutImageTagMutabilityRequest":{ "type":"structure", "required":[ @@ -1177,7 +1364,8 @@ "repositoryName":{"shape":"RepositoryName"}, "repositoryUri":{"shape":"Url"}, "createdAt":{"shape":"CreationTimestamp"}, - "imageTagMutability":{"shape":"ImageTagMutability"} + "imageTagMutability":{"shape":"ImageTagMutability"}, + "imageScanningConfiguration":{"shape":"ImageScanningConfiguration"} } }, "RepositoryAlreadyExistsException":{ @@ -1229,6 +1417,24 @@ "max":10240, "min":0 }, + "ScanNotFoundException":{ + "type":"structure", + "members":{ + "message":{"shape":"ExceptionMessage"} + }, + "exception":true + }, + "ScanOnPushFlag":{"type":"boolean"}, + "ScanStatus":{ + "type":"string", + "enum":[ + "IN_PROGRESS", + "COMPLETE", + "FAILED" + ] + }, + "ScanStatusDescription":{"type":"string"}, + "ScanTimestamp":{"type":"timestamp"}, "ServerException":{ "type":"structure", "members":{ @@ -1258,6 +1464,31 @@ "policyText":{"shape":"RepositoryPolicyText"} } }, + "SeverityCount":{ + "type":"integer", + "min":0 + }, + "StartImageScanRequest":{ + "type":"structure", + "required":[ + "repositoryName", + "imageId" + ], + "members":{ + "registryId":{"shape":"RegistryId"}, + "repositoryName":{"shape":"RepositoryName"}, + "imageId":{"shape":"ImageIdentifier"} + } + }, + "StartImageScanResponse":{ + "type":"structure", + "members":{ + "registryId":{"shape":"RegistryId"}, + "repositoryName":{"shape":"RepositoryName"}, + "imageId":{"shape":"ImageIdentifier"}, + "imageScanStatus":{"shape":"ImageScanStatus"} + } + }, "StartLifecyclePolicyPreviewRequest":{ "type":"structure", "required":["repositoryName"], @@ -1378,6 +1609,7 @@ }, "exception":true }, - "Url":{"type":"string"} + "Url":{"type":"string"}, + "VulnerabilitySourceUpdateTimestamp":{"type":"timestamp"} } } diff --git a/models/apis/ecr/2015-09-21/docs-2.json b/models/apis/ecr/2015-09-21/docs-2.json index c22a9022f6..4db02c356e 100644 --- a/models/apis/ecr/2015-09-21/docs-2.json +++ b/models/apis/ecr/2015-09-21/docs-2.json @@ -6,10 +6,11 @@ "BatchDeleteImage": "

Deletes a list of specified images within a specified repository. Images are specified with either imageTag or imageDigest.

You can remove a tag from an image by specifying the image's tag in your request. When you remove the last tag from an image, the image is deleted from your repository.

You can completely delete an image (and all of its tags) by specifying the image's digest in your request.

", "BatchGetImage": "

Gets detailed information for specified images within a specified repository. Images are specified with either imageTag or imageDigest.

", "CompleteLayerUpload": "

Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID. You can optionally provide a sha256 digest of the image layer for data validation purposes.

This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.

", - "CreateRepository": "

Creates an image repository.

", + "CreateRepository": "

Creates an Amazon Elastic Container Registry (Amazon ECR) repository, where users can push and pull Docker images. For more information, see Amazon ECR Repositories in the Amazon Elastic Container Registry User Guide.

", "DeleteLifecyclePolicy": "

Deletes the specified lifecycle policy.

", "DeleteRepository": "

Deletes an existing image repository. If a repository contains images, you must use the force option to delete it.

", "DeleteRepositoryPolicy": "

Deletes the repository policy from a specified repository.

", + "DescribeImageScanFindings": "

Describes the image scan findings for the specified image.

", "DescribeImages": "

Returns metadata about the images in a repository, including image size, image tags, and creation date.

Beginning with Docker version 1.9, the Docker client compresses image layers before pushing them to a V2 Docker registry. The output of the docker images command shows the uncompressed image size, so it may return a larger image size than the image sizes returned by DescribeImages.

", "DescribeRepositories": "

Describes image repositories in a registry.

", "GetAuthorizationToken": "

Retrieves a token that is valid for a specified registry for 12 hours. This command allows you to use the docker CLI to push and pull images with Amazon ECR. If you do not specify a registry, the default registry is assumed.

The authorizationToken returned for each registry specified is a base64 encoded string that can be decoded and used in a docker login command to authenticate to a registry. The AWS CLI offers an aws ecr get-login command that simplifies the login process.

", @@ -21,9 +22,11 @@ "ListImages": "

Lists all the image IDs for a given repository.

You can filter images based on whether or not they are tagged by setting the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter your results to return only UNTAGGED images and then pipe that result to a BatchDeleteImage operation to delete them. Or, you can filter your results to return only TAGGED images to list all of the tags in your repository.

", "ListTagsForResource": "

List the tags for an Amazon ECR resource.

", "PutImage": "

Creates or updates the image manifest and tags associated with an image.

This operation is used by the Amazon ECR proxy, and it is not intended for general use by customers for pulling and pushing images. In most cases, you should use the docker CLI to pull, tag, and push images.

", + "PutImageScanningConfiguration": "

Updates the image scanning configuration for a repository.

", "PutImageTagMutability": "

Updates the image tag mutability settings for a repository.

", "PutLifecyclePolicy": "

Creates or updates a lifecycle policy. For information about lifecycle policy syntax, see Lifecycle Policy Template.

", "SetRepositoryPolicy": "

Applies a repository policy on a specified repository to control access permissions. For more information, see Amazon ECR Repository Policies in the Amazon Elastic Container Registry User Guide.

", + "StartImageScan": "

Starts an image vulnerability scan.

", "StartLifecyclePolicyPreview": "

Starts a preview of the specified lifecycle policy. This allows you to see the results before creating the lifecycle policy.

", "TagResource": "

Adds specified tags to a resource with the specified ARN. Existing tags on a resource are not changed if they are not specified in the request parameters.

", "UntagResource": "

Deletes specified tags from a resource.

", @@ -39,6 +42,30 @@ "UntagResourceRequest$resourceArn": "

The Amazon Resource Name (ARN) of the resource from which to remove tags. Currently, the only supported resource is an Amazon ECR repository.

" } }, + "Attribute": { + "base": "

This data type is used in the ImageScanFinding data type.

", + "refs": { + "AttributeList$member": null + } + }, + "AttributeKey": { + "base": null, + "refs": { + "Attribute$key": "

The attribute key.

" + } + }, + "AttributeList": { + "base": null, + "refs": { + "ImageScanFinding$attributes": "

A collection of attributes of the host from which the finding is generated.

" + } + }, + "AttributeValue": { + "base": null, + "refs": { + "Attribute$value": "

The value assigned to the attribute key.

" + } + }, "AuthorizationData": { "base": "

An object representing authorization data for an Amazon ECR registry.

", "refs": { @@ -156,6 +183,16 @@ "refs": { } }, + "DescribeImageScanFindingsRequest": { + "base": null, + "refs": { + } + }, + "DescribeImageScanFindingsResponse": { + "base": null, + "refs": { + } + }, "DescribeImagesFilter": { "base": "

An object representing a filter on a DescribeImages operation.

", "refs": { @@ -217,6 +254,7 @@ "RepositoryNotEmptyException$message": "

The error message associated with the exception.

", "RepositoryNotFoundException$message": "

The error message associated with the exception.

", "RepositoryPolicyNotFoundException$message": "

The error message associated with the exception.

", + "ScanNotFoundException$message": null, "ServerException$message": "

The error message associated with the exception.

", "TooManyTagsException$message": null, "UploadNotFoundException$message": "

The error message associated with the exception.

" @@ -228,6 +266,32 @@ "AuthorizationData$expiresAt": "

The Unix time in seconds and milliseconds when the authorization token expires. Authorization tokens are valid for 12 hours.

" } }, + "FindingDescription": { + "base": null, + "refs": { + "ImageScanFinding$description": "

The description of the finding.

" + } + }, + "FindingName": { + "base": null, + "refs": { + "ImageScanFinding$name": "

The name associated with the finding, usually a CVE number.

" + } + }, + "FindingSeverity": { + "base": null, + "refs": { + "FindingSeverityCounts$key": null, + "ImageScanFinding$severity": "

The finding severity.

" + } + }, + "FindingSeverityCounts": { + "base": null, + "refs": { + "ImageScanFindings$findingSeverityCounts": "

The image vulnerability counts, sorted by severity.

", + "ImageScanFindingsSummary$findingSeverityCounts": "

The image vulnerability counts, sorted by severity.

" + } + }, "ForceFlag": { "base": null, "refs": { @@ -363,9 +427,13 @@ "ImageIdentifier": { "base": "

An object with identifying information for an Amazon ECR image.

", "refs": { + "DescribeImageScanFindingsRequest$imageId": null, + "DescribeImageScanFindingsResponse$imageId": null, "Image$imageId": "

An object containing the image tag and image digest associated with an image.

", "ImageFailure$imageId": "

The image ID associated with the failure.

", - "ImageIdentifierList$member": null + "ImageIdentifierList$member": null, + "StartImageScanRequest$imageId": null, + "StartImageScanResponse$imageId": null } }, "ImageIdentifierList": { @@ -397,6 +465,47 @@ "refs": { } }, + "ImageScanFinding": { + "base": "

Contains information about an image scan finding.

", + "refs": { + "ImageScanFindingList$member": null + } + }, + "ImageScanFindingList": { + "base": null, + "refs": { + "ImageScanFindings$findings": "

The findings from the image scan.

" + } + }, + "ImageScanFindings": { + "base": "

The details of an image scan.

", + "refs": { + "DescribeImageScanFindingsResponse$imageScanFindings": "

The information contained in the image scan findings.

" + } + }, + "ImageScanFindingsSummary": { + "base": "

A summary of the last completed image scan.

", + "refs": { + "ImageDetail$imageScanFindingsSummary": "

A summary of the last completed image scan.

" + } + }, + "ImageScanStatus": { + "base": "

The current status of an image scan.

", + "refs": { + "DescribeImageScanFindingsResponse$imageScanStatus": "

The current state of the scan.

", + "ImageDetail$imageScanStatus": "

The current state of the scan.

", + "StartImageScanResponse$imageScanStatus": "

The current state of the scan.

" + } + }, + "ImageScanningConfiguration": { + "base": "

The image scanning configuration for a repository.

", + "refs": { + "CreateRepositoryRequest$imageScanningConfiguration": "

The image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.

", + "PutImageScanningConfigurationRequest$imageScanningConfiguration": "

The image scanning configuration for the repository. This setting determines whether images are scanned for known vulnerabilities after being pushed to the repository.

", + "PutImageScanningConfigurationResponse$imageScanningConfiguration": "

The image scanning configuration setting for the repository.

", + "Repository$imageScanningConfiguration": null + } + }, "ImageSizeInBytes": { "base": null, "refs": { @@ -662,6 +771,7 @@ "MaxResults": { "base": null, "refs": { + "DescribeImageScanFindingsRequest$maxResults": "

The maximum number of image scan results returned by DescribeImageScanFindings in paginated output. When this parameter is used, DescribeImageScanFindings only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImageScanFindings request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImageScanFindings returns up to 100 results and a nextToken value, if applicable.

", "DescribeImagesRequest$maxResults": "

The maximum number of repository results returned by DescribeImages in paginated output. When this parameter is used, DescribeImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeImages returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify images with imageIds.

", "DescribeRepositoriesRequest$maxResults": "

The maximum number of repository results returned by DescribeRepositories in paginated output. When this parameter is used, DescribeRepositories only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another DescribeRepositories request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then DescribeRepositories returns up to 100 results and a nextToken value, if applicable. This option cannot be used when you specify repositories with repositoryNames.

", "ListImagesRequest$maxResults": "

The maximum number of image results returned by ListImages in paginated output. When this parameter is used, ListImages only returns maxResults results in a single page along with a nextToken response element. The remaining results of the initial request can be seen by sending another ListImages request with the returned nextToken value. This value can be between 1 and 1000. If this parameter is not used, then ListImages returns up to 100 results and a nextToken value, if applicable.

" @@ -683,6 +793,8 @@ "NextToken": { "base": null, "refs": { + "DescribeImageScanFindingsRequest$nextToken": "

The nextToken value returned from a previous paginated DescribeImageScanFindings request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return.

", + "DescribeImageScanFindingsResponse$nextToken": "

The nextToken value to include in a future DescribeImageScanFindings request. When the results of a DescribeImageScanFindings request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

", "DescribeImagesRequest$nextToken": "

The nextToken value returned from a previous paginated DescribeImages request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify images with imageIds.

", "DescribeImagesResponse$nextToken": "

The nextToken value to include in a future DescribeImages request. When the results of a DescribeImages request exceed maxResults, this value can be used to retrieve the next page of results. This value is null when there are no more results to return.

", "DescribeRepositoriesRequest$nextToken": "

The nextToken value returned from a previous paginated DescribeRepositories request where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This option cannot be used when you specify repositories with repositoryNames.

This token should be treated as an opaque identifier that is only used to retrieve the next items in a list and not for other programmatic purposes.

", @@ -726,6 +838,16 @@ "refs": { } }, + "PutImageScanningConfigurationRequest": { + "base": null, + "refs": { + } + }, + "PutImageScanningConfigurationResponse": { + "base": null, + "refs": { + } + }, "PutImageTagMutabilityRequest": { "base": null, "refs": { @@ -759,6 +881,8 @@ "DeleteRepositoryPolicyRequest$registryId": "

The AWS account ID associated with the registry that contains the repository policy to delete. If you do not specify a registry, the default registry is assumed.

", "DeleteRepositoryPolicyResponse$registryId": "

The registry ID associated with the request.

", "DeleteRepositoryRequest$registryId": "

The AWS account ID associated with the registry that contains the repository to delete. If you do not specify a registry, the default registry is assumed.

", + "DescribeImageScanFindingsRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed.

", + "DescribeImageScanFindingsResponse$registryId": "

The registry ID associated with the request.

", "DescribeImagesRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to describe images. If you do not specify a registry, the default registry is assumed.

", "DescribeRepositoriesRequest$registryId": "

The AWS account ID associated with the registry that contains the repositories to be described. If you do not specify a registry, the default registry is assumed.

", "GetAuthorizationTokenRegistryIdList$member": null, @@ -775,6 +899,8 @@ "InvalidLayerPartException$registryId": "

The registry ID associated with the exception.

", "ListImagesRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to list images. If you do not specify a registry, the default registry is assumed.

", "PutImageRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to put the image. If you do not specify a registry, the default registry is assumed.

", + "PutImageScanningConfigurationRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to update the image scanning configuration setting. If you do not specify a registry, the default registry is assumed.

", + "PutImageScanningConfigurationResponse$registryId": "

The registry ID associated with the request.

", "PutImageTagMutabilityRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to update the image tag mutability settings. If you do not specify a registry, the default registry is assumed.

", "PutImageTagMutabilityResponse$registryId": "

The registry ID associated with the request.

", "PutLifecyclePolicyRequest$registryId": "

The AWS account ID associated with the registry that contains the repository. If you do
 not specify a registry, the default registry is assumed.

", @@ -782,6 +908,8 @@ "Repository$registryId": "

The AWS account ID associated with the registry that contains the repository.

", "SetRepositoryPolicyRequest$registryId": "

The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.

", "SetRepositoryPolicyResponse$registryId": "

The registry ID associated with the request.

", + "StartImageScanRequest$registryId": "

The AWS account ID associated with the registry that contains the repository in which to start an image scan request. If you do not specify a registry, the default registry is assumed.

", + "StartImageScanResponse$registryId": "

The registry ID associated with the request.

", "StartLifecyclePolicyPreviewRequest$registryId": "

The AWS account ID associated with the registry that contains the repository. If you do not specify a registry, the default registry is assumed.

", "StartLifecyclePolicyPreviewResponse$registryId": "

The registry ID associated with the request.

", "UploadLayerPartRequest$registryId": "

The AWS account ID associated with the registry to which you are uploading layer parts. If you do not specify a registry, the default registry is assumed.

", @@ -821,6 +949,8 @@ "DeleteRepositoryPolicyRequest$repositoryName": "

The name of the repository that is associated with the repository policy to delete.

", "DeleteRepositoryPolicyResponse$repositoryName": "

The repository name associated with the request.

", "DeleteRepositoryRequest$repositoryName": "

The name of the repository to delete.

", + "DescribeImageScanFindingsRequest$repositoryName": "

The repository for the image for which to describe the scan findings.

", + "DescribeImageScanFindingsResponse$repositoryName": "

The repository name associated with the request.

", "DescribeImagesRequest$repositoryName": "

The repository that contains the images to describe.

", "GetDownloadUrlForLayerRequest$repositoryName": "

The name of the repository that is associated with the image layer to download.

", "GetLifecyclePolicyPreviewRequest$repositoryName": "

The name of the repository.

", @@ -835,6 +965,8 @@ "InvalidLayerPartException$repositoryName": "

The repository name associated with the exception.

", "ListImagesRequest$repositoryName": "

The repository with image IDs to be listed.

", "PutImageRequest$repositoryName": "

The name of the repository in which to put the image.

", + "PutImageScanningConfigurationRequest$repositoryName": "

The name of the repository in which to update the image scanning configuration setting.

", + "PutImageScanningConfigurationResponse$repositoryName": "

The repository name associated with the request.

", "PutImageTagMutabilityRequest$repositoryName": "

The name of the repository in which to update the image tag mutability settings.

", "PutImageTagMutabilityResponse$repositoryName": "

The repository name associated with the request.

", "PutLifecyclePolicyRequest$repositoryName": "

The name of the repository to receive the policy.

", @@ -843,6 +975,8 @@ "RepositoryNameList$member": null, "SetRepositoryPolicyRequest$repositoryName": "

The name of the repository to receive the policy.

", "SetRepositoryPolicyResponse$repositoryName": "

The repository name associated with the request.

", + "StartImageScanRequest$repositoryName": "

The name of the repository that contains the images to scan.

", + "StartImageScanResponse$repositoryName": "

The repository name associated with the request.

", "StartLifecyclePolicyPreviewRequest$repositoryName": "

The name of the repository to be evaluated.

", "StartLifecyclePolicyPreviewResponse$repositoryName": "

The repository name associated with the request.

", "UploadLayerPartRequest$repositoryName": "

The name of the repository to which you are uploading layer parts.

", @@ -879,6 +1013,36 @@ "SetRepositoryPolicyResponse$policyText": "

The JSON repository policy text applied to the repository.

" } }, + "ScanNotFoundException": { + "base": "

The specified image scan could not be found. Ensure that image scanning is enabled on the repository and try again.

", + "refs": { + } + }, + "ScanOnPushFlag": { + "base": null, + "refs": { + "ImageScanningConfiguration$scanOnPush": "

The setting that determines whether images are scanned after being pushed to a repository. If set to true, images will be scanned after being pushed. If this parameter is not specified, it will default to false and images will not be scanned unless a scan is manually started with the StartImageScan API.

" + } + }, + "ScanStatus": { + "base": null, + "refs": { + "ImageScanStatus$status": "

The current state of an image scan.

" + } + }, + "ScanStatusDescription": { + "base": null, + "refs": { + "ImageScanStatus$description": "

The description of the image scan status.

" + } + }, + "ScanTimestamp": { + "base": null, + "refs": { + "ImageScanFindings$imageScanCompletedAt": "

The time of the last completed image scan.

", + "ImageScanFindingsSummary$imageScanCompletedAt": "

The time of the last completed image scan.

" + } + }, "ServerException": { "base": "

These errors are usually caused by a server-side issue.

", "refs": { @@ -894,6 +1058,22 @@ "refs": { } }, + "SeverityCount": { + "base": null, + "refs": { + "FindingSeverityCounts$value": null + } + }, + "StartImageScanRequest": { + "base": null, + "refs": { + } + }, + "StartImageScanResponse": { + "base": null, + "refs": { + } + }, "StartLifecyclePolicyPreviewRequest": { "base": null, "refs": { @@ -1000,8 +1180,16 @@ "base": null, "refs": { "GetDownloadUrlForLayerResponse$downloadUrl": "

The pre-signed Amazon S3 download URL for the requested layer.

", + "ImageScanFinding$uri": "

A link containing additional details about the security vulnerability.

", "Repository$repositoryUri": "

The URI for the repository. You can use this URI for Docker push or pull operations.

" } + }, + "VulnerabilitySourceUpdateTimestamp": { + "base": null, + "refs": { + "ImageScanFindings$vulnerabilitySourceUpdatedAt": "

The time when the vulnerability data was last scanned.

", + "ImageScanFindingsSummary$vulnerabilitySourceUpdatedAt": "

The time when the vulnerability data was last scanned.

" + } } } } diff --git a/models/apis/ecr/2015-09-21/paginators-1.json b/models/apis/ecr/2015-09-21/paginators-1.json index f7a7f102dd..f1b8848847 100644 --- a/models/apis/ecr/2015-09-21/paginators-1.json +++ b/models/apis/ecr/2015-09-21/paginators-1.json @@ -1,5 +1,18 @@ { "pagination": { + "DescribeImageScanFindings": { + "input_token": "nextToken", + "limit_key": "maxResults", + "non_aggregate_keys": [ + "registryId", + "repositoryName", + "imageId", + "imageScanStatus", + "imageScanFindings" + ], + "output_token": "nextToken", + "result_key": "imageScanFindings.findings" + }, "DescribeImages": { "input_token": "nextToken", "limit_key": "maxResults", @@ -12,6 +25,19 @@ "output_token": "nextToken", "result_key": "repositories" }, + "GetLifecyclePolicyPreview": { + "input_token": "nextToken", + "limit_key": "maxResults", + "non_aggregate_keys": [ + "registryId", + "repositoryName", + "lifecyclePolicyText", + "status", + "summary" + ], + "output_token": "nextToken", + "result_key": "previewResults" + }, "ListImages": { "input_token": "nextToken", "limit_key": "maxResults", diff --git a/models/apis/elasticache/2015-02-02/api-2.json b/models/apis/elasticache/2015-02-02/api-2.json index 6299555de6..caa53b3407 100644 --- a/models/apis/elasticache/2015-02-02/api-2.json +++ b/models/apis/elasticache/2015-02-02/api-2.json @@ -80,6 +80,23 @@ {"shape":"InvalidParameterValueException"} ] }, + "CompleteMigration":{ + "name":"CompleteMigration", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"CompleteMigrationMessage"}, + "output":{ + "shape":"CompleteMigrationResponse", + "resultWrapper":"CompleteMigrationResult" + }, + "errors":[ + {"shape":"ReplicationGroupNotFoundFault"}, + {"shape":"InvalidReplicationGroupStateFault"}, + {"shape":"ReplicationGroupNotUnderMigrationFault"} + ] + }, "CopySnapshot":{ "name":"CopySnapshot", "http":{ @@ -854,6 +871,24 @@ {"shape":"InvalidParameterCombinationException"} ] }, + "StartMigration":{ + "name":"StartMigration", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"StartMigrationMessage"}, + "output":{ + "shape":"StartMigrationResponse", + "resultWrapper":"StartMigrationResult" + }, + "errors":[ + {"shape":"ReplicationGroupNotFoundFault"}, + {"shape":"InvalidReplicationGroupStateFault"}, + {"shape":"ReplicationGroupAlreadyUnderMigrationFault"}, + {"shape":"InvalidParameterValueException"} + ] + }, "TestFailover":{ "name":"TestFailover", "http":{ @@ -1443,6 +1478,20 @@ }, "exception":true }, + "CompleteMigrationMessage":{ + "type":"structure", + "required":["ReplicationGroupId"], + "members":{ + "ReplicationGroupId":{"shape":"String"}, + "Force":{"shape":"Boolean"} + } + }, + "CompleteMigrationResponse":{ + "type":"structure", + "members":{ + "ReplicationGroup":{"shape":"ReplicationGroup"} + } + }, "ConfigureShard":{ "type":"structure", "required":[ @@ -1624,6 +1673,17 @@ "Snapshot":{"shape":"Snapshot"} } }, + "CustomerNodeEndpoint":{ + "type":"structure", + "members":{ + "Address":{"shape":"String"}, + "Port":{"shape":"IntegerOptional"} + } + }, + "CustomerNodeEndpointList":{ + "type":"list", + "member":{"shape":"CustomerNodeEndpoint"} + }, "DecreaseReplicaCountMessage":{ "type":"structure", "required":[ @@ -2588,6 +2648,17 @@ }, "exception":true }, + "ReplicationGroupAlreadyUnderMigrationFault":{ + "type":"structure", + "members":{ + }, + "error":{ + "code":"ReplicationGroupAlreadyUnderMigrationFault", + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, "ReplicationGroupIdList":{ "type":"list", "member":{"shape":"String"}, @@ -2618,6 +2689,17 @@ }, "exception":true }, + "ReplicationGroupNotUnderMigrationFault":{ + "type":"structure", + "members":{ + }, + "error":{ + "code":"ReplicationGroupNotUnderMigrationFault", + "httpStatusCode":400, + "senderFault":true + }, + "exception":true + }, "ReplicationGroupPendingModifiedValues":{ "type":"structure", "members":{ @@ -2989,6 +3071,23 @@ "replication-group" ] }, + "StartMigrationMessage":{ + "type":"structure", + "required":[ + "ReplicationGroupId", + "CustomerNodeEndpointList" + ], + "members":{ + "ReplicationGroupId":{"shape":"String"}, + "CustomerNodeEndpointList":{"shape":"CustomerNodeEndpointList"} + } + }, + "StartMigrationResponse":{ + "type":"structure", + "members":{ + "ReplicationGroup":{"shape":"ReplicationGroup"} + } + }, "String":{"type":"string"}, "Subnet":{ "type":"structure", diff --git a/models/apis/elasticache/2015-02-02/docs-2.json b/models/apis/elasticache/2015-02-02/docs-2.json index 13b6080648..ceeb269758 100644 --- a/models/apis/elasticache/2015-02-02/docs-2.json +++ b/models/apis/elasticache/2015-02-02/docs-2.json @@ -6,6 +6,7 @@ "AuthorizeCacheSecurityGroupIngress": "

Allows network ingress to a cache security group. Applications using ElastiCache must be running on Amazon EC2, and Amazon EC2 security groups are used as the authorization mechanism.

You cannot authorize ingress from an Amazon EC2 security group in one region to an ElastiCache cluster in another region.

", "BatchApplyUpdateAction": "

Apply the service update. For more information on service updates and applying them, see Applying Service Updates.

", "BatchStopUpdateAction": "

Stop the service update. For more information on service updates and stopping them, see Stopping Service Updates.

", + "CompleteMigration": "

Complete the migration of data.

", "CopySnapshot": "

Makes a copy of an existing snapshot.

This operation is valid for Redis only.

Users or groups that have permissions to use the CopySnapshot operation can create their own Amazon S3 buckets and copy snapshots to it. To control access to your snapshots, use an IAM policy to control who has the ability to use the CopySnapshot operation. For more information about using IAM to control the use of ElastiCache operations, see Exporting Snapshots and Authentication & Access Control.

You could receive the following error messages.

Error Messages

", "CreateCacheCluster": "

Creates a cluster. All nodes in the cluster run the same protocol-compliant cache engine software, either Memcached or Redis.

This operation is not supported for Redis (cluster mode enabled) clusters.

", "CreateCacheParameterGroup": "

Creates a new Amazon ElastiCache cache parameter group. An ElastiCache cache parameter group is a collection of parameters and their values that are applied to all of the nodes in any cluster or replication group using the CacheParameterGroup.

A newly created CacheParameterGroup is an exact duplicate of the default parameter group for the CacheParameterGroupFamily. To customize the newly created CacheParameterGroup you can change the values of specific parameters. For more information, see:

", @@ -47,6 +48,7 @@ "RemoveTagsFromResource": "

Removes the tags identified by the TagKeys list from the named resource.

", "ResetCacheParameterGroup": "

Modifies the parameters of a cache parameter group to the engine or system default value. You can reset specific parameters by submitting a list of parameter names. To reset the entire cache parameter group, specify the ResetAllParameters and CacheParameterGroupName parameters.

", "RevokeCacheSecurityGroupIngress": "

Revokes ingress from a cache security group. Use this operation to disallow access from an Amazon EC2 security group that had been previously authorized.

", + "StartMigration": "

Start the migration of data.

", "TestFailover": "

Represents the input of a TestFailover operation which test automatic failover on a specified node group (called shard in the console) in a replication group (called cluster in the console).

Note the following

Also see, Testing Multi-AZ with Automatic Failover in the ElastiCache User Guide.

" }, "shapes": { @@ -146,6 +148,7 @@ "refs": { "CacheCluster$AutoMinorVersionUpgrade": "

This parameter is currently disabled.

", "CacheNodeTypeSpecificParameter$IsModifiable": "

Indicates whether (true) or not (false) the parameter can be modified. Some parameters have security or operational implications that prevent them from being changed.

", + "CompleteMigrationMessage$Force": "

Forces the migration to stop without ensuring that data is in sync. It is recommended to use this option only to abort the migration and not recommended when application wants to continue migration to ElastiCache.

", "DecreaseReplicaCountMessage$ApplyImmediately": "

If True, the number of replica nodes is decreased immediately. ApplyImmediately=False is not currently supported.

", "DescribeCacheEngineVersionsMessage$DefaultOnly": "

If true, specifies that only the default version of the specified engine or engine and major version combination is to be returned.

", "IncreaseReplicaCountMessage$ApplyImmediately": "

If True, the number of replica nodes is increased immediately. ApplyImmediately=False is not currently supported.

", @@ -464,6 +467,16 @@ "refs": { } }, + "CompleteMigrationMessage": { + "base": null, + "refs": { + } + }, + "CompleteMigrationResponse": { + "base": null, + "refs": { + } + }, "ConfigureShard": { "base": "

Node group (shard) configuration options when adding or removing replicas. Each node group (shard) configuration has the following members: NodeGroupId, NewReplicaCount, and PreferredAvailabilityZones.

", "refs": { @@ -540,6 +553,18 @@ "refs": { } }, + "CustomerNodeEndpoint": { + "base": "

The endpoint from which data should be migrated.

", + "refs": { + "CustomerNodeEndpointList$member": null + } + }, + "CustomerNodeEndpointList": { + "base": null, + "refs": { + "StartMigrationMessage$CustomerNodeEndpointList": "

List of endpoints from which data should be migrated. For Redis (cluster mode disabled), list should have only one element.

" + } + }, "DecreaseReplicaCountMessage": { "base": null, "refs": { @@ -771,6 +796,7 @@ "CreateReplicationGroupMessage$ReplicasPerNodeGroup": "

An optional parameter that specifies the number of replica nodes in each node group (shard). Valid values are 0 to 5.

", "CreateReplicationGroupMessage$Port": "

The port number on which each member of the replication group accepts connections.

", "CreateReplicationGroupMessage$SnapshotRetentionLimit": "

The number of days for which ElastiCache retains automatic snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, a snapshot that was taken today is retained for 5 days before being deleted.

Default: 0 (i.e., automatic backups are disabled for this cluster).

", + "CustomerNodeEndpoint$Port": "

The port of the node endpoint

", "DecreaseReplicaCountMessage$NewReplicaCount": "

The number of read replica nodes you want at the completion of this operation. For Redis (cluster mode disabled) replication groups, this is the number of replica nodes in the replication group. For Redis (cluster mode enabled) replication groups, this is the number of replica nodes in each of the replication group's node groups.

The minimum number of replicas in a shard or replication group is:

", "DescribeCacheClustersMessage$MaxRecords": "

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: minimum 20; maximum 100.

", "DescribeCacheEngineVersionsMessage$MaxRecords": "

The maximum number of records to include in the response. If more records exist than the specified MaxRecords value, a marker is included in the response so that the remaining results can be retrieved.

Default: 100

Constraints: minimum 20; maximum 100.

", @@ -1166,6 +1192,7 @@ "ReplicationGroup": { "base": "

Contains all of the attributes of a specific Redis replication group.

", "refs": { + "CompleteMigrationResponse$ReplicationGroup": null, "CreateReplicationGroupResult$ReplicationGroup": null, "DecreaseReplicaCountResult$ReplicationGroup": null, "DeleteReplicationGroupResult$ReplicationGroup": null, @@ -1173,6 +1200,7 @@ "ModifyReplicationGroupResult$ReplicationGroup": null, "ModifyReplicationGroupShardConfigurationResult$ReplicationGroup": null, "ReplicationGroupList$member": null, + "StartMigrationResponse$ReplicationGroup": null, "TestFailoverResult$ReplicationGroup": null } }, @@ -1181,6 +1209,11 @@ "refs": { } }, + "ReplicationGroupAlreadyUnderMigrationFault": { + "base": "

The targeted replication group is not available.

", + "refs": { + } + }, "ReplicationGroupIdList": { "base": null, "refs": { @@ -1205,6 +1238,11 @@ "refs": { } }, + "ReplicationGroupNotUnderMigrationFault": { + "base": "

The designated replication group is not available for data migration.

", + "refs": { + } + }, "ReplicationGroupPendingModifiedValues": { "base": "

The settings to be applied to the Redis replication group, either immediately or during the next maintenance window.

", "refs": { @@ -1437,6 +1475,16 @@ "Event$SourceType": "

Specifies the origin of this event - a cluster, a parameter group, a security group, etc.

" } }, + "StartMigrationMessage": { + "base": null, + "refs": { + } + }, + "StartMigrationResponse": { + "base": null, + "refs": { + } + }, "String": { "base": null, "refs": { @@ -1502,6 +1550,7 @@ "CacheSubnetGroup$VpcId": "

The Amazon Virtual Private Cloud identifier (VPC ID) of the cache subnet group.

", "CacheSubnetGroupMessage$Marker": "

Provides an identifier to allow retrieval of paginated results.

", "ClusterIdList$member": null, + "CompleteMigrationMessage$ReplicationGroupId": "

The ID of the replication group to which data is being migrated.

", "CopySnapshotMessage$SourceSnapshotName": "

The name of an existing snapshot from which to make a copy.

", "CopySnapshotMessage$TargetSnapshotName": "

A name for the snapshot copy. ElastiCache does not permit overwriting a snapshot, therefore this name must be unique within its context - ElastiCache or an Amazon S3 bucket if exporting.

", "CopySnapshotMessage$TargetBucket": "

The Amazon S3 bucket to which the snapshot is exported. This parameter is used only when exporting a snapshot for external access.

When using this parameter to export a snapshot, be sure Amazon ElastiCache has the needed permissions to this S3 bucket. For more information, see Step 2: Grant ElastiCache Access to Your Amazon S3 Bucket in the Amazon ElastiCache User Guide.

For more information, see Exporting a Snapshot in the Amazon ElastiCache User Guide.

", @@ -1544,6 +1593,7 @@ "CreateSnapshotMessage$CacheClusterId": "

The identifier of an existing cluster. The snapshot is created from this cluster.

", "CreateSnapshotMessage$SnapshotName": "

A name for the snapshot being created.

", "CreateSnapshotMessage$KmsKeyId": "

The ID of the KMS key used to encrypt the snapshot.

", + "CustomerNodeEndpoint$Address": "

The address of the node endpoint

", "DecreaseReplicaCountMessage$ReplicationGroupId": "

The id of the replication group from which you want to remove replica nodes.

", "DeleteCacheClusterMessage$CacheClusterId": "

The cluster identifier for the cluster to be deleted. This parameter is not case sensitive.

", "DeleteCacheClusterMessage$FinalSnapshotIdentifier": "

The user-supplied name of a final cluster snapshot. This is the unique name that identifies the snapshot. ElastiCache creates the snapshot, and then deletes the cluster immediately afterward.

", @@ -1730,6 +1780,7 @@ "Snapshot$SnapshotWindow": "

The daily time range during which ElastiCache takes daily snapshots of the source cluster.

", "Snapshot$KmsKeyId": "

The ID of the KMS key used to encrypt the snapshot.

", "SnapshotArnsList$member": null, + "StartMigrationMessage$ReplicationGroupId": "

The ID of the replication group to which data should be migrated.

", "Subnet$SubnetIdentifier": "

The unique identifier for the subnet.

", "SubnetIdentifierList$member": null, "Tag$Key": "

The key for the tag. May not be null.

", diff --git a/models/apis/transfer/2018-11-05/api-2.json b/models/apis/transfer/2018-11-05/api-2.json index afb7d0b004..b13871c888 100644 --- a/models/apis/transfer/2018-11-05/api-2.json +++ b/models/apis/transfer/2018-11-05/api-2.json @@ -70,7 +70,8 @@ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, {"shape":"InvalidRequestException"}, - {"shape":"ResourceNotFoundException"} + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} ] }, "DeleteUser":{ @@ -130,7 +131,8 @@ {"shape":"InternalServiceError"}, {"shape":"InvalidRequestException"}, {"shape":"ResourceExistsException"}, - {"shape":"ResourceNotFoundException"} + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} ] }, "ListServers":{ @@ -190,7 +192,8 @@ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, {"shape":"InvalidRequestException"}, - {"shape":"ResourceNotFoundException"} + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} ] }, "StopServer":{ @@ -204,7 +207,8 @@ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, {"shape":"InvalidRequestException"}, - {"shape":"ResourceNotFoundException"} + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} ] }, "TagResource":{ @@ -217,7 +221,8 @@ "errors":[ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, - {"shape":"InvalidRequestException"} + {"shape":"InvalidRequestException"}, + {"shape":"ResourceNotFoundException"} ] }, "TestIdentityProvider":{ @@ -245,7 +250,8 @@ "errors":[ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, - {"shape":"InvalidRequestException"} + {"shape":"InvalidRequestException"}, + {"shape":"ResourceNotFoundException"} ] }, "UpdateServer":{ @@ -260,7 +266,9 @@ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, {"shape":"InvalidRequestException"}, - {"shape":"ResourceNotFoundException"} + {"shape":"ResourceExistsException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} ] }, "UpdateUser":{ @@ -275,7 +283,8 @@ {"shape":"ServiceUnavailableException"}, {"shape":"InternalServiceError"}, {"shape":"InvalidRequestException"}, - {"shape":"ResourceNotFoundException"} + {"shape":"ResourceNotFoundException"}, + {"shape":"ThrottlingException"} ] } }, @@ -283,7 +292,8 @@ "Arn":{ "type":"string", "max":1600, - "min":20 + "min":20, + "pattern":"arn:.*" }, "CreateServerRequest":{ "type":"structure", @@ -313,6 +323,8 @@ ], "members":{ "HomeDirectory":{"shape":"HomeDirectory"}, + "HomeDirectoryType":{"shape":"HomeDirectoryType"}, + "HomeDirectoryMappings":{"shape":"HomeDirectoryMappings"}, "Policy":{"shape":"Policy"}, "Role":{"shape":"Role"}, "ServerId":{"shape":"ServerId"}, @@ -423,6 +435,8 @@ "members":{ "Arn":{"shape":"Arn"}, "HomeDirectory":{"shape":"HomeDirectory"}, + "HomeDirectoryMappings":{"shape":"HomeDirectoryMappings"}, + "HomeDirectoryType":{"shape":"HomeDirectoryType"}, "Policy":{"shape":"Policy"}, "Role":{"shape":"Role"}, "SshPublicKeys":{"shape":"SshPublicKeys"}, @@ -448,6 +462,30 @@ "max":1024, "pattern":"^$|/.*" }, + "HomeDirectoryMapEntry":{ + "type":"structure", + "required":[ + "Entry", + "Target" + ], + "members":{ + "Entry":{"shape":"MapEntry"}, + "Target":{"shape":"MapTarget"} + } + }, + "HomeDirectoryMappings":{ + "type":"list", + "member":{"shape":"HomeDirectoryMapEntry"}, + "max":50, + "min":1 + }, + "HomeDirectoryType":{ + "type":"string", + "enum":[ + "PATH", + "LOGICAL" + ] + }, "HostKey":{ "type":"string", "max":4096, @@ -595,6 +633,7 @@ "members":{ "Arn":{"shape":"Arn"}, "HomeDirectory":{"shape":"HomeDirectory"}, + "HomeDirectoryType":{"shape":"HomeDirectoryType"}, "Role":{"shape":"Role"}, "SshPublicKeyCount":{"shape":"SshPublicKeyCount"}, "UserName":{"shape":"UserName"} @@ -604,6 +643,16 @@ "type":"list", "member":{"shape":"ListedUser"} }, + "MapEntry":{ + "type":"string", + "max":1024, + "pattern":"^/.*" + }, + "MapTarget":{ + "type":"string", + "max":1024, + "pattern":"^/.*" + }, "MaxResults":{ "type":"integer", "max":1000, @@ -617,9 +666,13 @@ }, "NullableRole":{ "type":"string", + "max":2048, "pattern":"^$|arn:.*role/.*" }, - "Policy":{"type":"string"}, + "Policy":{ + "type":"string", + "max":2048 + }, "Resource":{"type":"string"}, "ResourceExistsException":{ "type":"structure", @@ -651,12 +704,17 @@ }, "ResourceType":{"type":"string"}, "Response":{"type":"string"}, + "RetryAfterSeconds":{"type":"string"}, "Role":{ "type":"string", + "max":2048, + "min":20, "pattern":"arn:.*role/.*" }, "ServerId":{ "type":"string", + "max":19, + "min":19, "pattern":"^s-([0-9a-f]{17})$" }, "ServiceErrorMessage":{"type":"string"}, @@ -690,6 +748,8 @@ "SshPublicKeyCount":{"type":"integer"}, "SshPublicKeyId":{ "type":"string", + "max":21, + "min":21, "pattern":"^key-[0-9a-f]{17}$" }, "SshPublicKeys":{ @@ -734,7 +794,10 @@ "Value":{"shape":"TagValue"} } }, - "TagKey":{"type":"string"}, + "TagKey":{ + "type":"string", + "max":128 + }, "TagKeys":{ "type":"list", "member":{"shape":"TagKey"}, @@ -752,7 +815,10 @@ "Tags":{"shape":"Tags"} } }, - "TagValue":{"type":"string"}, + "TagValue":{ + "type":"string", + "max":256 + }, "Tags":{ "type":"list", "member":{"shape":"Tag"}, @@ -784,6 +850,13 @@ "Url":{"shape":"Url"} } }, + "ThrottlingException":{ + "type":"structure", + "members":{ + "RetryAfterSeconds":{"shape":"RetryAfterSeconds"} + }, + "exception":true + }, "UntagResourceRequest":{ "type":"structure", "required":[ @@ -822,6 +895,8 @@ ], "members":{ "HomeDirectory":{"shape":"HomeDirectory"}, + "HomeDirectoryType":{"shape":"HomeDirectoryType"}, + "HomeDirectoryMappings":{"shape":"HomeDirectoryMappings"}, "Policy":{"shape":"Policy"}, "Role":{"shape":"Role"}, "ServerId":{"shape":"ServerId"}, @@ -839,18 +914,26 @@ "UserName":{"shape":"UserName"} } }, - "Url":{"type":"string"}, + "Url":{ + "type":"string", + "max":255 + }, "UserCount":{"type":"integer"}, "UserName":{ "type":"string", + "max":32, + "min":3, "pattern":"^[a-zA-Z0-9_][a-zA-Z0-9_-]{2,31}$" }, "UserPassword":{ "type":"string", + "max":2048, "sensitive":true }, "VpcEndpointId":{ "type":"string", + "max":22, + "min":22, "pattern":"^vpce-[0-9a-f]{17}$" } } diff --git a/models/apis/transfer/2018-11-05/docs-2.json b/models/apis/transfer/2018-11-05/docs-2.json index 2c2cbb8540..f3ae0f4704 100644 --- a/models/apis/transfer/2018-11-05/docs-2.json +++ b/models/apis/transfer/2018-11-05/docs-2.json @@ -128,16 +128,39 @@ "HomeDirectory": { "base": null, "refs": { - "CreateUserRequest$HomeDirectory": "

The landing directory (folder) for a user when they log in to the server using their SFTP client. An example is /home/username .

", - "DescribedUser$HomeDirectory": "

This property specifies the landing directory (or folder), which is the location that files are written to or read from in an Amazon S3 bucket for the described user. An example is /bucket_name/home/username .

", + "CreateUserRequest$HomeDirectory": "

The landing directory (folder) for a user when they log in to the server using their SFTP client.

An example is <your-Amazon-S3-bucket-name>/home/username.

", + "DescribedUser$HomeDirectory": "

This property specifies the landing directory (or folder), which is the location that files are written to or read from in an Amazon S3 bucket for the described user. An example is /your s3 bucket name/home/username .

", "ListedUser$HomeDirectory": "

This value specifies the location that files are written to or read from an Amazon S3 bucket for the user you specify by their ARN.

", - "UpdateUserRequest$HomeDirectory": "

A parameter that specifies the landing directory (folder) for a user when they log in to the server using their client. An example is /home/username .

" + "UpdateUserRequest$HomeDirectory": "

A parameter that specifies the landing directory (folder) for a user when they log in to the server using their client.

An example is <your-Amazon-S3-bucket-name>/home/username.

" + } + }, + "HomeDirectoryMapEntry": { + "base": "

Represents an object that contains entries and a targets for HomeDirectoryMappings.

", + "refs": { + "HomeDirectoryMappings$member": null + } + }, + "HomeDirectoryMappings": { + "base": null, + "refs": { + "CreateUserRequest$HomeDirectoryMappings": "

Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. You will need to specify the \"Entry\" and \"Target\" pair, where Entry shows how the path is made visible and Target is the actual S3 path. If you only specify a target, it will be displayed as is. You will need to also make sure that your AWS IAM Role provides access to paths in Target. The following is an example.

'[ \"/bucket2/documentation\", { \"Entry\": \"your-personal-report.pdf\", \"Target\": \"/bucket3/customized-reports/${transfer:UserName}.pdf\" } ]'

In most cases, you can use this value instead of the scope down policy to lock your user down to the designated home directory (\"chroot\"). To do this, you can set Entry to '/' and set Target to the HomeDirectory parameter value.

", + "DescribedUser$HomeDirectoryMappings": "

Logical directory mappings that you specified for what S3 paths and keys should be visible to your user and how you want to make them visible. You will need to specify the \"Entry\" and \"Target\" pair, where Entry shows how the path is made visible and Target is the actual S3 path. If you only specify a target, it will be displayed as is. You will need to also make sure that your AWS IAM Role provides access to paths in Target.

In most cases, you can use this value instead of the scope down policy to lock your user down to the designated home directory (\"chroot\"). To do this, you can set Entry to '/' and set Target to the HomeDirectory parameter value.

In most cases, you can use this value instead of the scope down policy to lock your user down to the designated home directory (\"chroot\"). To do this, you can set Entry to '/' and set Target to the HomeDirectory parameter value.

", + "UpdateUserRequest$HomeDirectoryMappings": "

Logical directory mappings that specify what S3 paths and keys should be visible to your user and how you want to make them visible. You will need to specify the \"Entry\" and \"Target\" pair, where Entry shows how the path is made visible and Target is the actual S3 path. If you only specify a target, it will be displayed as is. You will need to also make sure that your AWS IAM Role provides access to paths in Target. The following is an example.

'[ \"/bucket2/documentation\", { \"Entry\": \"your-personal-report.pdf\", \"Target\": \"/bucket3/customized-reports/${transfer:UserName}.pdf\" } ]'

In most cases, you can use this value instead of the scope down policy to lock your user down to the designated home directory (\"chroot\"). To do this, you can set Entry to '/' and set Target to the HomeDirectory parameter value.

" + } + }, + "HomeDirectoryType": { + "base": null, + "refs": { + "CreateUserRequest$HomeDirectoryType": "

The type of landing directory (folder) you want your users' home directory to be when they log into the SFTP server. If you set it to PATH, the user will see the absolute Amazon S3 bucket paths as is in their SFTP clients. If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings for how you want to make S3 paths visible to your user.

", + "DescribedUser$HomeDirectoryType": "

The type of landing directory (folder) you mapped for your users' to see when they log into the SFTP server. If you set it to PATH, the user will see the absolute Amazon S3 bucket paths as is in their SFTP clients. If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings for how you want to make S3 paths visible to your user.

", + "ListedUser$HomeDirectoryType": "

The type of landing directory (folder) you mapped for your users' home directory. If you set it to PATH, the user will see the absolute Amazon S3 bucket paths as is in their SFTP clients. If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings for how you want to make S3 paths visible to your user.

", + "UpdateUserRequest$HomeDirectoryType": "

The type of landing directory (folder) you want your users' home directory to be when they log into the SFTP serve. If you set it to PATH, the user will see the absolute Amazon S3 bucket paths as is in their SFTP clients. If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings for how you want to make S3 paths visible to your user.

" } }, "HostKey": { "base": null, "refs": { - "CreateServerRequest$HostKey": "

The RSA private key as generated by the ssh-keygen -N \"\" -f my-new-server-key command.

If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't update the host key. Accidentally changing a server's host key can be disruptive.

For more information, see \"https://docs.aws.amazon.com/transfer/latest/userguide/change-host-key\" in the AWS SFTP User Guide.

", + "CreateServerRequest$HostKey": "

The RSA private key as generated by the ssh-keygen -N \"\" -f my-new-server-key command.

If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't update the host key. Accidentally changing a server's host key can be disruptive.

For more information, see \"https://alpha-docs-aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key\" in the AWS SFTP User Guide.

", "UpdateServerRequest$HostKey": "

The RSA private key as generated by ssh-keygen -N \"\" -f my-new-server-key.

If you aren't planning to migrate existing users from an existing SFTP server to a new AWS SFTP server, don't update the host key. Accidentally changing a server's host key can be disruptive.

For more information, see \"https://docs.aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key\" in the AWS SFTP User Guide.

" } }, @@ -242,6 +265,18 @@ "ListUsersResponse$Users": "

Returns the user accounts and their properties for the ServerId value that you specify.

" } }, + "MapEntry": { + "base": null, + "refs": { + "HomeDirectoryMapEntry$Entry": "

Represents an entry and a target for HomeDirectoryMappings.

" + } + }, + "MapTarget": { + "base": null, + "refs": { + "HomeDirectoryMapEntry$Target": "

Represents the map target that is used in a HomeDirectorymapEntry.

" + } + }, "MaxResults": { "base": null, "refs": { @@ -316,6 +351,12 @@ "TestIdentityProviderResponse$Response": "

The response that is returned from your API Gateway.

" } }, + "RetryAfterSeconds": { + "base": null, + "refs": { + "ThrottlingException$RetryAfterSeconds": null + } + }, "Role": { "base": null, "refs": { @@ -475,6 +516,11 @@ "refs": { } }, + "ThrottlingException": { + "base": "

The request was denied due to request throttling.

HTTP Status Code: 400

", + "refs": { + } + }, "UntagResourceRequest": { "base": null, "refs": { diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index 79e2a99f93..f4abeced2b 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -359,6 +359,7 @@ "eu-central-1" : { }, "eu-west-1" : { }, "eu-west-2" : { }, + "eu-west-3" : { }, "us-east-1" : { }, "us-east-2" : { }, "us-west-1" : { }, @@ -1552,6 +1553,26 @@ "us-west-2" : { } } }, + "forecast" : { + "endpoints" : { + "ap-northeast-1" : { }, + "ap-southeast-1" : { }, + "eu-west-1" : { }, + "us-east-1" : { }, + "us-east-2" : { }, + "us-west-2" : { } + } + }, + "forecastquery" : { + "endpoints" : { + "ap-northeast-1" : { }, + "ap-southeast-1" : { }, + "eu-west-1" : { }, + "us-east-1" : { }, + "us-east-2" : { }, + "us-west-2" : { } + } + }, "fsx" : { "endpoints" : { "ap-northeast-1" : { }, @@ -3510,6 +3531,16 @@ "us-west-2" : { } } }, + "transcribestreaming" : { + "endpoints" : { + "ap-southeast-2" : { }, + "ca-central-1" : { }, + "eu-west-1" : { }, + "us-east-1" : { }, + "us-east-2" : { }, + "us-west-2" : { } + } + }, "transfer" : { "endpoints" : { "ap-northeast-1" : { }, @@ -3888,6 +3919,11 @@ "cn-northwest-1" : { } } }, + "glue" : { + "endpoints" : { + "cn-northwest-1" : { } + } + }, "greengrass" : { "defaults" : { "protocols" : [ "https" ] diff --git a/service/ecr/api.go b/service/ecr/api.go index 237899c606..74ca7bb8e2 100644 --- a/service/ecr/api.go +++ b/service/ecr/api.go @@ -442,7 +442,10 @@ func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *reques // CreateRepository API operation for Amazon EC2 Container Registry. // -// Creates an image repository. +// Creates an Amazon Elastic Container Registry (Amazon ECR) repository, where +// users can push and pull Docker images. For more information, see Amazon ECR +// Repositories (https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html) +// in the Amazon Elastic Container Registry User Guide. // // 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 @@ -772,6 +775,156 @@ func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRe return out, req.Send() } +const opDescribeImageScanFindings = "DescribeImageScanFindings" + +// DescribeImageScanFindingsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeImageScanFindings 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 DescribeImageScanFindings for more information on using the DescribeImageScanFindings +// 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 DescribeImageScanFindingsRequest method. +// req, resp := client.DescribeImageScanFindingsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindings +func (c *ECR) DescribeImageScanFindingsRequest(input *DescribeImageScanFindingsInput) (req *request.Request, output *DescribeImageScanFindingsOutput) { + op := &request.Operation{ + Name: opDescribeImageScanFindings, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeImageScanFindingsInput{} + } + + output = &DescribeImageScanFindingsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeImageScanFindings API operation for Amazon EC2 Container Registry. +// +// Describes the image scan findings for the specified image. +// +// 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 EC2 Container Registry's +// API operation DescribeImageScanFindings for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeImageNotFoundException "ImageNotFoundException" +// The image requested does not exist in the specified repository. +// +// * ErrCodeScanNotFoundException "ScanNotFoundException" +// The specified image scan could not be found. Ensure that image scanning is +// enabled on the repository and try again. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImageScanFindings +func (c *ECR) DescribeImageScanFindings(input *DescribeImageScanFindingsInput) (*DescribeImageScanFindingsOutput, error) { + req, out := c.DescribeImageScanFindingsRequest(input) + return out, req.Send() +} + +// DescribeImageScanFindingsWithContext is the same as DescribeImageScanFindings with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeImageScanFindings 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 *ECR) DescribeImageScanFindingsWithContext(ctx aws.Context, input *DescribeImageScanFindingsInput, opts ...request.Option) (*DescribeImageScanFindingsOutput, error) { + req, out := c.DescribeImageScanFindingsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeImageScanFindingsPages iterates over the pages of a DescribeImageScanFindings operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeImageScanFindings method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a DescribeImageScanFindings operation. +// pageNum := 0 +// err := client.DescribeImageScanFindingsPages(params, +// func(page *ecr.DescribeImageScanFindingsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ECR) DescribeImageScanFindingsPages(input *DescribeImageScanFindingsInput, fn func(*DescribeImageScanFindingsOutput, bool) bool) error { + return c.DescribeImageScanFindingsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeImageScanFindingsPagesWithContext same as DescribeImageScanFindingsPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ECR) DescribeImageScanFindingsPagesWithContext(ctx aws.Context, input *DescribeImageScanFindingsInput, fn func(*DescribeImageScanFindingsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeImageScanFindingsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeImageScanFindingsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*DescribeImageScanFindingsOutput), !p.HasNextPage()) + } + return p.Err() +} + const opDescribeImages = "DescribeImages" // DescribeImagesRequest generates a "aws/request.Request" representing the @@ -1378,6 +1531,12 @@ func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewI Name: opGetLifecyclePolicyPreview, HTTPMethod: "POST", HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, } if input == nil { @@ -1437,6 +1596,56 @@ func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLi return out, req.Send() } +// GetLifecyclePolicyPreviewPages iterates over the pages of a GetLifecyclePolicyPreview operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See GetLifecyclePolicyPreview method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a GetLifecyclePolicyPreview operation. +// pageNum := 0 +// err := client.GetLifecyclePolicyPreviewPages(params, +// func(page *ecr.GetLifecyclePolicyPreviewOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *ECR) GetLifecyclePolicyPreviewPages(input *GetLifecyclePolicyPreviewInput, fn func(*GetLifecyclePolicyPreviewOutput, bool) bool) error { + return c.GetLifecyclePolicyPreviewPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// GetLifecyclePolicyPreviewPagesWithContext same as GetLifecyclePolicyPreviewPages except +// it takes a Context and allows setting request options on the pages. +// +// 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 *ECR) GetLifecyclePolicyPreviewPagesWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, fn func(*GetLifecyclePolicyPreviewOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *GetLifecyclePolicyPreviewInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.GetLifecyclePolicyPreviewRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + cont := true + for p.Next() && cont { + cont = fn(p.Page().(*GetLifecyclePolicyPreviewOutput), !p.HasNextPage()) + } + return p.Err() +} + const opGetRepositoryPolicy = "GetRepositoryPolicy" // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the @@ -1964,6 +2173,93 @@ func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts .. return out, req.Send() } +const opPutImageScanningConfiguration = "PutImageScanningConfiguration" + +// PutImageScanningConfigurationRequest generates a "aws/request.Request" representing the +// client's request for the PutImageScanningConfiguration 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 PutImageScanningConfiguration for more information on using the PutImageScanningConfiguration +// 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 PutImageScanningConfigurationRequest method. +// req, resp := client.PutImageScanningConfigurationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfiguration +func (c *ECR) PutImageScanningConfigurationRequest(input *PutImageScanningConfigurationInput) (req *request.Request, output *PutImageScanningConfigurationOutput) { + op := &request.Operation{ + Name: opPutImageScanningConfiguration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutImageScanningConfigurationInput{} + } + + output = &PutImageScanningConfigurationOutput{} + req = c.newRequest(op, input, output) + return +} + +// PutImageScanningConfiguration API operation for Amazon EC2 Container Registry. +// +// Updates the image scanning configuration for a repository. +// +// 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 EC2 Container Registry's +// API operation PutImageScanningConfiguration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageScanningConfiguration +func (c *ECR) PutImageScanningConfiguration(input *PutImageScanningConfigurationInput) (*PutImageScanningConfigurationOutput, error) { + req, out := c.PutImageScanningConfigurationRequest(input) + return out, req.Send() +} + +// PutImageScanningConfigurationWithContext is the same as PutImageScanningConfiguration with the addition of +// the ability to pass a context and additional request options. +// +// See PutImageScanningConfiguration 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 *ECR) PutImageScanningConfigurationWithContext(ctx aws.Context, input *PutImageScanningConfigurationInput, opts ...request.Option) (*PutImageScanningConfigurationOutput, error) { + req, out := c.PutImageScanningConfigurationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutImageTagMutability = "PutImageTagMutability" // PutImageTagMutabilityRequest generates a "aws/request.Request" representing the @@ -2228,59 +2524,58 @@ func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetReposito return out, req.Send() } -const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" +const opStartImageScan = "StartImageScan" -// StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the -// client's request for the StartLifecyclePolicyPreview operation. The "output" return +// StartImageScanRequest generates a "aws/request.Request" representing the +// client's request for the StartImageScan 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 StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview +// See StartImageScan for more information on using the StartImageScan // 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 StartLifecyclePolicyPreviewRequest method. -// req, resp := client.StartLifecyclePolicyPreviewRequest(params) +// // Example sending a request using the StartImageScanRequest method. +// req, resp := client.StartImageScanRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview -func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScan +func (c *ECR) StartImageScanRequest(input *StartImageScanInput) (req *request.Request, output *StartImageScanOutput) { op := &request.Operation{ - Name: opStartLifecyclePolicyPreview, + Name: opStartImageScan, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &StartLifecyclePolicyPreviewInput{} + input = &StartImageScanInput{} } - output = &StartLifecyclePolicyPreviewOutput{} + output = &StartImageScanOutput{} req = c.newRequest(op, input, output) return } -// StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry. +// StartImageScan API operation for Amazon EC2 Container Registry. // -// Starts a preview of the specified lifecycle policy. This allows you to see -// the results before creating the lifecycle policy. +// Starts an image vulnerability scan. // // 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 EC2 Container Registry's -// API operation StartLifecyclePolicyPreview for usage and error information. +// API operation StartImageScan for usage and error information. // // Returned Error Codes: // * ErrCodeServerException "ServerException" @@ -2294,36 +2589,127 @@ func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPrev // The specified repository could not be found. Check the spelling of the specified // repository and ensure that you are performing operations on the correct registry. // -// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" -// The lifecycle policy could not be found, and no policy is set to the repository. -// -// * ErrCodeLifecyclePolicyPreviewInProgressException "LifecyclePolicyPreviewInProgressException" -// The previous lifecycle policy preview request has not completed. Please try -// again later. +// * ErrCodeImageNotFoundException "ImageNotFoundException" +// The image requested does not exist in the specified repository. // -// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview -func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) { - req, out := c.StartLifecyclePolicyPreviewRequest(input) +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartImageScan +func (c *ECR) StartImageScan(input *StartImageScanInput) (*StartImageScanOutput, error) { + req, out := c.StartImageScanRequest(input) return out, req.Send() } -// StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of +// StartImageScanWithContext is the same as StartImageScan with the addition of // the ability to pass a context and additional request options. // -// See StartLifecyclePolicyPreview for details on how to use this API operation. +// See StartImageScan 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 *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) { - req, out := c.StartLifecyclePolicyPreviewRequest(input) +func (c *ECR) StartImageScanWithContext(ctx aws.Context, input *StartImageScanInput, opts ...request.Option) (*StartImageScanOutput, error) { + req, out := c.StartImageScanRequest(input) req.SetContext(ctx) req.ApplyOptions(opts...) return out, req.Send() } -const opTagResource = "TagResource" +const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview" + +// StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the +// client's request for the StartLifecyclePolicyPreview 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 StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview +// 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 StartLifecyclePolicyPreviewRequest method. +// req, resp := client.StartLifecyclePolicyPreviewRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview +func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) { + op := &request.Operation{ + Name: opStartLifecyclePolicyPreview, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartLifecyclePolicyPreviewInput{} + } + + output = &StartLifecyclePolicyPreviewOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry. +// +// Starts a preview of the specified lifecycle policy. This allows you to see +// the results before creating the lifecycle policy. +// +// 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 EC2 Container Registry's +// API operation StartLifecyclePolicyPreview for usage and error information. +// +// Returned Error Codes: +// * ErrCodeServerException "ServerException" +// These errors are usually caused by a server-side issue. +// +// * ErrCodeInvalidParameterException "InvalidParameterException" +// The specified parameter is invalid. Review the available parameters for the +// API request. +// +// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" +// The specified repository could not be found. Check the spelling of the specified +// repository and ensure that you are performing operations on the correct registry. +// +// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException" +// The lifecycle policy could not be found, and no policy is set to the repository. +// +// * ErrCodeLifecyclePolicyPreviewInProgressException "LifecyclePolicyPreviewInProgressException" +// The previous lifecycle policy preview request has not completed. Please try +// again later. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview +func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) { + req, out := c.StartLifecyclePolicyPreviewRequest(input) + return out, req.Send() +} + +// StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of +// the ability to pass a context and additional request options. +// +// See StartLifecyclePolicyPreview 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 *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) { + req, out := c.StartLifecyclePolicyPreviewRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opTagResource = "TagResource" // TagResourceRequest generates a "aws/request.Request" representing the // client's request for the TagResource operation. The "output" return @@ -2623,6 +3009,41 @@ func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPart return out, req.Send() } +// This data type is used in the ImageScanFinding data type. +type Attribute struct { + _ struct{} `type:"structure"` + + // The attribute key. + // + // Key is a required field + Key *string `locationName:"key" min:"1" type:"string" required:"true"` + + // The value assigned to the attribute key. + Value *string `locationName:"value" min:"1" type:"string"` +} + +// String returns the string representation +func (s Attribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Attribute) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *Attribute) SetKey(v string) *Attribute { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Attribute) SetValue(v string) *Attribute { + s.Value = &v + return s +} + // An object representing authorization data for an Amazon ECR registry. type AuthorizationData struct { _ struct{} `type:"structure"` @@ -3146,6 +3567,11 @@ func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOu type CreateRepositoryInput struct { _ struct{} `type:"structure"` + // The image scanning configuration for the repository. This setting determines + // whether images are scanned for known vulnerabilities after being pushed to + // the repository. + ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure"` + // The tag mutability setting for the repository. If this parameter is omitted, // the default setting of MUTABLE will be used which will allow image tags to // be overwritten. If IMMUTABLE is specified, all image tags within the repository @@ -3192,6 +3618,12 @@ func (s *CreateRepositoryInput) Validate() error { return nil } +// SetImageScanningConfiguration sets the ImageScanningConfiguration field's value. +func (s *CreateRepositoryInput) SetImageScanningConfiguration(v *ImageScanningConfiguration) *CreateRepositoryInput { + s.ImageScanningConfiguration = v + return s +} + // SetImageTagMutability sets the ImageTagMutability field's value. func (s *CreateRepositoryInput) SetImageTagMutability(v string) *CreateRepositoryInput { s.ImageTagMutability = &v @@ -3511,6 +3943,180 @@ func (s *DeleteRepositoryPolicyOutput) SetRepositoryName(v string) *DeleteReposi return s } +type DescribeImageScanFindingsInput struct { + _ struct{} `type:"structure"` + + // An object with identifying information for an Amazon ECR image. + // + // ImageId is a required field + ImageId *ImageIdentifier `locationName:"imageId" type:"structure" required:"true"` + + // The maximum number of image scan results returned by DescribeImageScanFindings + // in paginated output. When this parameter is used, DescribeImageScanFindings + // only returns maxResults results in a single page along with a nextToken response + // element. The remaining results of the initial request can be seen by sending + // another DescribeImageScanFindings request with the returned nextToken value. + // This value can be between 1 and 1000. If this parameter is not used, then + // DescribeImageScanFindings returns up to 100 results and a nextToken value, + // if applicable. + MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` + + // The nextToken value returned from a previous paginated DescribeImageScanFindings + // request where maxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the nextToken value. This value is null when there are no more results + // to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The AWS account ID associated with the registry that contains the repository + // in which to describe the image scan findings for. If you do not specify a + // registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository for the image for which to describe the scan findings. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s DescribeImageScanFindingsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImageScanFindingsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeImageScanFindingsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeImageScanFindingsInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + if s.ImageId != nil { + if err := s.ImageId.Validate(); err != nil { + invalidParams.AddNested("ImageId", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetImageId sets the ImageId field's value. +func (s *DescribeImageScanFindingsInput) SetImageId(v *ImageIdentifier) *DescribeImageScanFindingsInput { + s.ImageId = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeImageScanFindingsInput) SetMaxResults(v int64) *DescribeImageScanFindingsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeImageScanFindingsInput) SetNextToken(v string) *DescribeImageScanFindingsInput { + s.NextToken = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *DescribeImageScanFindingsInput) SetRegistryId(v string) *DescribeImageScanFindingsInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DescribeImageScanFindingsInput) SetRepositoryName(v string) *DescribeImageScanFindingsInput { + s.RepositoryName = &v + return s +} + +type DescribeImageScanFindingsOutput struct { + _ struct{} `type:"structure"` + + // An object with identifying information for an Amazon ECR image. + ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` + + // The information contained in the image scan findings. + ImageScanFindings *ImageScanFindings `locationName:"imageScanFindings" type:"structure"` + + // The current state of the scan. + ImageScanStatus *ImageScanStatus `locationName:"imageScanStatus" type:"structure"` + + // The nextToken value to include in a future DescribeImageScanFindings request. + // When the results of a DescribeImageScanFindings request exceed maxResults, + // this value can be used to retrieve the next page of results. This value is + // null when there are no more results to return. + NextToken *string `locationName:"nextToken" type:"string"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` +} + +// String returns the string representation +func (s DescribeImageScanFindingsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeImageScanFindingsOutput) GoString() string { + return s.String() +} + +// SetImageId sets the ImageId field's value. +func (s *DescribeImageScanFindingsOutput) SetImageId(v *ImageIdentifier) *DescribeImageScanFindingsOutput { + s.ImageId = v + return s +} + +// SetImageScanFindings sets the ImageScanFindings field's value. +func (s *DescribeImageScanFindingsOutput) SetImageScanFindings(v *ImageScanFindings) *DescribeImageScanFindingsOutput { + s.ImageScanFindings = v + return s +} + +// SetImageScanStatus sets the ImageScanStatus field's value. +func (s *DescribeImageScanFindingsOutput) SetImageScanStatus(v *ImageScanStatus) *DescribeImageScanFindingsOutput { + s.ImageScanStatus = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeImageScanFindingsOutput) SetNextToken(v string) *DescribeImageScanFindingsOutput { + s.NextToken = &v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *DescribeImageScanFindingsOutput) SetRegistryId(v string) *DescribeImageScanFindingsOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *DescribeImageScanFindingsOutput) SetRepositoryName(v string) *DescribeImageScanFindingsOutput { + s.RepositoryName = &v + return s +} + // An object representing a filter on a DescribeImages operation. type DescribeImagesFilter struct { _ struct{} `type:"structure"` @@ -4361,7 +4967,7 @@ type Image struct { ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` // The image manifest associated with the image. - ImageManifest *string `locationName:"imageManifest" type:"string"` + ImageManifest *string `locationName:"imageManifest" min:"1" type:"string"` // The AWS account ID associated with the registry containing the image. RegistryId *string `locationName:"registryId" type:"string"` @@ -4415,6 +5021,12 @@ type ImageDetail struct { // the current image was pushed to the repository. ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp"` + // A summary of the last completed image scan. + ImageScanFindingsSummary *ImageScanFindingsSummary `locationName:"imageScanFindingsSummary" type:"structure"` + + // The current state of the scan. + ImageScanStatus *ImageScanStatus `locationName:"imageScanStatus" type:"structure"` + // The size, in bytes, of the image in the repository. // // Beginning with Docker version 1.9, the Docker client compresses image layers @@ -4455,13 +5067,25 @@ func (s *ImageDetail) SetImagePushedAt(v time.Time) *ImageDetail { return s } -// SetImageSizeInBytes sets the ImageSizeInBytes field's value. -func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail { - s.ImageSizeInBytes = &v +// SetImageScanFindingsSummary sets the ImageScanFindingsSummary field's value. +func (s *ImageDetail) SetImageScanFindingsSummary(v *ImageScanFindingsSummary) *ImageDetail { + s.ImageScanFindingsSummary = v return s } -// SetImageTags sets the ImageTags field's value. +// SetImageScanStatus sets the ImageScanStatus field's value. +func (s *ImageDetail) SetImageScanStatus(v *ImageScanStatus) *ImageDetail { + s.ImageScanStatus = v + return s +} + +// SetImageSizeInBytes sets the ImageSizeInBytes field's value. +func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail { + s.ImageSizeInBytes = &v + return s +} + +// SetImageTags sets the ImageTags field's value. func (s *ImageDetail) SetImageTags(v []*string) *ImageDetail { s.ImageTags = v return s @@ -4567,6 +5191,220 @@ func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier { return s } +// Contains information about an image scan finding. +type ImageScanFinding struct { + _ struct{} `type:"structure"` + + // A collection of attributes of the host from which the finding is generated. + Attributes []*Attribute `locationName:"attributes" type:"list"` + + // The description of the finding. + Description *string `locationName:"description" type:"string"` + + // The name associated with the finding, usually a CVE number. + Name *string `locationName:"name" type:"string"` + + // The finding severity. + Severity *string `locationName:"severity" type:"string" enum:"FindingSeverity"` + + // A link containing additional details about the security vulnerability. + Uri *string `locationName:"uri" type:"string"` +} + +// String returns the string representation +func (s ImageScanFinding) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageScanFinding) GoString() string { + return s.String() +} + +// SetAttributes sets the Attributes field's value. +func (s *ImageScanFinding) SetAttributes(v []*Attribute) *ImageScanFinding { + s.Attributes = v + return s +} + +// SetDescription sets the Description field's value. +func (s *ImageScanFinding) SetDescription(v string) *ImageScanFinding { + s.Description = &v + return s +} + +// SetName sets the Name field's value. +func (s *ImageScanFinding) SetName(v string) *ImageScanFinding { + s.Name = &v + return s +} + +// SetSeverity sets the Severity field's value. +func (s *ImageScanFinding) SetSeverity(v string) *ImageScanFinding { + s.Severity = &v + return s +} + +// SetUri sets the Uri field's value. +func (s *ImageScanFinding) SetUri(v string) *ImageScanFinding { + s.Uri = &v + return s +} + +// The details of an image scan. +type ImageScanFindings struct { + _ struct{} `type:"structure"` + + // The image vulnerability counts, sorted by severity. + FindingSeverityCounts map[string]*int64 `locationName:"findingSeverityCounts" type:"map"` + + // The findings from the image scan. + Findings []*ImageScanFinding `locationName:"findings" type:"list"` + + // The time of the last completed image scan. + ImageScanCompletedAt *time.Time `locationName:"imageScanCompletedAt" type:"timestamp"` + + // The time when the vulnerability data was last scanned. + VulnerabilitySourceUpdatedAt *time.Time `locationName:"vulnerabilitySourceUpdatedAt" type:"timestamp"` +} + +// String returns the string representation +func (s ImageScanFindings) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageScanFindings) GoString() string { + return s.String() +} + +// SetFindingSeverityCounts sets the FindingSeverityCounts field's value. +func (s *ImageScanFindings) SetFindingSeverityCounts(v map[string]*int64) *ImageScanFindings { + s.FindingSeverityCounts = v + return s +} + +// SetFindings sets the Findings field's value. +func (s *ImageScanFindings) SetFindings(v []*ImageScanFinding) *ImageScanFindings { + s.Findings = v + return s +} + +// SetImageScanCompletedAt sets the ImageScanCompletedAt field's value. +func (s *ImageScanFindings) SetImageScanCompletedAt(v time.Time) *ImageScanFindings { + s.ImageScanCompletedAt = &v + return s +} + +// SetVulnerabilitySourceUpdatedAt sets the VulnerabilitySourceUpdatedAt field's value. +func (s *ImageScanFindings) SetVulnerabilitySourceUpdatedAt(v time.Time) *ImageScanFindings { + s.VulnerabilitySourceUpdatedAt = &v + return s +} + +// A summary of the last completed image scan. +type ImageScanFindingsSummary struct { + _ struct{} `type:"structure"` + + // The image vulnerability counts, sorted by severity. + FindingSeverityCounts map[string]*int64 `locationName:"findingSeverityCounts" type:"map"` + + // The time of the last completed image scan. + ImageScanCompletedAt *time.Time `locationName:"imageScanCompletedAt" type:"timestamp"` + + // The time when the vulnerability data was last scanned. + VulnerabilitySourceUpdatedAt *time.Time `locationName:"vulnerabilitySourceUpdatedAt" type:"timestamp"` +} + +// String returns the string representation +func (s ImageScanFindingsSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageScanFindingsSummary) GoString() string { + return s.String() +} + +// SetFindingSeverityCounts sets the FindingSeverityCounts field's value. +func (s *ImageScanFindingsSummary) SetFindingSeverityCounts(v map[string]*int64) *ImageScanFindingsSummary { + s.FindingSeverityCounts = v + return s +} + +// SetImageScanCompletedAt sets the ImageScanCompletedAt field's value. +func (s *ImageScanFindingsSummary) SetImageScanCompletedAt(v time.Time) *ImageScanFindingsSummary { + s.ImageScanCompletedAt = &v + return s +} + +// SetVulnerabilitySourceUpdatedAt sets the VulnerabilitySourceUpdatedAt field's value. +func (s *ImageScanFindingsSummary) SetVulnerabilitySourceUpdatedAt(v time.Time) *ImageScanFindingsSummary { + s.VulnerabilitySourceUpdatedAt = &v + return s +} + +// The current status of an image scan. +type ImageScanStatus struct { + _ struct{} `type:"structure"` + + // The description of the image scan status. + Description *string `locationName:"description" type:"string"` + + // The current state of an image scan. + Status *string `locationName:"status" type:"string" enum:"ScanStatus"` +} + +// String returns the string representation +func (s ImageScanStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageScanStatus) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *ImageScanStatus) SetDescription(v string) *ImageScanStatus { + s.Description = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ImageScanStatus) SetStatus(v string) *ImageScanStatus { + s.Status = &v + return s +} + +// The image scanning configuration for a repository. +type ImageScanningConfiguration struct { + _ struct{} `type:"structure"` + + // The setting that determines whether images are scanned after being pushed + // to a repository. If set to true, images will be scanned after being pushed. + // If this parameter is not specified, it will default to false and images will + // not be scanned unless a scan is manually started with the StartImageScan + // API. + ScanOnPush *bool `locationName:"scanOnPush" type:"boolean"` +} + +// String returns the string representation +func (s ImageScanningConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ImageScanningConfiguration) GoString() string { + return s.String() +} + +// SetScanOnPush sets the ScanOnPush field's value. +func (s *ImageScanningConfiguration) SetScanOnPush(v bool) *ImageScanningConfiguration { + s.ScanOnPush = &v + return s +} + type InitiateLayerUploadInput struct { _ struct{} `type:"structure"` @@ -5101,7 +5939,7 @@ type PutImageInput struct { // The image manifest corresponding to the image to be uploaded. // // ImageManifest is a required field - ImageManifest *string `locationName:"imageManifest" type:"string" required:"true"` + ImageManifest *string `locationName:"imageManifest" min:"1" type:"string" required:"true"` // The tag to associate with the image. This parameter is required for images // that use the Docker Image Manifest V2 Schema 2 or OCI formats. @@ -5134,6 +5972,9 @@ func (s *PutImageInput) Validate() error { if s.ImageManifest == nil { invalidParams.Add(request.NewErrParamRequired("ImageManifest")) } + if s.ImageManifest != nil && len(*s.ImageManifest) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ImageManifest", 1)) + } if s.ImageTag != nil && len(*s.ImageTag) < 1 { invalidParams.Add(request.NewErrParamMinLen("ImageTag", 1)) } @@ -5197,6 +6038,116 @@ func (s *PutImageOutput) SetImage(v *Image) *PutImageOutput { return s } +type PutImageScanningConfigurationInput struct { + _ struct{} `type:"structure"` + + // The image scanning configuration for the repository. This setting determines + // whether images are scanned for known vulnerabilities after being pushed to + // the repository. + // + // ImageScanningConfiguration is a required field + ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure" required:"true"` + + // The AWS account ID associated with the registry that contains the repository + // in which to update the image scanning configuration setting. If you do not + // specify a registry, the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository in which to update the image scanning configuration + // setting. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s PutImageScanningConfigurationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutImageScanningConfigurationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutImageScanningConfigurationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutImageScanningConfigurationInput"} + if s.ImageScanningConfiguration == nil { + invalidParams.Add(request.NewErrParamRequired("ImageScanningConfiguration")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetImageScanningConfiguration sets the ImageScanningConfiguration field's value. +func (s *PutImageScanningConfigurationInput) SetImageScanningConfiguration(v *ImageScanningConfiguration) *PutImageScanningConfigurationInput { + s.ImageScanningConfiguration = v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *PutImageScanningConfigurationInput) SetRegistryId(v string) *PutImageScanningConfigurationInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *PutImageScanningConfigurationInput) SetRepositoryName(v string) *PutImageScanningConfigurationInput { + s.RepositoryName = &v + return s +} + +type PutImageScanningConfigurationOutput struct { + _ struct{} `type:"structure"` + + // The image scanning configuration setting for the repository. + ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` +} + +// String returns the string representation +func (s PutImageScanningConfigurationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutImageScanningConfigurationOutput) GoString() string { + return s.String() +} + +// SetImageScanningConfiguration sets the ImageScanningConfiguration field's value. +func (s *PutImageScanningConfigurationOutput) SetImageScanningConfiguration(v *ImageScanningConfiguration) *PutImageScanningConfigurationOutput { + s.ImageScanningConfiguration = v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *PutImageScanningConfigurationOutput) SetRegistryId(v string) *PutImageScanningConfigurationOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *PutImageScanningConfigurationOutput) SetRepositoryName(v string) *PutImageScanningConfigurationOutput { + s.RepositoryName = &v + return s +} + type PutImageTagMutabilityInput struct { _ struct{} `type:"structure"` @@ -5422,6 +6373,9 @@ type Repository struct { // The date and time, in JavaScript date format, when the repository was created. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp"` + // The image scanning configuration for a repository. + ImageScanningConfiguration *ImageScanningConfiguration `locationName:"imageScanningConfiguration" type:"structure"` + // The tag mutability setting for the repository. ImageTagMutability *string `locationName:"imageTagMutability" type:"string" enum:"ImageTagMutability"` @@ -5458,6 +6412,12 @@ func (s *Repository) SetCreatedAt(v time.Time) *Repository { return s } +// SetImageScanningConfiguration sets the ImageScanningConfiguration field's value. +func (s *Repository) SetImageScanningConfiguration(v *ImageScanningConfiguration) *Repository { + s.ImageScanningConfiguration = v + return s +} + // SetImageTagMutability sets the ImageTagMutability field's value. func (s *Repository) SetImageTagMutability(v string) *Repository { s.ImageTagMutability = &v @@ -5607,6 +6567,127 @@ func (s *SetRepositoryPolicyOutput) SetRepositoryName(v string) *SetRepositoryPo return s } +type StartImageScanInput struct { + _ struct{} `type:"structure"` + + // An object with identifying information for an Amazon ECR image. + // + // ImageId is a required field + ImageId *ImageIdentifier `locationName:"imageId" type:"structure" required:"true"` + + // The AWS account ID associated with the registry that contains the repository + // in which to start an image scan request. If you do not specify a registry, + // the default registry is assumed. + RegistryId *string `locationName:"registryId" type:"string"` + + // The name of the repository that contains the images to scan. + // + // RepositoryName is a required field + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` +} + +// String returns the string representation +func (s StartImageScanInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartImageScanInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartImageScanInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartImageScanInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + if s.RepositoryName == nil { + invalidParams.Add(request.NewErrParamRequired("RepositoryName")) + } + if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { + invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) + } + if s.ImageId != nil { + if err := s.ImageId.Validate(); err != nil { + invalidParams.AddNested("ImageId", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetImageId sets the ImageId field's value. +func (s *StartImageScanInput) SetImageId(v *ImageIdentifier) *StartImageScanInput { + s.ImageId = v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *StartImageScanInput) SetRegistryId(v string) *StartImageScanInput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *StartImageScanInput) SetRepositoryName(v string) *StartImageScanInput { + s.RepositoryName = &v + return s +} + +type StartImageScanOutput struct { + _ struct{} `type:"structure"` + + // An object with identifying information for an Amazon ECR image. + ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` + + // The current state of the scan. + ImageScanStatus *ImageScanStatus `locationName:"imageScanStatus" type:"structure"` + + // The registry ID associated with the request. + RegistryId *string `locationName:"registryId" type:"string"` + + // The repository name associated with the request. + RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` +} + +// String returns the string representation +func (s StartImageScanOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartImageScanOutput) GoString() string { + return s.String() +} + +// SetImageId sets the ImageId field's value. +func (s *StartImageScanOutput) SetImageId(v *ImageIdentifier) *StartImageScanOutput { + s.ImageId = v + return s +} + +// SetImageScanStatus sets the ImageScanStatus field's value. +func (s *StartImageScanOutput) SetImageScanStatus(v *ImageScanStatus) *StartImageScanOutput { + s.ImageScanStatus = v + return s +} + +// SetRegistryId sets the RegistryId field's value. +func (s *StartImageScanOutput) SetRegistryId(v string) *StartImageScanOutput { + s.RegistryId = &v + return s +} + +// SetRepositoryName sets the RepositoryName field's value. +func (s *StartImageScanOutput) SetRepositoryName(v string) *StartImageScanOutput { + s.RepositoryName = &v + return s +} + type StartLifecyclePolicyPreviewInput struct { _ struct{} `type:"structure"` @@ -6055,6 +7136,26 @@ func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput { return s } +const ( + // FindingSeverityInformational is a FindingSeverity enum value + FindingSeverityInformational = "INFORMATIONAL" + + // FindingSeverityLow is a FindingSeverity enum value + FindingSeverityLow = "LOW" + + // FindingSeverityMedium is a FindingSeverity enum value + FindingSeverityMedium = "MEDIUM" + + // FindingSeverityHigh is a FindingSeverity enum value + FindingSeverityHigh = "HIGH" + + // FindingSeverityCritical is a FindingSeverity enum value + FindingSeverityCritical = "CRITICAL" + + // FindingSeverityUndefined is a FindingSeverity enum value + FindingSeverityUndefined = "UNDEFINED" +) + const ( // ImageActionTypeExpire is a ImageActionType enum value ImageActionTypeExpire = "EXPIRE" @@ -6115,6 +7216,17 @@ const ( LifecyclePolicyPreviewStatusFailed = "FAILED" ) +const ( + // ScanStatusInProgress is a ScanStatus enum value + ScanStatusInProgress = "IN_PROGRESS" + + // ScanStatusComplete is a ScanStatus enum value + ScanStatusComplete = "COMPLETE" + + // ScanStatusFailed is a ScanStatus enum value + ScanStatusFailed = "FAILED" +) + const ( // TagStatusTagged is a TagStatus enum value TagStatusTagged = "TAGGED" diff --git a/service/ecr/ecriface/interface.go b/service/ecr/ecriface/interface.go index aac38b4b97..56ef985d42 100644 --- a/service/ecr/ecriface/interface.go +++ b/service/ecr/ecriface/interface.go @@ -92,6 +92,13 @@ type ECRAPI interface { DeleteRepositoryPolicyWithContext(aws.Context, *ecr.DeleteRepositoryPolicyInput, ...request.Option) (*ecr.DeleteRepositoryPolicyOutput, error) DeleteRepositoryPolicyRequest(*ecr.DeleteRepositoryPolicyInput) (*request.Request, *ecr.DeleteRepositoryPolicyOutput) + DescribeImageScanFindings(*ecr.DescribeImageScanFindingsInput) (*ecr.DescribeImageScanFindingsOutput, error) + DescribeImageScanFindingsWithContext(aws.Context, *ecr.DescribeImageScanFindingsInput, ...request.Option) (*ecr.DescribeImageScanFindingsOutput, error) + DescribeImageScanFindingsRequest(*ecr.DescribeImageScanFindingsInput) (*request.Request, *ecr.DescribeImageScanFindingsOutput) + + DescribeImageScanFindingsPages(*ecr.DescribeImageScanFindingsInput, func(*ecr.DescribeImageScanFindingsOutput, bool) bool) error + DescribeImageScanFindingsPagesWithContext(aws.Context, *ecr.DescribeImageScanFindingsInput, func(*ecr.DescribeImageScanFindingsOutput, bool) bool, ...request.Option) error + DescribeImages(*ecr.DescribeImagesInput) (*ecr.DescribeImagesOutput, error) DescribeImagesWithContext(aws.Context, *ecr.DescribeImagesInput, ...request.Option) (*ecr.DescribeImagesOutput, error) DescribeImagesRequest(*ecr.DescribeImagesInput) (*request.Request, *ecr.DescribeImagesOutput) @@ -122,6 +129,9 @@ type ECRAPI interface { GetLifecyclePolicyPreviewWithContext(aws.Context, *ecr.GetLifecyclePolicyPreviewInput, ...request.Option) (*ecr.GetLifecyclePolicyPreviewOutput, error) GetLifecyclePolicyPreviewRequest(*ecr.GetLifecyclePolicyPreviewInput) (*request.Request, *ecr.GetLifecyclePolicyPreviewOutput) + GetLifecyclePolicyPreviewPages(*ecr.GetLifecyclePolicyPreviewInput, func(*ecr.GetLifecyclePolicyPreviewOutput, bool) bool) error + GetLifecyclePolicyPreviewPagesWithContext(aws.Context, *ecr.GetLifecyclePolicyPreviewInput, func(*ecr.GetLifecyclePolicyPreviewOutput, bool) bool, ...request.Option) error + GetRepositoryPolicy(*ecr.GetRepositoryPolicyInput) (*ecr.GetRepositoryPolicyOutput, error) GetRepositoryPolicyWithContext(aws.Context, *ecr.GetRepositoryPolicyInput, ...request.Option) (*ecr.GetRepositoryPolicyOutput, error) GetRepositoryPolicyRequest(*ecr.GetRepositoryPolicyInput) (*request.Request, *ecr.GetRepositoryPolicyOutput) @@ -145,6 +155,10 @@ type ECRAPI interface { PutImageWithContext(aws.Context, *ecr.PutImageInput, ...request.Option) (*ecr.PutImageOutput, error) PutImageRequest(*ecr.PutImageInput) (*request.Request, *ecr.PutImageOutput) + PutImageScanningConfiguration(*ecr.PutImageScanningConfigurationInput) (*ecr.PutImageScanningConfigurationOutput, error) + PutImageScanningConfigurationWithContext(aws.Context, *ecr.PutImageScanningConfigurationInput, ...request.Option) (*ecr.PutImageScanningConfigurationOutput, error) + PutImageScanningConfigurationRequest(*ecr.PutImageScanningConfigurationInput) (*request.Request, *ecr.PutImageScanningConfigurationOutput) + PutImageTagMutability(*ecr.PutImageTagMutabilityInput) (*ecr.PutImageTagMutabilityOutput, error) PutImageTagMutabilityWithContext(aws.Context, *ecr.PutImageTagMutabilityInput, ...request.Option) (*ecr.PutImageTagMutabilityOutput, error) PutImageTagMutabilityRequest(*ecr.PutImageTagMutabilityInput) (*request.Request, *ecr.PutImageTagMutabilityOutput) @@ -157,6 +171,10 @@ type ECRAPI interface { SetRepositoryPolicyWithContext(aws.Context, *ecr.SetRepositoryPolicyInput, ...request.Option) (*ecr.SetRepositoryPolicyOutput, error) SetRepositoryPolicyRequest(*ecr.SetRepositoryPolicyInput) (*request.Request, *ecr.SetRepositoryPolicyOutput) + StartImageScan(*ecr.StartImageScanInput) (*ecr.StartImageScanOutput, error) + StartImageScanWithContext(aws.Context, *ecr.StartImageScanInput, ...request.Option) (*ecr.StartImageScanOutput, error) + StartImageScanRequest(*ecr.StartImageScanInput) (*request.Request, *ecr.StartImageScanOutput) + StartLifecyclePolicyPreview(*ecr.StartLifecyclePolicyPreviewInput) (*ecr.StartLifecyclePolicyPreviewOutput, error) StartLifecyclePolicyPreviewWithContext(aws.Context, *ecr.StartLifecyclePolicyPreviewInput, ...request.Option) (*ecr.StartLifecyclePolicyPreviewOutput, error) StartLifecyclePolicyPreviewRequest(*ecr.StartLifecyclePolicyPreviewInput) (*request.Request, *ecr.StartLifecyclePolicyPreviewOutput) diff --git a/service/ecr/errors.go b/service/ecr/errors.go index c1f18605ca..786759af0f 100644 --- a/service/ecr/errors.go +++ b/service/ecr/errors.go @@ -140,6 +140,13 @@ const ( // repository policy. ErrCodeRepositoryPolicyNotFoundException = "RepositoryPolicyNotFoundException" + // ErrCodeScanNotFoundException for service response error code + // "ScanNotFoundException". + // + // The specified image scan could not be found. Ensure that image scanning is + // enabled on the repository and try again. + ErrCodeScanNotFoundException = "ScanNotFoundException" + // ErrCodeServerException for service response error code // "ServerException". // diff --git a/service/elasticache/api.go b/service/elasticache/api.go index 6df29f9186..c2a35cf2c3 100644 --- a/service/elasticache/api.go +++ b/service/elasticache/api.go @@ -377,6 +377,91 @@ func (c *ElastiCache) BatchStopUpdateActionWithContext(ctx aws.Context, input *B return out, req.Send() } +const opCompleteMigration = "CompleteMigration" + +// CompleteMigrationRequest generates a "aws/request.Request" representing the +// client's request for the CompleteMigration 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 CompleteMigration for more information on using the CompleteMigration +// 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 CompleteMigrationRequest method. +// req, resp := client.CompleteMigrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CompleteMigration +func (c *ElastiCache) CompleteMigrationRequest(input *CompleteMigrationInput) (req *request.Request, output *CompleteMigrationOutput) { + op := &request.Operation{ + Name: opCompleteMigration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CompleteMigrationInput{} + } + + output = &CompleteMigrationOutput{} + req = c.newRequest(op, input, output) + return +} + +// CompleteMigration API operation for Amazon ElastiCache. +// +// Complete the migration of data. +// +// 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 ElastiCache's +// API operation CompleteMigration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeReplicationGroupNotUnderMigrationFault "ReplicationGroupNotUnderMigrationFault" +// The designated replication group is not available for data migration. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/CompleteMigration +func (c *ElastiCache) CompleteMigration(input *CompleteMigrationInput) (*CompleteMigrationOutput, error) { + req, out := c.CompleteMigrationRequest(input) + return out, req.Send() +} + +// CompleteMigrationWithContext is the same as CompleteMigration with the addition of +// the ability to pass a context and additional request options. +// +// See CompleteMigration 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 *ElastiCache) CompleteMigrationWithContext(ctx aws.Context, input *CompleteMigrationInput, opts ...request.Option) (*CompleteMigrationOutput, error) { + req, out := c.CompleteMigrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCopySnapshot = "CopySnapshot" // CopySnapshotRequest generates a "aws/request.Request" representing the @@ -5264,6 +5349,94 @@ func (c *ElastiCache) RevokeCacheSecurityGroupIngressWithContext(ctx aws.Context return out, req.Send() } +const opStartMigration = "StartMigration" + +// StartMigrationRequest generates a "aws/request.Request" representing the +// client's request for the StartMigration 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 StartMigration for more information on using the StartMigration +// 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 StartMigrationRequest method. +// req, resp := client.StartMigrationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/StartMigration +func (c *ElastiCache) StartMigrationRequest(input *StartMigrationInput) (req *request.Request, output *StartMigrationOutput) { + op := &request.Operation{ + Name: opStartMigration, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartMigrationInput{} + } + + output = &StartMigrationOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartMigration API operation for Amazon ElastiCache. +// +// Start the migration of data. +// +// 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 ElastiCache's +// API operation StartMigration for usage and error information. +// +// Returned Error Codes: +// * ErrCodeReplicationGroupNotFoundFault "ReplicationGroupNotFoundFault" +// The specified replication group does not exist. +// +// * ErrCodeInvalidReplicationGroupStateFault "InvalidReplicationGroupState" +// The requested replication group is not in the available state. +// +// * ErrCodeReplicationGroupAlreadyUnderMigrationFault "ReplicationGroupAlreadyUnderMigrationFault" +// The targeted replication group is not available. +// +// * ErrCodeInvalidParameterValueException "InvalidParameterValue" +// The value for a parameter is invalid. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticache-2015-02-02/StartMigration +func (c *ElastiCache) StartMigration(input *StartMigrationInput) (*StartMigrationOutput, error) { + req, out := c.StartMigrationRequest(input) + return out, req.Send() +} + +// StartMigrationWithContext is the same as StartMigration with the addition of +// the ability to pass a context and additional request options. +// +// See StartMigration 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 *ElastiCache) StartMigrationWithContext(ctx aws.Context, input *StartMigrationInput, opts ...request.Option) (*StartMigrationOutput, error) { + req, out := c.StartMigrationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opTestFailover = "TestFailover" // TestFailoverRequest generates a "aws/request.Request" representing the @@ -6769,6 +6942,78 @@ func (s *CacheSubnetGroup) SetVpcId(v string) *CacheSubnetGroup { return s } +type CompleteMigrationInput struct { + _ struct{} `type:"structure"` + + // Forces the migration to stop without ensuring that data is in sync. It is + // recommended to use this option only to abort the migration and not recommended + // when application wants to continue migration to ElastiCache. + Force *bool `type:"boolean"` + + // The ID of the replication group to which data is being migrated. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CompleteMigrationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompleteMigrationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CompleteMigrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CompleteMigrationInput"} + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetForce sets the Force field's value. +func (s *CompleteMigrationInput) SetForce(v bool) *CompleteMigrationInput { + s.Force = &v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *CompleteMigrationInput) SetReplicationGroupId(v string) *CompleteMigrationInput { + s.ReplicationGroupId = &v + return s +} + +type CompleteMigrationOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s CompleteMigrationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CompleteMigrationOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *CompleteMigrationOutput) SetReplicationGroup(v *ReplicationGroup) *CompleteMigrationOutput { + s.ReplicationGroup = v + return s +} + // Node group (shard) configuration options when adding or removing replicas. // Each node group (shard) configuration has the following members: NodeGroupId, // NewReplicaCount, and PreferredAvailabilityZones. @@ -8326,6 +8571,39 @@ func (s *CreateSnapshotOutput) SetSnapshot(v *Snapshot) *CreateSnapshotOutput { return s } +// The endpoint from which data should be migrated. +type CustomerNodeEndpoint struct { + _ struct{} `type:"structure"` + + // The address of the node endpoint + Address *string `type:"string"` + + // The port of the node endpoint + Port *int64 `type:"integer"` +} + +// String returns the string representation +func (s CustomerNodeEndpoint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CustomerNodeEndpoint) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *CustomerNodeEndpoint) SetAddress(v string) *CustomerNodeEndpoint { + s.Address = &v + return s +} + +// SetPort sets the Port field's value. +func (s *CustomerNodeEndpoint) SetPort(v int64) *CustomerNodeEndpoint { + s.Port = &v + return s +} + type DecreaseReplicaCountInput struct { _ struct{} `type:"structure"` @@ -14118,6 +14396,82 @@ func (s *Snapshot) SetVpcId(v string) *Snapshot { return s } +type StartMigrationInput struct { + _ struct{} `type:"structure"` + + // List of endpoints from which data should be migrated. For Redis (cluster + // mode disabled), list should have only one element. + // + // CustomerNodeEndpointList is a required field + CustomerNodeEndpointList []*CustomerNodeEndpoint `type:"list" required:"true"` + + // The ID of the replication group to which data should be migrated. + // + // ReplicationGroupId is a required field + ReplicationGroupId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s StartMigrationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartMigrationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartMigrationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartMigrationInput"} + if s.CustomerNodeEndpointList == nil { + invalidParams.Add(request.NewErrParamRequired("CustomerNodeEndpointList")) + } + if s.ReplicationGroupId == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicationGroupId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCustomerNodeEndpointList sets the CustomerNodeEndpointList field's value. +func (s *StartMigrationInput) SetCustomerNodeEndpointList(v []*CustomerNodeEndpoint) *StartMigrationInput { + s.CustomerNodeEndpointList = v + return s +} + +// SetReplicationGroupId sets the ReplicationGroupId field's value. +func (s *StartMigrationInput) SetReplicationGroupId(v string) *StartMigrationInput { + s.ReplicationGroupId = &v + return s +} + +type StartMigrationOutput struct { + _ struct{} `type:"structure"` + + // Contains all of the attributes of a specific Redis replication group. + ReplicationGroup *ReplicationGroup `type:"structure"` +} + +// String returns the string representation +func (s StartMigrationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartMigrationOutput) GoString() string { + return s.String() +} + +// SetReplicationGroup sets the ReplicationGroup field's value. +func (s *StartMigrationOutput) SetReplicationGroup(v *ReplicationGroup) *StartMigrationOutput { + s.ReplicationGroup = v + return s +} + // Represents the subnet associated with a cluster. This parameter refers to // subnets defined in Amazon Virtual Private Cloud (Amazon VPC) and used with // ElastiCache. diff --git a/service/elasticache/elasticacheiface/interface.go b/service/elasticache/elasticacheiface/interface.go index 26fc590c14..f0b0fb8df9 100644 --- a/service/elasticache/elasticacheiface/interface.go +++ b/service/elasticache/elasticacheiface/interface.go @@ -76,6 +76,10 @@ type ElastiCacheAPI interface { BatchStopUpdateActionWithContext(aws.Context, *elasticache.BatchStopUpdateActionInput, ...request.Option) (*elasticache.BatchStopUpdateActionOutput, error) BatchStopUpdateActionRequest(*elasticache.BatchStopUpdateActionInput) (*request.Request, *elasticache.BatchStopUpdateActionOutput) + CompleteMigration(*elasticache.CompleteMigrationInput) (*elasticache.CompleteMigrationOutput, error) + CompleteMigrationWithContext(aws.Context, *elasticache.CompleteMigrationInput, ...request.Option) (*elasticache.CompleteMigrationOutput, error) + CompleteMigrationRequest(*elasticache.CompleteMigrationInput) (*request.Request, *elasticache.CompleteMigrationOutput) + CopySnapshot(*elasticache.CopySnapshotInput) (*elasticache.CopySnapshotOutput, error) CopySnapshotWithContext(aws.Context, *elasticache.CopySnapshotInput, ...request.Option) (*elasticache.CopySnapshotOutput, error) CopySnapshotRequest(*elasticache.CopySnapshotInput) (*request.Request, *elasticache.CopySnapshotOutput) @@ -282,6 +286,10 @@ type ElastiCacheAPI interface { RevokeCacheSecurityGroupIngressWithContext(aws.Context, *elasticache.RevokeCacheSecurityGroupIngressInput, ...request.Option) (*elasticache.RevokeCacheSecurityGroupIngressOutput, error) RevokeCacheSecurityGroupIngressRequest(*elasticache.RevokeCacheSecurityGroupIngressInput) (*request.Request, *elasticache.RevokeCacheSecurityGroupIngressOutput) + StartMigration(*elasticache.StartMigrationInput) (*elasticache.StartMigrationOutput, error) + StartMigrationWithContext(aws.Context, *elasticache.StartMigrationInput, ...request.Option) (*elasticache.StartMigrationOutput, error) + StartMigrationRequest(*elasticache.StartMigrationInput) (*request.Request, *elasticache.StartMigrationOutput) + TestFailover(*elasticache.TestFailoverInput) (*elasticache.TestFailoverOutput, error) TestFailoverWithContext(aws.Context, *elasticache.TestFailoverInput, ...request.Option) (*elasticache.TestFailoverOutput, error) TestFailoverRequest(*elasticache.TestFailoverInput) (*request.Request, *elasticache.TestFailoverOutput) diff --git a/service/elasticache/errors.go b/service/elasticache/errors.go index 8f75570b99..25579b1d5d 100644 --- a/service/elasticache/errors.go +++ b/service/elasticache/errors.go @@ -235,12 +235,24 @@ const ( // The specified replication group already exists. ErrCodeReplicationGroupAlreadyExistsFault = "ReplicationGroupAlreadyExists" + // ErrCodeReplicationGroupAlreadyUnderMigrationFault for service response error code + // "ReplicationGroupAlreadyUnderMigrationFault". + // + // The targeted replication group is not available. + ErrCodeReplicationGroupAlreadyUnderMigrationFault = "ReplicationGroupAlreadyUnderMigrationFault" + // ErrCodeReplicationGroupNotFoundFault for service response error code // "ReplicationGroupNotFoundFault". // // The specified replication group does not exist. ErrCodeReplicationGroupNotFoundFault = "ReplicationGroupNotFoundFault" + // ErrCodeReplicationGroupNotUnderMigrationFault for service response error code + // "ReplicationGroupNotUnderMigrationFault". + // + // The designated replication group is not available for data migration. + ErrCodeReplicationGroupNotUnderMigrationFault = "ReplicationGroupNotUnderMigrationFault" + // ErrCodeReservedCacheNodeAlreadyExistsFault for service response error code // "ReservedCacheNodeAlreadyExists". // diff --git a/service/transfer/api.go b/service/transfer/api.go index 575135be92..8088bea141 100644 --- a/service/transfer/api.go +++ b/service/transfer/api.go @@ -368,6 +368,11 @@ func (c *Transfer) DeleteSshPublicKeyRequest(input *DeleteSshPublicKeyInput) (re // This exception is thrown when a resource is not found by the AWS Transfer // for SFTP service. // +// * ErrCodeThrottlingException "ThrottlingException" +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/DeleteSshPublicKey func (c *Transfer) DeleteSshPublicKey(input *DeleteSshPublicKeyInput) (*DeleteSshPublicKeyOutput, error) { req, out := c.DeleteSshPublicKeyRequest(input) @@ -746,6 +751,11 @@ func (c *Transfer) ImportSshPublicKeyRequest(input *ImportSshPublicKeyInput) (re // This exception is thrown when a resource is not found by the AWS Transfer // for SFTP service. // +// * ErrCodeThrottlingException "ThrottlingException" +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/ImportSshPublicKey func (c *Transfer) ImportSshPublicKey(input *ImportSshPublicKeyInput) (*ImportSshPublicKeyOutput, error) { req, out := c.ImportSshPublicKeyRequest(input) @@ -1286,6 +1296,11 @@ func (c *Transfer) StartServerRequest(input *StartServerInput) (req *request.Req // This exception is thrown when a resource is not found by the AWS Transfer // for SFTP service. // +// * ErrCodeThrottlingException "ThrottlingException" +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StartServer func (c *Transfer) StartServer(input *StartServerInput) (*StartServerOutput, error) { req, out := c.StartServerRequest(input) @@ -1387,6 +1402,11 @@ func (c *Transfer) StopServerRequest(input *StopServerInput) (req *request.Reque // This exception is thrown when a resource is not found by the AWS Transfer // for SFTP service. // +// * ErrCodeThrottlingException "ThrottlingException" +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/StopServer func (c *Transfer) StopServer(input *StopServerInput) (*StopServerOutput, error) { req, out := c.StopServerRequest(input) @@ -1477,6 +1497,10 @@ func (c *Transfer) TagResourceRequest(input *TagResourceInput) (req *request.Req // * ErrCodeInvalidRequestException "InvalidRequestException" // This exception is thrown when the client submits a malformed request. // +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/TagResource func (c *Transfer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { req, out := c.TagResourceRequest(input) @@ -1661,6 +1685,10 @@ func (c *Transfer) UntagResourceRequest(input *UntagResourceInput) (req *request // * ErrCodeInvalidRequestException "InvalidRequestException" // This exception is thrown when the client submits a malformed request. // +// * ErrCodeResourceNotFoundException "ResourceNotFoundException" +// This exception is thrown when a resource is not found by the AWS Transfer +// for SFTP service. +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UntagResource func (c *Transfer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { req, out := c.UntagResourceRequest(input) @@ -1750,10 +1778,18 @@ func (c *Transfer) UpdateServerRequest(input *UpdateServerInput) (req *request.R // * ErrCodeInvalidRequestException "InvalidRequestException" // This exception is thrown when the client submits a malformed request. // +// * ErrCodeResourceExistsException "ResourceExistsException" +// The requested resource does not exist. +// // * ErrCodeResourceNotFoundException "ResourceNotFoundException" // This exception is thrown when a resource is not found by the AWS Transfer // for SFTP service. // +// * ErrCodeThrottlingException "ThrottlingException" +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateServer func (c *Transfer) UpdateServer(input *UpdateServerInput) (*UpdateServerOutput, error) { req, out := c.UpdateServerRequest(input) @@ -1848,6 +1884,11 @@ func (c *Transfer) UpdateUserRequest(input *UpdateUserInput) (req *request.Reque // This exception is thrown when a resource is not found by the AWS Transfer // for SFTP service. // +// * ErrCodeThrottlingException "ThrottlingException" +// The request was denied due to request throttling. +// +// HTTP Status Code: 400 +// // See also, https://docs.aws.amazon.com/goto/WebAPI/transfer-2018-11-05/UpdateUser func (c *Transfer) UpdateUser(input *UpdateUserInput) (*UpdateUserOutput, error) { req, out := c.UpdateUserRequest(input) @@ -1890,7 +1931,7 @@ type CreateServerInput struct { // to a new AWS SFTP server, don't update the host key. Accidentally changing // a server's host key can be disruptive. // - // For more information, see "https://docs.aws.amazon.com/transfer/latest/userguide/change-host-key" + // For more information, see "https://alpha-docs-aws.amazon.com/transfer/latest/userguide/configuring-servers.html#change-host-key" // in the AWS SFTP User Guide. HostKey *string `type:"string" sensitive:"true"` @@ -1910,7 +1951,7 @@ type CreateServerInput struct { // A value that allows the service to write your SFTP users' activity to your // Amazon CloudWatch logs for monitoring and auditing purposes. - LoggingRole *string `type:"string"` + LoggingRole *string `min:"20" type:"string"` // Key-value pairs that can be used to group and search for servers. Tags []*Tag `min:"1" type:"list"` @@ -1929,9 +1970,22 @@ func (s CreateServerInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateServerInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateServerInput"} + if s.LoggingRole != nil && len(*s.LoggingRole) < 20 { + invalidParams.Add(request.NewErrParamMinLen("LoggingRole", 20)) + } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } + if s.EndpointDetails != nil { + if err := s.EndpointDetails.Validate(); err != nil { + invalidParams.AddNested("EndpointDetails", err.(request.ErrInvalidParams)) + } + } + if s.IdentityProviderDetails != nil { + if err := s.IdentityProviderDetails.Validate(); err != nil { + invalidParams.AddNested("IdentityProviderDetails", err.(request.ErrInvalidParams)) + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -1997,7 +2051,7 @@ type CreateServerOutput struct { // The service-assigned ID of the SFTP server that is created. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -2020,9 +2074,33 @@ type CreateUserInput struct { _ struct{} `type:"structure"` // The landing directory (folder) for a user when they log in to the server - // using their SFTP client. An example is /home/username . + // using their SFTP client. + // + // An example is /home/username. HomeDirectory *string `type:"string"` + // Logical directory mappings that specify what S3 paths and keys should be + // visible to your user and how you want to make them visible. You will need + // to specify the "Entry" and "Target" pair, where Entry shows how the path + // is made visible and Target is the actual S3 path. If you only specify a target, + // it will be displayed as is. You will need to also make sure that your AWS + // IAM Role provides access to paths in Target. The following is an example. + // + // '[ "/bucket2/documentation", { "Entry": "your-personal-report.pdf", "Target": + // "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]' + // + // In most cases, you can use this value instead of the scope down policy to + // lock your user down to the designated home directory ("chroot"). To do this, + // you can set Entry to '/' and set Target to the HomeDirectory parameter value. + HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` + + // The type of landing directory (folder) you want your users' home directory + // to be when they log into the SFTP server. If you set it to PATH, the user + // will see the absolute Amazon S3 bucket paths as is in their SFTP clients. + // If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings + // for how you want to make S3 paths visible to your user. + HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` + // A scope-down policy for your user so you can use the same IAM role across // multiple users. This policy scopes down user access to portions of their // Amazon S3 bucket. Variables that you can use inside this policy include ${Transfer:UserName}, @@ -2047,13 +2125,13 @@ type CreateUserInput struct { // SFTP user's transfer requests. // // Role is a required field - Role *string `type:"string" required:"true"` + Role *string `min:"20" type:"string" required:"true"` // A system-assigned unique identifier for an SFTP server instance. This is // the specific SFTP server that you added your user to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // The public portion of the Secure Shell (SSH) key used to authenticate the // user to the SFTP server. @@ -2069,7 +2147,7 @@ type CreateUserInput struct { // underscore, and hyphen. The user name can't start with a hyphen. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -2085,18 +2163,40 @@ func (s CreateUserInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateUserInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateUserInput"} + if s.HomeDirectoryMappings != nil && len(s.HomeDirectoryMappings) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HomeDirectoryMappings", 1)) + } if s.Role == nil { invalidParams.Add(request.NewErrParamRequired("Role")) } + if s.Role != nil && len(*s.Role) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Role", 20)) + } if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.Tags != nil && len(s.Tags) < 1 { invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } + if s.HomeDirectoryMappings != nil { + for i, v := range s.HomeDirectoryMappings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HomeDirectoryMappings", i), err.(request.ErrInvalidParams)) + } + } + } if s.Tags != nil { for i, v := range s.Tags { if v == nil { @@ -2120,6 +2220,18 @@ func (s *CreateUserInput) SetHomeDirectory(v string) *CreateUserInput { return s } +// SetHomeDirectoryMappings sets the HomeDirectoryMappings field's value. +func (s *CreateUserInput) SetHomeDirectoryMappings(v []*HomeDirectoryMapEntry) *CreateUserInput { + s.HomeDirectoryMappings = v + return s +} + +// SetHomeDirectoryType sets the HomeDirectoryType field's value. +func (s *CreateUserInput) SetHomeDirectoryType(v string) *CreateUserInput { + s.HomeDirectoryType = &v + return s +} + // SetPolicy sets the Policy field's value. func (s *CreateUserInput) SetPolicy(v string) *CreateUserInput { s.Policy = &v @@ -2162,12 +2274,12 @@ type CreateUserOutput struct { // The ID of the SFTP server that the user is attached to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // A unique string that identifies a user account associated with an SFTP server. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -2198,7 +2310,7 @@ type DeleteServerInput struct { // A unique system-assigned identifier for an SFTP server instance. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -2217,6 +2329,9 @@ func (s *DeleteServerInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2251,17 +2366,17 @@ type DeleteSshPublicKeyInput struct { // server instance that has the user assigned to it. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // A unique identifier used to reference your user's specific SSH key. // // SshPublicKeyId is a required field - SshPublicKeyId *string `type:"string" required:"true"` + SshPublicKeyId *string `min:"21" type:"string" required:"true"` // A unique string that identifies a user whose public key is being deleted. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -2280,12 +2395,21 @@ func (s *DeleteSshPublicKeyInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.SshPublicKeyId == nil { invalidParams.Add(request.NewErrParamRequired("SshPublicKeyId")) } + if s.SshPublicKeyId != nil && len(*s.SshPublicKeyId) < 21 { + invalidParams.Add(request.NewErrParamMinLen("SshPublicKeyId", 21)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2332,12 +2456,12 @@ type DeleteUserInput struct { // the user assigned to it. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // A unique string that identifies a user that is being deleted from the server. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -2356,9 +2480,15 @@ func (s *DeleteUserInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2398,7 +2528,7 @@ type DescribeServerInput struct { // A system-assigned unique identifier for an SFTP server. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -2417,6 +2547,9 @@ func (s *DescribeServerInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2462,14 +2595,14 @@ type DescribeUserInput struct { // assigned. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // The name of the user assigned to one or more servers. User names are part // of the sign-in credentials to use the AWS Transfer for SFTP service and perform // file transfer tasks. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -2488,9 +2621,15 @@ func (s *DescribeUserInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2517,7 +2656,7 @@ type DescribeUserOutput struct { // assigned. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // An array containing the properties of the user account for the ServerID value // that you specified. @@ -2588,11 +2727,11 @@ type DescribedServer struct { // This property is an AWS Identity and Access Management (IAM) entity that // allows the server to turn on Amazon CloudWatch logging for Amazon S3 events. // When set, user activity can be viewed in your CloudWatch logs. - LoggingRole *string `type:"string"` + LoggingRole *string `min:"20" type:"string"` // This property is a unique system-assigned identifier for the SFTP server // that you instantiate. - ServerId *string `type:"string"` + ServerId *string `min:"19" type:"string"` // The condition of the SFTP server for the server that was described. A value // of ONLINE indicates that the server can accept jobs and transfer files. A @@ -2701,9 +2840,32 @@ type DescribedUser struct { // This property specifies the landing directory (or folder), which is the location // that files are written to or read from in an Amazon S3 bucket for the described - // user. An example is /bucket_name/home/username . + // user. An example is /your s3 bucket name/home/username . HomeDirectory *string `type:"string"` + // Logical directory mappings that you specified for what S3 paths and keys + // should be visible to your user and how you want to make them visible. You + // will need to specify the "Entry" and "Target" pair, where Entry shows how + // the path is made visible and Target is the actual S3 path. If you only specify + // a target, it will be displayed as is. You will need to also make sure that + // your AWS IAM Role provides access to paths in Target. + // + // In most cases, you can use this value instead of the scope down policy to + // lock your user down to the designated home directory ("chroot"). To do this, + // you can set Entry to '/' and set Target to the HomeDirectory parameter value. + // + // In most cases, you can use this value instead of the scope down policy to + // lock your user down to the designated home directory ("chroot"). To do this, + // you can set Entry to '/' and set Target to the HomeDirectory parameter value. + HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` + + // The type of landing directory (folder) you mapped for your users' to see + // when they log into the SFTP server. If you set it to PATH, the user will + // see the absolute Amazon S3 bucket paths as is in their SFTP clients. If you + // set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings + // for how you want to make S3 paths visible to your user. + HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` + // Specifies the name of the policy in use for the described user. Policy *string `type:"string"` @@ -2713,7 +2875,7 @@ type DescribedUser struct { // into and out of your Amazon S3 bucket or buckets. The IAM role should also // contain a trust relationship that allows the SFTP server to access your resources // when servicing your SFTP user's transfer requests. - Role *string `type:"string"` + Role *string `min:"20" type:"string"` // This property contains the public key portion of the Secure Shell (SSH) keys // stored for the described user. @@ -2726,7 +2888,7 @@ type DescribedUser struct { // This property is the name of the user that was requested to be described. // User names are used for authentication purposes. This is the string that // will be used by your user when they log in to your SFTP server. - UserName *string `type:"string"` + UserName *string `min:"3" type:"string"` } // String returns the string representation @@ -2751,6 +2913,18 @@ func (s *DescribedUser) SetHomeDirectory(v string) *DescribedUser { return s } +// SetHomeDirectoryMappings sets the HomeDirectoryMappings field's value. +func (s *DescribedUser) SetHomeDirectoryMappings(v []*HomeDirectoryMapEntry) *DescribedUser { + s.HomeDirectoryMappings = v + return s +} + +// SetHomeDirectoryType sets the HomeDirectoryType field's value. +func (s *DescribedUser) SetHomeDirectoryType(v string) *DescribedUser { + s.HomeDirectoryType = &v + return s +} + // SetPolicy sets the Policy field's value. func (s *DescribedUser) SetPolicy(v string) *DescribedUser { s.Policy = &v @@ -2787,7 +2961,7 @@ type EndpointDetails struct { _ struct{} `type:"structure"` // The ID of the VPC endpoint. - VpcEndpointId *string `type:"string"` + VpcEndpointId *string `min:"22" type:"string"` } // String returns the string representation @@ -2800,12 +2974,78 @@ func (s EndpointDetails) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *EndpointDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EndpointDetails"} + if s.VpcEndpointId != nil && len(*s.VpcEndpointId) < 22 { + invalidParams.Add(request.NewErrParamMinLen("VpcEndpointId", 22)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetVpcEndpointId sets the VpcEndpointId field's value. func (s *EndpointDetails) SetVpcEndpointId(v string) *EndpointDetails { s.VpcEndpointId = &v return s } +// Represents an object that contains entries and a targets for HomeDirectoryMappings. +type HomeDirectoryMapEntry struct { + _ struct{} `type:"structure"` + + // Represents an entry and a target for HomeDirectoryMappings. + // + // Entry is a required field + Entry *string `type:"string" required:"true"` + + // Represents the map target that is used in a HomeDirectorymapEntry. + // + // Target is a required field + Target *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s HomeDirectoryMapEntry) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s HomeDirectoryMapEntry) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *HomeDirectoryMapEntry) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "HomeDirectoryMapEntry"} + if s.Entry == nil { + invalidParams.Add(request.NewErrParamRequired("Entry")) + } + if s.Target == nil { + invalidParams.Add(request.NewErrParamRequired("Target")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetEntry sets the Entry field's value. +func (s *HomeDirectoryMapEntry) SetEntry(v string) *HomeDirectoryMapEntry { + s.Entry = &v + return s +} + +// SetTarget sets the Target field's value. +func (s *HomeDirectoryMapEntry) SetTarget(v string) *HomeDirectoryMapEntry { + s.Target = &v + return s +} + // Returns information related to the type of user authentication that is in // use for a server's users. A server can have only one method of authentication. type IdentityProviderDetails struct { @@ -2813,7 +3053,7 @@ type IdentityProviderDetails struct { // The InvocationRole parameter provides the type of InvocationRole used to // authenticate the user account. - InvocationRole *string `type:"string"` + InvocationRole *string `min:"20" type:"string"` // The Url parameter provides contains the location of the service endpoint // used to authenticate users. @@ -2830,6 +3070,19 @@ func (s IdentityProviderDetails) GoString() string { return s.String() } +// Validate inspects the fields of the type to determine if they are valid. +func (s *IdentityProviderDetails) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IdentityProviderDetails"} + if s.InvocationRole != nil && len(*s.InvocationRole) < 20 { + invalidParams.Add(request.NewErrParamMinLen("InvocationRole", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + // SetInvocationRole sets the InvocationRole field's value. func (s *IdentityProviderDetails) SetInvocationRole(v string) *IdentityProviderDetails { s.InvocationRole = &v @@ -2848,7 +3101,7 @@ type ImportSshPublicKeyInput struct { // A system-assigned unique identifier for an SFTP server. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // The public key portion of an SSH key pair. // @@ -2858,7 +3111,7 @@ type ImportSshPublicKeyInput struct { // The name of the user account that is assigned to one or more servers. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -2877,12 +3130,18 @@ func (s *ImportSshPublicKeyInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.SshPublicKeyBody == nil { invalidParams.Add(request.NewErrParamRequired("SshPublicKeyBody")) } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } if invalidParams.Len() > 0 { return invalidParams @@ -2917,18 +3176,18 @@ type ImportSshPublicKeyOutput struct { // A system-assigned unique identifier for an SFTP server. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // This identifier is the name given to a public key by the system that was // imported. // // SshPublicKeyId is a required field - SshPublicKeyId *string `type:"string" required:"true"` + SshPublicKeyId *string `min:"21" type:"string" required:"true"` // A user name assigned to the ServerID value that you specified. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -3175,7 +3434,7 @@ type ListUsersInput struct { // server that has users assigned to it. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -3200,6 +3459,9 @@ func (s *ListUsersInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3237,7 +3499,7 @@ type ListUsersOutput struct { // assigned to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // Returns the user accounts and their properties for the ServerId value that // you specify. @@ -3296,11 +3558,11 @@ type ListedServer struct { // The AWS Identity and Access Management entity that allows the server to turn // on Amazon CloudWatch logging. - LoggingRole *string `type:"string"` + LoggingRole *string `min:"20" type:"string"` // This value is the unique system assigned identifier for the SFTP servers // that were listed. - ServerId *string `type:"string"` + ServerId *string `min:"19" type:"string"` // This property describes the condition of the SFTP server for the server that // was described. A value of ONLINE> indicates that the server can accept jobs @@ -3383,18 +3645,25 @@ type ListedUser struct { // an Amazon S3 bucket for the user you specify by their ARN. HomeDirectory *string `type:"string"` + // The type of landing directory (folder) you mapped for your users' home directory. + // If you set it to PATH, the user will see the absolute Amazon S3 bucket paths + // as is in their SFTP clients. If you set it LOGICAL, you will need to provide + // mappings in the HomeDirectoryMappings for how you want to make S3 paths visible + // to your user. + HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` + // The role in use by this user. A role is an AWS Identity and Access Management // (IAM) entity that, in this case, allows the SFTP server to act on a user's // behalf. It allows the server to inherit the trust relationship that enables // that user to perform file operations to their Amazon S3 bucket. - Role *string `type:"string"` + Role *string `min:"20" type:"string"` // This value is the number of SSH public keys stored for the user you specified. SshPublicKeyCount *int64 `type:"integer"` // The name of the user whose ARN was specified. User names are used for authentication // purposes. - UserName *string `type:"string"` + UserName *string `min:"3" type:"string"` } // String returns the string representation @@ -3419,6 +3688,12 @@ func (s *ListedUser) SetHomeDirectory(v string) *ListedUser { return s } +// SetHomeDirectoryType sets the HomeDirectoryType field's value. +func (s *ListedUser) SetHomeDirectoryType(v string) *ListedUser { + s.HomeDirectoryType = &v + return s +} + // SetRole sets the Role field's value. func (s *ListedUser) SetRole(v string) *ListedUser { s.Role = &v @@ -3458,7 +3733,7 @@ type SshPublicKey struct { // The SshPublicKeyId parameter contains the identifier of the public key. // // SshPublicKeyId is a required field - SshPublicKeyId *string `type:"string" required:"true"` + SshPublicKeyId *string `min:"21" type:"string" required:"true"` } // String returns the string representation @@ -3495,7 +3770,7 @@ type StartServerInput struct { // A system-assigned unique identifier for an SFTP server that you start. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -3514,6 +3789,9 @@ func (s *StartServerInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3547,7 +3825,7 @@ type StopServerInput struct { // A system-assigned unique identifier for an SFTP server that you stopped. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -3566,6 +3844,9 @@ func (s *StopServerInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3744,12 +4025,12 @@ type TestIdentityProviderInput struct { // method is tested with a user name and password. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // This request parameter is the name of the user account to be tested. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` // The password of the user account to be tested. UserPassword *string `type:"string" sensitive:"true"` @@ -3771,9 +4052,15 @@ func (s *TestIdentityProviderInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } if invalidParams.Len() > 0 { return invalidParams @@ -3966,7 +4253,7 @@ type UpdateServerInput struct { // user account is assigned to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -3985,6 +4272,19 @@ func (s *UpdateServerInput) Validate() error { if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } + if s.EndpointDetails != nil { + if err := s.EndpointDetails.Validate(); err != nil { + invalidParams.AddNested("EndpointDetails", err.(request.ErrInvalidParams)) + } + } + if s.IdentityProviderDetails != nil { + if err := s.IdentityProviderDetails.Validate(); err != nil { + invalidParams.AddNested("IdentityProviderDetails", err.(request.ErrInvalidParams)) + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4035,7 +4335,7 @@ type UpdateServerOutput struct { // is assigned to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` } // String returns the string representation @@ -4058,9 +4358,33 @@ type UpdateUserInput struct { _ struct{} `type:"structure"` // A parameter that specifies the landing directory (folder) for a user when - // they log in to the server using their client. An example is /home/username . + // they log in to the server using their client. + // + // An example is /home/username. HomeDirectory *string `type:"string"` + // Logical directory mappings that specify what S3 paths and keys should be + // visible to your user and how you want to make them visible. You will need + // to specify the "Entry" and "Target" pair, where Entry shows how the path + // is made visible and Target is the actual S3 path. If you only specify a target, + // it will be displayed as is. You will need to also make sure that your AWS + // IAM Role provides access to paths in Target. The following is an example. + // + // '[ "/bucket2/documentation", { "Entry": "your-personal-report.pdf", "Target": + // "/bucket3/customized-reports/${transfer:UserName}.pdf" } ]' + // + // In most cases, you can use this value instead of the scope down policy to + // lock your user down to the designated home directory ("chroot"). To do this, + // you can set Entry to '/' and set Target to the HomeDirectory parameter value. + HomeDirectoryMappings []*HomeDirectoryMapEntry `min:"1" type:"list"` + + // The type of landing directory (folder) you want your users' home directory + // to be when they log into the SFTP serve. If you set it to PATH, the user + // will see the absolute Amazon S3 bucket paths as is in their SFTP clients. + // If you set it LOGICAL, you will need to provide mappings in the HomeDirectoryMappings + // for how you want to make S3 paths visible to your user. + HomeDirectoryType *string `type:"string" enum:"HomeDirectoryType"` + // Allows you to supply a scope-down policy for your user so you can use the // same AWS Identity and Access Management (IAM) role across multiple users. // The policy scopes down user access to portions of your Amazon S3 bucket. @@ -4084,13 +4408,13 @@ type UpdateUserInput struct { // S3 bucket or buckets. The IAM role should also contain a trust relationship // that allows the Secure File Transfer Protocol (SFTP) server to access your // resources when servicing your SFTP user's transfer requests. - Role *string `type:"string"` + Role *string `min:"20" type:"string"` // A system-assigned unique identifier for an SFTP server instance that the // user account is assigned to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // A unique string that identifies a user and is associated with a server as // specified by the ServerId. This is the string that will be used by your user @@ -4099,7 +4423,7 @@ type UpdateUserInput struct { // A-Z, 0-9, underscore, and hyphen. The user name can't start with a hyphen. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -4115,12 +4439,34 @@ func (s UpdateUserInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *UpdateUserInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "UpdateUserInput"} + if s.HomeDirectoryMappings != nil && len(s.HomeDirectoryMappings) < 1 { + invalidParams.Add(request.NewErrParamMinLen("HomeDirectoryMappings", 1)) + } + if s.Role != nil && len(*s.Role) < 20 { + invalidParams.Add(request.NewErrParamMinLen("Role", 20)) + } if s.ServerId == nil { invalidParams.Add(request.NewErrParamRequired("ServerId")) } + if s.ServerId != nil && len(*s.ServerId) < 19 { + invalidParams.Add(request.NewErrParamMinLen("ServerId", 19)) + } if s.UserName == nil { invalidParams.Add(request.NewErrParamRequired("UserName")) } + if s.UserName != nil && len(*s.UserName) < 3 { + invalidParams.Add(request.NewErrParamMinLen("UserName", 3)) + } + if s.HomeDirectoryMappings != nil { + for i, v := range s.HomeDirectoryMappings { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "HomeDirectoryMappings", i), err.(request.ErrInvalidParams)) + } + } + } if invalidParams.Len() > 0 { return invalidParams @@ -4134,6 +4480,18 @@ func (s *UpdateUserInput) SetHomeDirectory(v string) *UpdateUserInput { return s } +// SetHomeDirectoryMappings sets the HomeDirectoryMappings field's value. +func (s *UpdateUserInput) SetHomeDirectoryMappings(v []*HomeDirectoryMapEntry) *UpdateUserInput { + s.HomeDirectoryMappings = v + return s +} + +// SetHomeDirectoryType sets the HomeDirectoryType field's value. +func (s *UpdateUserInput) SetHomeDirectoryType(v string) *UpdateUserInput { + s.HomeDirectoryType = &v + return s +} + // SetPolicy sets the Policy field's value. func (s *UpdateUserInput) SetPolicy(v string) *UpdateUserInput { s.Policy = &v @@ -4167,13 +4525,13 @@ type UpdateUserOutput struct { // user account is assigned to. // // ServerId is a required field - ServerId *string `type:"string" required:"true"` + ServerId *string `min:"19" type:"string" required:"true"` // The unique identifier for a user that is assigned to the SFTP server instance // that was specified in the request. // // UserName is a required field - UserName *string `type:"string" required:"true"` + UserName *string `min:"3" type:"string" required:"true"` } // String returns the string representation @@ -4206,6 +4564,14 @@ const ( EndpointTypeVpcEndpoint = "VPC_ENDPOINT" ) +const ( + // HomeDirectoryTypePath is a HomeDirectoryType enum value + HomeDirectoryTypePath = "PATH" + + // HomeDirectoryTypeLogical is a HomeDirectoryType enum value + HomeDirectoryTypeLogical = "LOGICAL" +) + // Returns information related to the type of user authentication that is in // use for a server's users. For SERVICE_MANAGED authentication, the Secure // Shell (SSH) public keys are stored with a user on an SFTP server instance. diff --git a/service/transfer/errors.go b/service/transfer/errors.go index 0734c873b5..60b6a6269f 100644 --- a/service/transfer/errors.go +++ b/service/transfer/errors.go @@ -41,4 +41,12 @@ const ( // // The request has failed because the AWS Transfer for SFTP service is not available. ErrCodeServiceUnavailableException = "ServiceUnavailableException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The request was denied due to request throttling. + // + // HTTP Status Code: 400 + ErrCodeThrottlingException = "ThrottlingException" )