diff --git a/.ci-operator.yaml b/.ci-operator.yaml index d4afa08b70..257d12b37f 100644 --- a/.ci-operator.yaml +++ b/.ci-operator.yaml @@ -1,4 +1,4 @@ build_root_image: name: builder namespace: ocp - tag: rhel-8-golang-1.15-openshift-4.7 + tag: rhel-8-golang-1.16-openshift-4.9 diff --git a/.github/workflows/container-image.yaml b/.github/workflows/container-image.yaml index 9a0e1e50e4..094a439444 100644 --- a/.github/workflows/container-image.yaml +++ b/.github/workflows/container-image.yaml @@ -37,9 +37,10 @@ jobs: - name: Set environment variables run: | BRANCH=$(echo $GITHUB_REF | cut -d'/' -f3) + SHORT_SHA=$(echo $GITHUB_SHA | cut -c -7) echo "BRANCH=$BRANCH" >> $GITHUB_ENV if [ "$BRANCH" = "master" ]; then - TAG="latest" + TAG=$SHORT_SHA else TAG=$BRANCH fi diff --git a/.gitignore b/.gitignore index 647acc1433..d502c8a9f5 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,7 @@ Vagrantfile *.swp # IntelliJ -.idea/ \ No newline at end of file +.idea/ + +#MacOS system files +*.DS_Store \ No newline at end of file diff --git a/CHANGELOG-0.x.md b/CHANGELOG-0.x.md index 8b209f3a20..6b561354df 100644 --- a/CHANGELOG-0.x.md +++ b/CHANGELOG-0.x.md @@ -1,3 +1,68 @@ +# v1.2.0 +## Notable changes +* utilize latest go sdk to ensure createVolume idempotency ([#982](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/982), [@AndyXiangLi](https://github.com/AndyXiangLi)) +* Implement Windows NodePublish/Unpublish ([#823](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/823), [@wongma7](https://github.com/wongma7)) +- In a future release, the debian-based image will be removed and only an al2-based image will be maintained and pushed to GCR and ECR +- In a future release, images will stop getting pushed to Docker Hub + +### Bug fixes +* Update driver capabilities ([#922](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/922), [@wongma7](https://github.com/wongma7)) +* update inFlight cache to avoid race condition on volume operation ([#924](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/924), [@AndyXiangLi](https://github.com/AndyXiangLi)) +* Update example policy, use it in tests, and document it ([#940](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/940), [@wongma7](https://github.com/wongma7)) +* Default extra-create-metadata true so that volumes get created with pvc/pv tags ([#937](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/937), [@wongma7](https://github.com/wongma7)) +* Default controller.extra-create-metadata true so that volumes get created with pvc/pv tags ([#941](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/941), [@wongma7](https://github.com/wongma7)) + +### New features +* Implement Windows NodePublish/Unpublish ([#823](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/823), [@wongma7](https://github.com/wongma7)) +* Feature/allow add debug args ([#970](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/970), [@mkkatica](https://github.com/mkkatica)) +* Updated default setting of windows daemon set ([#978](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/978), [@nirmalaagash](https://github.com/nirmalaagash)) +* Update to csi-proxy v1 APIs ([#966](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/966), [@wongma7](https://github.com/wongma7)) + +### Installation updates +* Add test-e2e-external-eks make rule that tests EKS with pod instance metadata disabled. Remove hostNetwork from DaemonSet ([#907](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/907), [@wongma7](https://github.com/wongma7)) +* helm chart configurable log verbosity ([#908](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/908), [@wongma7](https://github.com/wongma7)) +* Fix podLabels case in Helm chart ([#925](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/925), [@eytanhanig](https://github.com/eytanhanig)) +* Add KubernetesCluster tag to provisioned volumes when cluster-id set ([#932](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/932), [@wongma7](https://github.com/wongma7)) +* Stop pushing latest tag and remove all references to it ([#949](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/949), [@wongma7](https://github.com/wongma7)) +* Install snapshot controller independently of helm for e2e tests ([#968](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/968), [@wongma7](https://github.com/wongma7)) +* Several breaking changes to the helm chart ([#965](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/965), [@krmichel](https://github.com/krmichel)) +* Increased the helm chart version ([#980](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/980), [@nirmalaagash](https://github.com/nirmalaagash)) +* [helm-chart] csi-snapshotter in ebs-csi-controller now checks for enableVolumeSnapshot before including it in containers ([#960](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/960), [@missingcharacter](https://github.com/missingcharacter)) + +### Misc. +* Disable uuid checks on XFS ([#913](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/913), [@jsafrane](https://github.com/jsafrane)) +* merge v1.1.0 release commits back to master ([#921](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/921), [@vdhanan](https://github.com/vdhanan)) +* Add migration upgrade/downgrade test ([#927](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/927), [@wongma7](https://github.com/wongma7)) +* Grant EKSCTL_ADMIN_ROLE admin access to eksctl clusters ([#933](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/933), [@wongma7](https://github.com/wongma7)) +* Adding CRDs VolumeSnapshotClass, VolumeSnapshotContent, VolumeSnapshot for snapshot.storage.k8s.io/v1 ([#938](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/938), [@missingcharacter](https://github.com/missingcharacter)) +* Revert "Fix kustomize RBAC bindings to have namespace kube-system" ([#947](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/947), [@TheRealDwright](https://github.com/TheRealDwright)) +* Clarify that using instance profile for permission requires instance metadata access on ([#952](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/952), [@wongma7](https://github.com/wongma7)) +* Release v1.1.1 and chart v1.2.4 ([#959](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/959), [@wongma7](https://github.com/wongma7)) +* Download fixed version of eksctl to avoid bugs ([#967](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/967), [@wongma7](https://github.com/wongma7)) +* Nit: Fix typo in the CHANGELOG ([#971](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/971), [@ialidzhikov](https://github.com/ialidzhikov)) +* Add how to consume new hack/e2e scripts in other repos (efs/fsx) ([#972](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/972), [@wongma7](https://github.com/wongma7)) +* Updated README.md and changed the version in snapshot example ([#976](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/976), [@nirmalaagash](https://github.com/nirmalaagash)) +* Update base images: yum update al2, bump debian tag ([#986](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/986), [@wongma7](https://github.com/wongma7)) +* Release 1.1.3 ([#992](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/992), [@wongma7](https://github.com/wongma7)) +* add ecr images to readme ([#998](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/998), [@vdhanan](https://github.com/vdhanan)) + +# v1.1.3 + +## Notable changes +- Fix ecr image being debian-based +- In a future release, the debian-based image will be removed and only an al2-based image will be maintained and pushed to GCR and ECR +- In a future release, images will stop getting pushed to Docker Hub + +# v1.1.2 + +## Notable changes +- Update base images: yum update al2, bump debian tag ([#986](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/986), [@wongma7](https://github.com/wongma7)) + +# v1.1.1 + +### Bug fixes +- update inFlight cache to avoid race condition on volume operation ([#924](https://github.com/kubernetes-sigs/aws-ebs-csi-driver/pull/924), [@AndyXiangLi](https://github.com/AndyXiangLi)) + # v1.1.0 ## Notable changes diff --git a/Dockerfile b/Dockerfile index aa6464e644..080bec481e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,18 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM golang:1.15.6 AS builder +FROM golang:1.16 AS builder WORKDIR /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver COPY . . RUN make FROM amazonlinux:2 AS amazonlinux +RUN yum update -y RUN yum install ca-certificates e2fsprogs xfsprogs util-linux -y +RUN yum clean all COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/bin/aws-ebs-csi-driver /bin/aws-ebs-csi-driver ENTRYPOINT ["/bin/aws-ebs-csi-driver"] -FROM k8s.gcr.io/build-image/debian-base:v2.1.3 AS debian-base +FROM k8s.gcr.io/build-image/debian-base:buster-v1.8.0 AS debian-base RUN clean-install ca-certificates e2fsprogs mount udev util-linux xfsprogs COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/bin/aws-ebs-csi-driver /bin/aws-ebs-csi-driver diff --git a/Dockerfile.windows b/Dockerfile.windows new file mode 100644 index 0000000000..420096dd38 --- /dev/null +++ b/Dockerfile.windows @@ -0,0 +1,23 @@ +# Copyright 2019 The Kubernetes Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +FROM --platform=$BUILDPLATFORM golang:1.16 AS builder +WORKDIR /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver +COPY . . +RUN make bin/aws-ebs-csi-driver.exe + +FROM mcr.microsoft.com/windows/servercore:1809 +COPY --from=builder /go/src/github.com/kubernetes-sigs/aws-ebs-csi-driver/bin/aws-ebs-csi-driver.exe /aws-ebs-csi-driver.exe + +ENTRYPOINT ["/aws-ebs-csi-driver.exe"] diff --git a/Makefile b/Makefile index 61a014d411..d377aa5630 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ PKG=github.com/kubernetes-sigs/aws-ebs-csi-driver IMAGE?=amazon/aws-ebs-csi-driver -VERSION=v1.0.0 +VERSION=v1.2.0 VERSION_AMAZONLINUX=$(VERSION)-amazonlinux GIT_COMMIT?=$(shell git rev-parse HEAD) BUILD_DATE?=$(shell date -u +"%Y-%m-%dT%H:%M:%SZ") @@ -31,6 +31,10 @@ GOBIN=$(shell pwd)/bin bin/aws-ebs-csi-driver: | bin CGO_ENABLED=0 GOOS=linux go build -mod=vendor -ldflags ${LDFLAGS} -o bin/aws-ebs-csi-driver ./cmd/ +.PHONY: bin/aws-ebs-csi-driver.exe +bin/aws-ebs-csi-driver.exe: | bin + CGO_ENABLED=0 GOOS=windows go build -mod=vendor -ldflags ${LDFLAGS} -o bin/aws-ebs-csi-driver.exe ./cmd/ + bin /tmp/helm /tmp/kubeval: @mkdir -p $@ @@ -77,6 +81,8 @@ test-sanity: test-e2e-single-az: AWS_REGION=us-west-2 \ AWS_AVAILABILITY_ZONES=us-west-2a \ + HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \ + EBS_INSTALL_SNAPSHOT="true" \ TEST_PATH=./tests/e2e/... \ GINKGO_FOCUS="\[ebs-csi-e2e\] \[single-az\]" \ GINKGO_SKIP="\"sc1\"|\"st1\"" \ @@ -86,6 +92,8 @@ test-e2e-single-az: test-e2e-multi-az: AWS_REGION=us-west-2 \ AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \ + HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \ + EBS_INSTALL_SNAPSHOT="true" \ TEST_PATH=./tests/e2e/... \ GINKGO_FOCUS="\[ebs-csi-e2e\] \[multi-az\]" \ ./hack/e2e/run.sh @@ -93,7 +101,9 @@ test-e2e-multi-az: .PHONY: test-e2e-migration test-e2e-migration: AWS_REGION=us-west-2 \ - AWS_AVAILABILITY_ZONES=us-west-2a \ + AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \ + HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \ + EBS_INSTALL_SNAPSHOT="true" \ TEST_PATH=./tests/e2e-kubernetes/... \ GINKGO_FOCUS="\[ebs-csi-migration\]" \ EBS_CHECK_MIGRATION=true \ @@ -102,33 +112,28 @@ test-e2e-migration: .PHONY: test-e2e-external test-e2e-external: AWS_REGION=us-west-2 \ - AWS_AVAILABILITY_ZONES=us-west-2a \ + AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b,us-west-2c \ + HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \ + EBS_INSTALL_SNAPSHOT="true" \ TEST_PATH=./tests/e2e-kubernetes/... \ GINKGO_FOCUS="External.Storage" \ GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \ ./hack/e2e/run.sh -.PHONY: image-release -image-release: - docker build -t $(IMAGE):$(VERSION) . --target debian-base - docker build -t $(IMAGE):$(VERSION_AMAZONLINUX) . --target amazonlinux - -.PHONY: image -image: - docker build -t $(IMAGE):latest . --target debian-base - -.PHONY: image-amazonlinux -image-amazonlinux: - docker build -t $(IMAGE):latest . --target amazonlinux - -.PHONY: push-release -push-release: - docker push $(IMAGE):$(VERSION) - docker push $(IMAGE):$(VERSION_AMAZONLINUX) - -.PHONY: push -push: - docker push $(IMAGE):latest +.PHONY: test-e2e-external-eks +test-e2e-external-eks: + CLUSTER_TYPE=eksctl \ + K8S_VERSION="1.20" \ + HELM_VALUES_FILE="./hack/values_eksctl.yaml" \ + HELM_EXTRA_FLAGS='--set=controller.k8sTagClusterId=$$CLUSTER_NAME' \ + EBS_INSTALL_SNAPSHOT="true" \ + EKSCTL_ADMIN_ROLE="Infra-prod-KopsDeleteAllLambdaServiceRoleF1578477-1ELDFIB4KCMXV" \ + AWS_REGION=us-west-2 \ + AWS_AVAILABILITY_ZONES=us-west-2a,us-west-2b \ + TEST_PATH=./tests/e2e-kubernetes/... \ + GINKGO_FOCUS="External.Storage" \ + GINKGO_SKIP="\[Disruptive\]|\[Serial\]" \ + ./hack/e2e/run.sh .PHONY: verify-vendor test: verify-vendor @@ -144,22 +149,15 @@ generate-kustomize: bin/helm cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrole-csi-node.yaml > ../../deploy/kubernetes/base/clusterrole-csi-node.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrole-provisioner.yaml > ../../deploy/kubernetes/base/clusterrole-provisioner.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrole-resizer.yaml > ../../deploy/kubernetes/base/clusterrole-resizer.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrole-snapshot-controller.yaml > ../../deploy/kubernetes/base/clusterrole-snapshot-controller.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrole-snapshotter.yaml > ../../deploy/kubernetes/base/clusterrole-snapshotter.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-attacher.yaml -n kube-system > ../../deploy/kubernetes/base/clusterrolebinding-attacher.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-csi-node.yaml -n kube-system > ../../deploy/kubernetes/base/clusterrolebinding-csi-node.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-provisioner.yaml -n kube-system > ../../deploy/kubernetes/base/clusterrolebinding-provisioner.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-resizer.yaml -n kube-system > ../../deploy/kubernetes/base/clusterrolebinding-resizer.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-snapshot-controller.yaml -n kube-system > ../../deploy/kubernetes/base/clusterrolebinding-snapshot-controller.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-snapshotter.yaml -n kube-system > ../../deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/controller.yaml > ../../deploy/kubernetes/base/controller.yaml + cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-attacher.yaml > ../../deploy/kubernetes/base/clusterrolebinding-attacher.yaml + cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-csi-node.yaml > ../../deploy/kubernetes/base/clusterrolebinding-csi-node.yaml + cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-provisioner.yaml > ../../deploy/kubernetes/base/clusterrolebinding-provisioner.yaml + cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-resizer.yaml > ../../deploy/kubernetes/base/clusterrolebinding-resizer.yaml + cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/clusterrolebinding-snapshotter.yaml > ../../deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml + cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/controller.yaml --api-versions 'snapshot.storage.k8s.io/v1' > ../../deploy/kubernetes/base/controller.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/csidriver.yaml > ../../deploy/kubernetes/base/csidriver.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/node.yaml > ../../deploy/kubernetes/base/node.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/poddisruptionbudget-controller.yaml > ../../deploy/kubernetes/base/poddisruptionbudget-controller.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/poddisruptionbudget-snapshot-controller.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/base/poddisruptionbudget-snapshot-controller.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/role-snapshot-controller-leaderelection.yaml -n kube-system > ../../deploy/kubernetes/base/role-snapshot-controller-leaderelection.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/rolebinding-snapshot-controller-leaderelection.yaml -n kube-system > ../../deploy/kubernetes/base/rolebinding-snapshot-controller-leaderelection.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-csi-controller.yaml > ../../deploy/kubernetes/base/serviceaccount-csi-controller.yaml cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-csi-node.yaml > ../../deploy/kubernetes/base/serviceaccount-csi-node.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/serviceaccount-snapshot-controller.yaml > ../../deploy/kubernetes/base/serviceaccount-snapshot-controller.yaml - cd charts/aws-ebs-csi-driver && ../../bin/helm template kustomize . -s templates/snapshot-controller.yaml -f ../../deploy/kubernetes/values/snapshotter.yaml > ../../deploy/kubernetes/base/snapshot_controller.yaml diff --git a/OWNERS_ALIASES b/OWNERS_ALIASES index f1acc5b447..eae33a0901 100644 --- a/OWNERS_ALIASES +++ b/OWNERS_ALIASES @@ -4,5 +4,5 @@ aliases: - tsmetana - gnufied - bertinatto - - huffmanca + - dobsonj diff --git a/charts/aws-ebs-csi-driver/CHANGELOG.md b/charts/aws-ebs-csi-driver/CHANGELOG.md new file mode 100644 index 0000000000..8f9b60d965 --- /dev/null +++ b/charts/aws-ebs-csi-driver/CHANGELOG.md @@ -0,0 +1,14 @@ +# Helm chart + +# v2.0.0 +* Remove support for Helm 2 +* Remove deprecated values +* No longer install snapshot controller or its CRDs +* Reorganize additional values + +[Upgrade instructions](/docs/README.md#upgrading-from-version-1x-to-2x-of-the-helm-chart) + +# v1.2.4 +* Bump app/driver version to `v1.1.1` +* Install VolumeSnapshotClass, VolumeSnapshotContent, VolumeSnapshot CRDs if enableVolumeSnapshot is true +* Only run csi-snapshotter sidecar if enableVolumeSnapshot is true or if CRDs are already installed diff --git a/charts/aws-ebs-csi-driver/Chart.yaml b/charts/aws-ebs-csi-driver/Chart.yaml index 8bebbc9943..d793313a7f 100644 --- a/charts/aws-ebs-csi-driver/Chart.yaml +++ b/charts/aws-ebs-csi-driver/Chart.yaml @@ -1,8 +1,8 @@ -apiVersion: v1 -appVersion: "1.1.0" +apiVersion: v2 +appVersion: "1.1.3" name: aws-ebs-csi-driver description: A Helm chart for AWS EBS CSI Driver -version: 1.2.0 +version: 2.0.2 kubeVersion: ">=1.17.0-0" home: https://github.com/kubernetes-sigs/aws-ebs-csi-driver sources: diff --git a/charts/aws-ebs-csi-driver/templates/NOTES.txt b/charts/aws-ebs-csi-driver/templates/NOTES.txt index 8f6d02ee38..5d79084ec7 100644 --- a/charts/aws-ebs-csi-driver/templates/NOTES.txt +++ b/charts/aws-ebs-csi-driver/templates/NOTES.txt @@ -2,38 +2,4 @@ To verify that aws-ebs-csi-driver has started, run: kubectl get pod -n {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "aws-ebs-csi-driver.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" - -WARNING: The following values have been deprecated in favor of moving them into the controller or node groups. They will be removed in a subsequent release. - -affinity: -extraCreateMetadata: -extraVolumeTags: -k8sTagClusterId: -nodeSelector: -podAnnotations: -priorityClassName: -region: -replicaCount: -resources: -tolerations: -topologySpreadConstraints: -volumeAttachLimit: - -are moving to - -controller: - affinity: - extraCreateMetadata: - extraVolumeTags: - k8sTagClusterId: - nodeSelector: - podAnnotations: - priorityClassName: - region: - replicaCount: - resources: - tolerations: - topologySpreadConstraints: - -node: - volumeAttachLimit: +NOTE: The [CSI Snapshotter](https://github.com/kubernetes-csi/external-snapshotter) controller and CRDs will no longer be installed as part of this chart and moving forward will be a prerequisite of using the snap shotting functionality. \ No newline at end of file diff --git a/charts/aws-ebs-csi-driver/templates/_helpers.tpl b/charts/aws-ebs-csi-driver/templates/_helpers.tpl index ddf7b614d1..424f7ea150 100644 --- a/charts/aws-ebs-csi-driver/templates/_helpers.tpl +++ b/charts/aws-ebs-csi-driver/templates/_helpers.tpl @@ -59,10 +59,9 @@ app.kubernetes.io/instance: {{ .Release.Name }} Convert the `--extra-volume-tags` command line arg from a map. */}} {{- define "aws-ebs-csi-driver.extra-volume-tags" -}} -{{- $evt := default .Values.extraVolumeTags .Values.controller.extraVolumeTags }} {{- $result := dict "pairs" (list) -}} -{{- range $key, $value := $evt -}} -{{- $noop := printf "%s=%s" $key $value | append $result.pairs | set $result "pairs" -}} +{{- range $key, $value := .Values.controller.extraVolumeTags -}} +{{- $noop := printf "%s=%v" $key $value | append $result.pairs | set $result "pairs" -}} {{- end -}} {{- if gt (len $result.pairs) 0 -}} {{- printf "%s=%s" "- --extra-volume-tags" (join "," $result.pairs) -}} diff --git a/charts/aws-ebs-csi-driver/templates/clusterrole-snapshot-controller.yaml b/charts/aws-ebs-csi-driver/templates/clusterrole-snapshot-controller.yaml deleted file mode 100644 index b5b7978831..0000000000 --- a/charts/aws-ebs-csi-driver/templates/clusterrole-snapshot-controller.yaml +++ /dev/null @@ -1,32 +0,0 @@ ---- -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-snapshot-controller-role - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} -rules: - - apiGroups: [ "" ] - resources: [ "persistentvolumes" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "" ] - resources: [ "persistentvolumeclaims" ] - verbs: [ "get", "list", "watch", "update" ] - - apiGroups: [ "storage.k8s.io" ] - resources: [ "storageclasses" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "" ] - resources: [ "events" ] - verbs: [ "list", "watch", "create", "update", "patch" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshotclasses" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshotcontents" ] - verbs: [ "create", "get", "list", "watch", "update", "delete" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshots" ] - verbs: [ "get", "list", "watch", "update" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshots/status" ] - verbs: [ "update" ] diff --git a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-attacher.yaml b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-attacher.yaml index c75cb9b1d2..bb23044b20 100644 --- a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-attacher.yaml +++ b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-attacher.yaml @@ -7,7 +7,7 @@ metadata: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.controller.name }} + name: {{ .Values.controller.serviceAccount.name }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole diff --git a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-csi-node.yaml b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-csi-node.yaml index 63d843e529..55231356e5 100644 --- a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-csi-node.yaml +++ b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-csi-node.yaml @@ -7,7 +7,7 @@ metadata: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.node.name }} + name: {{ .Values.node.serviceAccount.name }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole diff --git a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-provisioner.yaml b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-provisioner.yaml index 4a9174b7e1..9d2749ac3a 100644 --- a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-provisioner.yaml +++ b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-provisioner.yaml @@ -7,7 +7,7 @@ metadata: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.controller.name }} + name: {{ .Values.controller.serviceAccount.name }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole diff --git a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-resizer.yaml b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-resizer.yaml index 768e589137..88cb47de11 100644 --- a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-resizer.yaml +++ b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-resizer.yaml @@ -7,7 +7,7 @@ metadata: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.controller.name }} + name: {{ .Values.controller.serviceAccount.name }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole diff --git a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshot-controller.yaml b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshot-controller.yaml deleted file mode 100644 index 55a634fb22..0000000000 --- a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshot-controller.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-csi-snapshot-controller-binding - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} -subjects: - - kind: ServiceAccount - name: {{ .Values.serviceAccount.snapshot.name }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: ClusterRole - name: ebs-snapshot-controller-role - apiGroup: rbac.authorization.k8s.io diff --git a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshotter.yaml b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshotter.yaml index e9f36246ec..2d4290546e 100644 --- a/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshotter.yaml +++ b/charts/aws-ebs-csi-driver/templates/clusterrolebinding-snapshotter.yaml @@ -7,7 +7,7 @@ metadata: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} subjects: - kind: ServiceAccount - name: {{ .Values.serviceAccount.controller.name }} + name: {{ .Values.controller.serviceAccount.name }} namespace: {{ .Release.Namespace }} roleRef: kind: ClusterRole diff --git a/charts/aws-ebs-csi-driver/templates/controller.yaml b/charts/aws-ebs-csi-driver/templates/controller.yaml index 1ba9c15cca..e0dfcc8a75 100644 --- a/charts/aws-ebs-csi-driver/templates/controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/controller.yaml @@ -6,7 +6,7 @@ metadata: labels: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} spec: - replicas: {{ default .Values.replicaCount .Values.controller.replicaCount }} + replicas: {{ .Values.controller.replicaCount }} selector: matchLabels: app: ebs-csi-controller @@ -17,24 +17,21 @@ spec: app: ebs-csi-controller {{- include "aws-ebs-csi-driver.labels" . | nindent 8 }} {{- if .Values.controller.podLabels }} - {{- toYaml .Values.controller.podlabels | nindent 8 }} + {{- toYaml .Values.controller.podLabels | nindent 8 }} {{- end }} {{- if .Values.controller.podAnnotations }} annotations: {{- toYaml .Values.controller.podAnnotations | nindent 8 }} - {{- else if .Values.podAnnotations}} - annotations: - {{- toYaml .Values.podAnnotations | nindent 8 }} {{- end }} spec: nodeSelector: kubernetes.io/os: linux - {{- with default .Values.nodeSelector .Values.controller.nodeSelector }} + {{- with .Values.controller.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end }} - serviceAccountName: {{ .Values.serviceAccount.controller.name }} - priorityClassName: {{ default .Values.priorityClassName .Values.controller.priorityClassName }} - {{- with default .Values.affinity .Values.controller.affinity }} + serviceAccountName: {{ .Values.controller.serviceAccount.name }} + priorityClassName: {{ .Values.controller.priorityClassName }} + {{- with default .Values.controller.affinity }} affinity: {{- toYaml . | nindent 8 }} {{- end }} @@ -44,13 +41,13 @@ spec: - operator: Exists effect: NoExecute tolerationSeconds: 300 - {{- with default .Values.tolerations .Values.controller.tolerations }} + {{- with .Values.controller.tolerations }} {{- toYaml . | nindent 8 }} {{- end }} - {{- if or .Values.controller.topologySpreadConstraints .Values.topologySpreadConstraints }} + {{- if .Values.controller.topologySpreadConstraints }} {{- $tscLabelSelector := dict "labelSelector" ( dict "matchLabels" ( dict "app" "ebs-csi-controller" ) ) }} {{- $constraints := list }} - {{- range default .Values.topologySpreadConstraints .Values.controller.topologySpreadConstraints }} + {{- range .Values.controller.topologySpreadConstraints }} {{- $constraints = mustAppend $constraints (mergeOverwrite . $tscLabelSelector) }} {{- end }} topologySpreadConstraints: @@ -67,17 +64,20 @@ spec: # - {all,controller,node} # specify the driver mode {{- end }} - --endpoint=$(CSI_ENDPOINT) - {{- if or .Values.controller.extraVolumeTags .Values.extraVolumeTags }} + {{- if .Values.controller.extraVolumeTags }} {{- include "aws-ebs-csi-driver.extra-volume-tags" . | nindent 12 }} {{- end }} - {{- with default .Values.k8sTagClusterId .Values.controller.k8sTagClusterId }} + {{- with .Values.controller.k8sTagClusterId }} - --k8s-tag-cluster-id={{ . }} {{- end }} {{- with .Values.controller.httpEndpoint }} - --http-endpoint={{ . }} {{- end }} - --logtostderr - - --v=2 + - --v={{ .Values.controller.logLevel }} + {{- range .Values.controller.additionalArgs }} + - {{ . }} + {{- end }} env: - name: CSI_ENDPOINT value: unix:///var/lib/csi/sockets/pluginproxy/csi.sock @@ -97,20 +97,14 @@ spec: name: aws-secret key: access_key optional: true - {{- with default .Values.region .Values.controller.region }} + {{- with .Values.controller.region }} - name: AWS_REGION value: {{ . }} {{- end }} - {{- if .Values.controller.extraVars }} - {{- range $key, $val := .Values.controller.extraVars }} - - name: {{ $key }} - value: "{{ $val }}" - {{- end }} - {{- end }} {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.controller.env.ebsPlugin }} + {{- with .Values.controller.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: @@ -136,17 +130,17 @@ spec: timeoutSeconds: 3 periodSeconds: 10 failureThreshold: 5 - {{- with default .Values.resources (default .Values.controller.resources .Values.controller.containerResources.ebsPlugin) }} + {{- with .Values.controller.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} - name: csi-provisioner - image: {{ printf "%s:%s" .Values.sidecars.provisionerImage.repository .Values.sidecars.provisionerImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.provisioner.image.repository .Values.sidecars.provisioner.image.tag }} args: - --csi-address=$(ADDRESS) - - --v=5 + - --v={{ .Values.sidecars.provisioner.logLevel }} - --feature-gates=Topology=true - {{- if or .Values.controller.extraCreateMetadata .Values.extraCreateMetadata }} + {{- if .Values.controller.extraCreateMetadata }} - --extra-create-metadata {{- end}} - --leader-election=true @@ -157,21 +151,21 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.controller.env.provisioner }} + {{- with .Values.sidecars.provisioner.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - {{- with default .Values.resources (default .Values.controller.resources .Values.controller.containerResources.provisioner) }} + {{- with default .Values.controller.resources .Values.sidecars.provisioner.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} - name: csi-attacher - image: {{ printf "%s:%s" .Values.sidecars.attacherImage.repository .Values.sidecars.attacherImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.attacher.image.repository .Values.sidecars.attacher.image.tag }} args: - --csi-address=$(ADDRESS) - - --v=5 + - --v={{ .Values.sidecars.attacher.logLevel }} - --leader-election=true env: - name: ADDRESS @@ -179,18 +173,19 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.controller.env.attacher }} + {{- with .Values.sidecars.attacher.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - {{- with default .Values.resources (default .Values.controller.resources .Values.controller.containerResources.attacher) }} + {{- with default .Values.controller.resources .Values.sidecars.attacher.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} + {{- if .Capabilities.APIVersions.Has "snapshot.storage.k8s.io/v1" }} - name: csi-snapshotter - image: {{ printf "%s:%s" .Values.sidecars.snapshotterImage.repository .Values.sidecars.snapshotterImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.snapshotter.image.repository .Values.sidecars.snapshotter.image.tag }} args: - --csi-address=$(ADDRESS) - --leader-election=true @@ -200,46 +195,47 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.controller.env.snapshotter }} + {{- with .Values.sidecars.snapshotter.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - {{- with default .Values.resources (default .Values.controller.resources .Values.controller.containerResources.snapshotter) }} + {{- with default .Values.controller.resources .Values.sidecars.snapshotter.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} + {{- end }} - name: csi-resizer - image: {{ printf "%s:%s" .Values.sidecars.resizerImage.repository .Values.sidecars.resizerImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.resizer.image.repository .Values.sidecars.resizer.image.tag }} imagePullPolicy: Always args: - --csi-address=$(ADDRESS) - - --v=5 + - --v={{ .Values.sidecars.resizer.logLevel }} env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.controller.env.resizer }} + {{- with .Values.sidecars.resizer.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: - name: socket-dir mountPath: /var/lib/csi/sockets/pluginproxy/ - {{- with default .Values.resources (default .Values.controller.resources .Values.controller.containerResources.resizer) }} + {{- with default .Values.controller.resources .Values.sidecars.resizer.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} - name: liveness-probe - image: {{ printf "%s:%s" .Values.sidecars.livenessProbeImage.repository .Values.sidecars.livenessProbeImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }} args: - --csi-address=/csi/csi.sock volumeMounts: - name: socket-dir mountPath: /csi - {{- with default .Values.resources (default .Values.controller.resources .Values.controller.containerResources.liveness) }} + {{- with default .Values.controller.resources .Values.sidecars.livenessProbe.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/node-windows.yaml b/charts/aws-ebs-csi-driver/templates/node-windows.yaml new file mode 100644 index 0000000000..eb34245bcb --- /dev/null +++ b/charts/aws-ebs-csi-driver/templates/node-windows.yaml @@ -0,0 +1,175 @@ +{{- if .Values.node.enableWindows }} +kind: DaemonSet +apiVersion: apps/v1 +metadata: + name: ebs-csi-node-windows + labels: + {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} +spec: + selector: + matchLabels: + app: ebs-csi-node + {{- include "aws-ebs-csi-driver.selectorLabels" . | nindent 6 }} + template: + metadata: + labels: + app: ebs-csi-node + {{- include "aws-ebs-csi-driver.labels" . | nindent 8 }} + {{- if .Values.node.podLabels }} + {{- toYaml .Values.node.podLabels | nindent 8 }} + {{- end }} + {{- with .Values.node.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: eks.amazonaws.com/compute-type + operator: NotIn + values: + - fargate + nodeSelector: + kubernetes.io/os: windows + {{- with .Values.node.nodeSelector }} + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ .Values.node.serviceAccount.name }} + priorityClassName: {{ .Values.node.priorityClassName | default "system-node-critical" }} + tolerations: + {{- if .Values.node.tolerateAllTaints }} + - operator: Exists + {{- else }} + - key: CriticalAddonsOnly + operator: Exists + - operator: Exists + effect: NoExecute + tolerationSeconds: 300 + {{- end }} + {{- with .Values.node.tolerations }} + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: ebs-plugin + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + args: + - node + - --endpoint=$(CSI_ENDPOINT) + {{- with .Values.node.volumeAttachLimit }} + - --volume-attach-limit={{ . }} + {{- end }} + - --logtostderr + - --v={{ .Values.node.logLevel }} + env: + - name: CSI_ENDPOINT + value: unix:/csi/csi.sock + - name: CSI_NODE_NAME + valueFrom: + fieldRef: + fieldPath: spec.nodeName + {{- if .Values.proxy.http_proxy }} + {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} + {{- end }} + {{- with .Values.node.env }} + {{- . | toYaml | nindent 12 }} + {{- end }} + volumeMounts: + - name: kubelet-dir + mountPath: C:\var\lib\kubelet + mountPropagation: "None" + - name: plugin-dir + mountPath: C:\csi + - name: csi-proxy-disk-pipe + mountPath: \\.\pipe\csi-proxy-disk-v1 + - name: csi-proxy-volume-pipe + mountPath: \\.\pipe\csi-proxy-volume-v1 + - name: csi-proxy-filesystem-pipe + mountPath: \\.\pipe\csi-proxy-filesystem-v1 + ports: + - name: healthz + containerPort: 9808 + protocol: TCP + livenessProbe: + httpGet: + path: /healthz + port: healthz + initialDelaySeconds: 10 + timeoutSeconds: 3 + periodSeconds: 10 + failureThreshold: 5 + {{- with .Values.node.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + - name: node-driver-registrar + image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrar.image.repository .Values.sidecars.nodeDriverRegistrar.image.tag }} + args: + - --csi-address=$(ADDRESS) + - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) + - --v={{ .Values.sidecars.nodeDriverRegistrar.logLevel }} + env: + - name: ADDRESS + value: unix:/csi/csi.sock + - name: DRIVER_REG_SOCK_PATH + value: C:\var\lib\kubelet\plugins\ebs.csi.aws.com\csi.sock + {{- if .Values.proxy.http_proxy }} + {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} + {{- end }} + {{- with .Values.sidecars.nodeDriverRegistrar.env }} + {{- . | toYaml | nindent 12 }} + {{- end }} + volumeMounts: + - name: plugin-dir + mountPath: C:\csi + - name: registration-dir + mountPath: C:\registration + {{- with default .Values.node.resources .Values.sidecars.nodeDriverRegistrar.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + - name: liveness-probe + image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }} + args: + - --csi-address=unix:/csi/csi.sock + volumeMounts: + - name: plugin-dir + mountPath: C:\csi + {{- with default .Values.node.resources .Values.sidecars.livenessProbe.resources }} + resources: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- range .Values.imagePullSecrets }} + - name: {{ . }} + {{- end }} + {{- end }} + volumes: + - name: kubelet-dir + hostPath: + path: C:\var\lib\kubelet + type: Directory + - name: plugin-dir + hostPath: + path: C:\var\lib\kubelet\plugins\ebs.csi.aws.com + type: DirectoryOrCreate + - name: registration-dir + hostPath: + path: C:\var\lib\kubelet\plugins_registry + type: Directory + - name: csi-proxy-disk-pipe + hostPath: + path: \\.\pipe\csi-proxy-disk-v1 + type: "" + - name: csi-proxy-volume-pipe + hostPath: + path: \\.\pipe\csi-proxy-volume-v1 + type: "" + - name: csi-proxy-filesystem-pipe + hostPath: + path: \\.\pipe\csi-proxy-filesystem-v1 + type: "" +{{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/node.yaml b/charts/aws-ebs-csi-driver/templates/node.yaml index 2546bf5d6a..de771a888f 100644 --- a/charts/aws-ebs-csi-driver/templates/node.yaml +++ b/charts/aws-ebs-csi-driver/templates/node.yaml @@ -16,7 +16,7 @@ spec: app: ebs-csi-node {{- include "aws-ebs-csi-driver.labels" . | nindent 8 }} {{- if .Values.node.podLabels }} - {{- toYaml .Values.node.podlabels | nindent 8 }} + {{- toYaml .Values.node.podLabels | nindent 8 }} {{- end }} {{- with .Values.node.podAnnotations }} annotations: @@ -37,8 +37,7 @@ spec: {{- with .Values.node.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end }} - hostNetwork: true - serviceAccountName: {{ .Values.serviceAccount.node.name }} + serviceAccountName: {{ .Values.node.serviceAccount.name }} priorityClassName: {{ .Values.node.priorityClassName | default "system-node-critical" }} tolerations: {{- if .Values.node.tolerateAllTaints }} @@ -61,11 +60,11 @@ spec: args: - node - --endpoint=$(CSI_ENDPOINT) - {{- with default .Values.volumeAttachLimit .Values.node.volumeAttachLimit }} + {{- with .Values.node.volumeAttachLimit }} - --volume-attach-limit={{ . }} {{- end }} - --logtostderr - - --v=2 + - --v={{ .Values.node.logLevel }} env: - name: CSI_ENDPOINT value: unix:/csi/csi.sock @@ -76,7 +75,7 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.node.env.ebsPlugin }} + {{- with .Values.node.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: @@ -99,16 +98,16 @@ spec: timeoutSeconds: 3 periodSeconds: 10 failureThreshold: 5 - {{- with default .Values.resources (default .Values.node.resources .Values.node.containerResources.ebsPlugin) }} + {{- with .Values.node.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} - name: node-driver-registrar - image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrarImage.repository .Values.sidecars.nodeDriverRegistrarImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.nodeDriverRegistrar.image.repository .Values.sidecars.nodeDriverRegistrar.image.tag }} args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - - --v=5 + - --v={{ .Values.sidecars.nodeDriverRegistrar.logLevel }} env: - name: ADDRESS value: /csi/csi.sock @@ -117,7 +116,7 @@ spec: {{- if .Values.proxy.http_proxy }} {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} {{- end }} - {{- with .Values.node.env.nodeDriverRegistrar }} + {{- with .Values.sidecars.nodeDriverRegistrar.env }} {{- . | toYaml | nindent 12 }} {{- end }} volumeMounts: @@ -125,18 +124,18 @@ spec: mountPath: /csi - name: registration-dir mountPath: /registration - {{- with default .Values.resources (default .Values.node.resources .Values.node.containerResources.nodeDriverRegistrar) }} + {{- with default .Values.node.resources .Values.sidecars.nodeDriverRegistrar.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} - name: liveness-probe - image: {{ printf "%s:%s" .Values.sidecars.livenessProbeImage.repository .Values.sidecars.livenessProbeImage.tag }} + image: {{ printf "%s:%s" .Values.sidecars.livenessProbe.image.repository .Values.sidecars.livenessProbe.image.tag }} args: - --csi-address=/csi/csi.sock volumeMounts: - name: plugin-dir mountPath: /csi - {{- with default .Values.resources (default .Values.node.resources .Values.node.containerResources.liveness) }} + {{- with default .Values.node.resources .Values.sidecars.livenessProbe.resources }} resources: {{- toYaml . | nindent 12 }} {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml index 373974a004..f6241fad9e 100644 --- a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-controller.yaml @@ -1,4 +1,3 @@ -{{- $replicas := (default .Values.replicaCount .Values.controller.replicaCount) | int }} apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: @@ -10,8 +9,8 @@ spec: matchLabels: app: ebs-csi-controller {{- include "aws-ebs-csi-driver.selectorLabels" . | nindent 6 }} - {{- if le $replicas 2 }} + {{- if le (.Values.controller.replicaCount | int) 2 }} maxUnavailable: 1 {{- else }} minAvailable: 2 -{{- end }} + {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-snapshot-controller.yaml b/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-snapshot-controller.yaml deleted file mode 100644 index d9383bcb60..0000000000 --- a/charts/aws-ebs-csi-driver/templates/poddisruptionbudget-snapshot-controller.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if .Values.enableVolumeSnapshot }} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: ebs-snapshot-controller - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} -spec: - selector: - matchLabels: - app: ebs-snapshot-controller - {{- include "aws-ebs-csi-driver.selectorLabels" . | nindent 6 }} - maxUnavailable: 1 -{{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/role-snapshot-controller-leaderelection.yaml b/charts/aws-ebs-csi-driver/templates/role-snapshot-controller-leaderelection.yaml deleted file mode 100644 index 2b55a16ad8..0000000000 --- a/charts/aws-ebs-csi-driver/templates/role-snapshot-controller-leaderelection.yaml +++ /dev/null @@ -1,11 +0,0 @@ ---- -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-snapshot-controller-leaderelection - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} -rules: - - apiGroups: [ "coordination.k8s.io" ] - resources: [ "leases" ] - verbs: [ "get", "watch", "list", "delete", "update", "create" ] diff --git a/charts/aws-ebs-csi-driver/templates/rolebinding-snapshot-controller-leaderelection.yaml b/charts/aws-ebs-csi-driver/templates/rolebinding-snapshot-controller-leaderelection.yaml deleted file mode 100644 index 74095f382c..0000000000 --- a/charts/aws-ebs-csi-driver/templates/rolebinding-snapshot-controller-leaderelection.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-snapshot-controller-leaderelection - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} -subjects: - - kind: ServiceAccount - name: {{ .Values.serviceAccount.snapshot.name }} - namespace: {{ .Release.Namespace }} -roleRef: - kind: Role - name: ebs-snapshot-controller-leaderelection - apiGroup: rbac.authorization.k8s.io diff --git a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml index b465c3be25..d6466e86fa 100644 --- a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml +++ b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-controller.yaml @@ -1,11 +1,11 @@ -{{- if .Values.serviceAccount.controller.create -}} +{{- if .Values.controller.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.controller.name }} + name: {{ .Values.controller.serviceAccount.name }} labels: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.controller.annotations }} + {{- with .Values.controller.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml index 4722b2a95e..907870912e 100644 --- a/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml +++ b/charts/aws-ebs-csi-driver/templates/serviceaccount-csi-node.yaml @@ -1,11 +1,11 @@ -{{- if .Values.serviceAccount.node.create -}} +{{- if .Values.node.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: - name: {{ .Values.serviceAccount.node.name }} + name: {{ .Values.node.serviceAccount.name }} labels: {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.node.annotations }} + {{- with .Values.node.serviceAccount.annotations }} annotations: {{- toYaml . | nindent 4 }} {{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/serviceaccount-snapshot-controller.yaml b/charts/aws-ebs-csi-driver/templates/serviceaccount-snapshot-controller.yaml deleted file mode 100644 index 9d2c68114b..0000000000 --- a/charts/aws-ebs-csi-driver/templates/serviceaccount-snapshot-controller.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.serviceAccount.snapshot.create }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.serviceAccount.snapshot.name }} - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.snapshot.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/aws-ebs-csi-driver/templates/snapshot-controller.yaml b/charts/aws-ebs-csi-driver/templates/snapshot-controller.yaml deleted file mode 100644 index 9b9903ac4d..0000000000 --- a/charts/aws-ebs-csi-driver/templates/snapshot-controller.yaml +++ /dev/null @@ -1,68 +0,0 @@ -{{- if .Values.enableVolumeSnapshot }} -#Snapshot controller -kind: StatefulSet -apiVersion: apps/v1 -metadata: - name: ebs-snapshot-controller - labels: - {{- include "aws-ebs-csi-driver.labels" . | nindent 4 }} -spec: - serviceName: ebs-snapshot-controller - replicas: 1 - selector: - matchLabels: - app: ebs-snapshot-controller - {{- include "aws-ebs-csi-driver.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - app: ebs-snapshot-controller - {{- include "aws-ebs-csi-driver.labels" . | nindent 8 }} - {{- if .Values.snapshotController.podLabels }} - {{- toYaml .Values.snapshotController.podlabels | nindent 8 }} - {{- end }} - {{- if .Values.snapshotController.podAnnotations }} - annotations: {{ toYaml .Values.snapshotController.podAnnotations | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ .Values.serviceAccount.snapshot.name }} - nodeSelector: - kubernetes.io/os: linux - {{- with .Values.nodeSelector }} - {{- toYaml . | nindent 8 }} - {{- end }} - priorityClassName: {{ .Values.priorityClassName | default "system-cluster-critical" }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - operator: Exists - effect: NoExecute - tolerationSeconds: 300 - {{- with .Values.tolerations }} - {{- toYaml . | nindent 8 }} - {{- end }} - containers: - - name: snapshot-controller - image: {{ printf "%s:%s" .Values.snapshotController.repository .Values.snapshotController.tag }} - {{- with .Values.resources }} - resources: - {{- toYaml . | nindent 12 }} - {{- end }} - {{- if .Values.proxy.http_proxy }} - env: - {{- include "aws-ebs-csi-driver.http-proxy" . | nindent 12 }} - {{- end }} - args: - - --v=5 - - --leader-election=false - {{- if .Values.imagePullSecrets }} - imagePullSecrets: - {{- range .Values.imagePullSecrets }} - - name: {{ . }} - {{- end }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/aws-ebs-csi-driver/values.yaml b/charts/aws-ebs-csi-driver/values.yaml index 5a9e6e2138..1514434b48 100644 --- a/charts/aws-ebs-csi-driver/values.yaml +++ b/charts/aws-ebs-csi-driver/values.yaml @@ -4,34 +4,50 @@ image: repository: k8s.gcr.io/provider-aws/aws-ebs-csi-driver - tag: "v1.1.0" + tag: "v1.1.3" pullPolicy: IfNotPresent sidecars: - provisionerImage: - repository: k8s.gcr.io/sig-storage/csi-provisioner - tag: "v2.1.1" - attacherImage: - repository: k8s.gcr.io/sig-storage/csi-attacher - tag: "v3.1.0" - snapshotterImage: - repository: k8s.gcr.io/sig-storage/csi-snapshotter - tag: "v3.0.3" - livenessProbeImage: - repository: k8s.gcr.io/sig-storage/livenessprobe - tag: "v2.2.0" - resizerImage: - repository: k8s.gcr.io/sig-storage/csi-resizer - tag: "v1.0.0" - nodeDriverRegistrarImage: - repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar - tag: "v2.1.0" - -snapshotController: - repository: k8s.gcr.io/sig-storage/snapshot-controller - tag: "v3.0.3" - podAnnotations: {} - podLabels: {} + provisioner: + env: [] + image: + repository: k8s.gcr.io/sig-storage/csi-provisioner + tag: "v2.1.1" + logLevel: 2 + resources: {} + attacher: + env: [] + image: + repository: k8s.gcr.io/sig-storage/csi-attacher + tag: "v3.1.0" + logLevel: 2 + resources: {} + snapshotter: + env: [] + image: + repository: k8s.gcr.io/sig-storage/csi-snapshotter + tag: "v3.0.3" + logLevel: 2 + resources: {} + livenessProbe: + image: + repository: k8s.gcr.io/sig-storage/livenessprobe + tag: "v2.2.0" + resources: {} + resizer: + env: [] + image: + repository: k8s.gcr.io/sig-storage/csi-resizer + tag: "v1.0.0" + logLevel: 2 + resources: {} + nodeDriverRegistrar: + env: [] + image: + repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar + tag: "v2.1.0" + logLevel: 2 + resources: {} proxy: http_proxy: @@ -41,36 +57,13 @@ imagePullSecrets: [] nameOverride: fullnameOverride: -# True if enable volume snapshot -enableVolumeSnapshot: false - -# Moving to values under controller -affinity: {} -extraCreateMetadata: false -extraVolumeTags: {} -k8sTagClusterId: -nodeSelector: {} -podAnnotations: {} -priorityClassName: "system-cluster-critical" -region: -replicaCount: 2 -resources: {} -tolerations: [] -topologySpreadConstraints: [] - controller: + # If arbitrary args like "--aws-sdk-debug-log=true" need to be passed, use this value + additionalArgs: [] affinity: {} - # True if enable volume scheduling for dynamic volume provisioning - env: - ebsPlugin: [] - provisioner: [] - attacher: [] - snapshotter: [] - resizer: [] + env: [] # If set, add pv/pvc metadata to plugin create requests as parameters. - extraCreateMetadata: false - # Will be removed in later version in favor of env.ebsPlugin - extraVars: {} + extraCreateMetadata: true # Extra volume tags to attach to each dynamically provisioned volume. # --- # extraVolumeTags: @@ -80,24 +73,18 @@ controller: httpEndpoint: # ID of the Kubernetes cluster used for tagging provisioned EBS volumes (optional). k8sTagClusterId: + logLevel: 2 nodeSelector: {} podAnnotations: {} podLabels: {} - priorityClassName: + priorityClassName: system-cluster-critical # AWS region to use. If not specified then the region will be looked up via the AWS EC2 metadata # service. # --- # region: us-east-1 region: - replicaCount: + replicaCount: 2 resources: {} - containerResources: - ebsPlugin: {} - provisioner: {} - attacher: {} - snapshotter: {} - resizer: {} - liveness: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little # resources, such as Minikube. If you do want to specify resources, uncomment the following @@ -110,6 +97,10 @@ controller: # requests: # cpu: 100m # memory: 128Mi + serviceAccount: + create: true # A service account will be created for you if set to true. Set to false if you want to use your own. + name: ebs-csi-controller-sa # Name of the service-account to be used/created. + annotations: {} tolerations: [] # TSCs without the label selector stanza # @@ -124,16 +115,10 @@ controller: # whenUnsatisfiable: ScheduleAnyway topologySpreadConstraints: [] - -# Moving to values under node -# The "maximum number of attachable volumes" per node -volumeAttachLimit: - node: - env: - ebsPlugin: [] - nodeDriverRegistrar: [] + env: [] kubeletPath: /var/lib/kubelet + logLevel: 2 priorityClassName: nodeSelector: {} podAnnotations: {} @@ -141,25 +126,13 @@ node: tolerateAllTaints: false tolerations: [] resources: {} - containerResources: - ebsPlugin: {} - nodeDriverRegistrar: {} - liveness: {} - volumeAttachLimit: - -serviceAccount: - controller: - create: true # A service account will be created for you if set to true. Set to false if you want to use your own. - name: ebs-csi-controller-sa # Name of the service-account to be used/created. - annotations: {} - snapshot: - create: true - name: ebs-snapshot-controller - annotations: {} - node: + serviceAccount: create: true name: ebs-csi-node-sa annotations: {} + enableWindows: false + # The "maximum number of attachable volumes" per node + volumeAttachLimit: storageClasses: [] # Add StorageClass resources like: diff --git a/deploy/kubernetes/base/clusterrole-snapshot-controller.yaml b/deploy/kubernetes/base/clusterrole-snapshot-controller.yaml deleted file mode 100644 index cff0fe0077..0000000000 --- a/deploy/kubernetes/base/clusterrole-snapshot-controller.yaml +++ /dev/null @@ -1,33 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/clusterrole-snapshot-controller.yaml -kind: ClusterRole -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-snapshot-controller-role - labels: - app.kubernetes.io/name: aws-ebs-csi-driver -rules: - - apiGroups: [ "" ] - resources: [ "persistentvolumes" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "" ] - resources: [ "persistentvolumeclaims" ] - verbs: [ "get", "list", "watch", "update" ] - - apiGroups: [ "storage.k8s.io" ] - resources: [ "storageclasses" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "" ] - resources: [ "events" ] - verbs: [ "list", "watch", "create", "update", "patch" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshotclasses" ] - verbs: [ "get", "list", "watch" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshotcontents" ] - verbs: [ "create", "get", "list", "watch", "update", "delete" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshots" ] - verbs: [ "get", "list", "watch", "update" ] - - apiGroups: [ "snapshot.storage.k8s.io" ] - resources: [ "volumesnapshots/status" ] - verbs: [ "update" ] diff --git a/deploy/kubernetes/base/clusterrolebinding-attacher.yaml b/deploy/kubernetes/base/clusterrolebinding-attacher.yaml index 9a97b8efcb..5715d2651b 100644 --- a/deploy/kubernetes/base/clusterrolebinding-attacher.yaml +++ b/deploy/kubernetes/base/clusterrolebinding-attacher.yaml @@ -9,7 +9,7 @@ metadata: subjects: - kind: ServiceAccount name: ebs-csi-controller-sa - namespace: kube-system + namespace: default roleRef: kind: ClusterRole name: ebs-external-attacher-role diff --git a/deploy/kubernetes/base/clusterrolebinding-csi-node.yaml b/deploy/kubernetes/base/clusterrolebinding-csi-node.yaml index d1292b132d..095db52510 100644 --- a/deploy/kubernetes/base/clusterrolebinding-csi-node.yaml +++ b/deploy/kubernetes/base/clusterrolebinding-csi-node.yaml @@ -9,7 +9,7 @@ metadata: subjects: - kind: ServiceAccount name: ebs-csi-node-sa - namespace: kube-system + namespace: default roleRef: kind: ClusterRole name: ebs-csi-node-role diff --git a/deploy/kubernetes/base/clusterrolebinding-provisioner.yaml b/deploy/kubernetes/base/clusterrolebinding-provisioner.yaml index 084bed9df9..3544bc61e2 100644 --- a/deploy/kubernetes/base/clusterrolebinding-provisioner.yaml +++ b/deploy/kubernetes/base/clusterrolebinding-provisioner.yaml @@ -9,7 +9,7 @@ metadata: subjects: - kind: ServiceAccount name: ebs-csi-controller-sa - namespace: kube-system + namespace: default roleRef: kind: ClusterRole name: ebs-external-provisioner-role diff --git a/deploy/kubernetes/base/clusterrolebinding-resizer.yaml b/deploy/kubernetes/base/clusterrolebinding-resizer.yaml index a840f51b83..c80a9a26bf 100644 --- a/deploy/kubernetes/base/clusterrolebinding-resizer.yaml +++ b/deploy/kubernetes/base/clusterrolebinding-resizer.yaml @@ -9,7 +9,7 @@ metadata: subjects: - kind: ServiceAccount name: ebs-csi-controller-sa - namespace: kube-system + namespace: default roleRef: kind: ClusterRole name: ebs-external-resizer-role diff --git a/deploy/kubernetes/base/clusterrolebinding-snapshot-controller.yaml b/deploy/kubernetes/base/clusterrolebinding-snapshot-controller.yaml deleted file mode 100644 index 10c021c889..0000000000 --- a/deploy/kubernetes/base/clusterrolebinding-snapshot-controller.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/clusterrolebinding-snapshot-controller.yaml -kind: ClusterRoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-csi-snapshot-controller-binding - labels: - app.kubernetes.io/name: aws-ebs-csi-driver -subjects: - - kind: ServiceAccount - name: ebs-snapshot-controller - namespace: kube-system -roleRef: - kind: ClusterRole - name: ebs-snapshot-controller-role - apiGroup: rbac.authorization.k8s.io diff --git a/deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml b/deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml index 7720ca5d23..7946414d59 100644 --- a/deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml +++ b/deploy/kubernetes/base/clusterrolebinding-snapshotter.yaml @@ -9,7 +9,7 @@ metadata: subjects: - kind: ServiceAccount name: ebs-csi-controller-sa - namespace: kube-system + namespace: default roleRef: kind: ClusterRole name: ebs-external-snapshotter-role diff --git a/deploy/kubernetes/base/controller.yaml b/deploy/kubernetes/base/controller.yaml index d38e1fdc90..99b17de599 100644 --- a/deploy/kubernetes/base/controller.yaml +++ b/deploy/kubernetes/base/controller.yaml @@ -31,7 +31,7 @@ spec: tolerationSeconds: 300 containers: - name: ebs-plugin - image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.0.0 + image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.3 imagePullPolicy: IfNotPresent args: # - {all,controller,node} # specify the driver mode @@ -84,8 +84,9 @@ spec: image: k8s.gcr.io/sig-storage/csi-provisioner:v2.1.1 args: - --csi-address=$(ADDRESS) - - --v=5 + - --v=2 - --feature-gates=Topology=true + - --extra-create-metadata - --leader-election=true - --default-fstype=ext4 env: @@ -98,7 +99,7 @@ spec: image: k8s.gcr.io/sig-storage/csi-attacher:v3.1.0 args: - --csi-address=$(ADDRESS) - - --v=5 + - --v=2 - --leader-election=true env: - name: ADDRESS @@ -122,7 +123,7 @@ spec: imagePullPolicy: Always args: - --csi-address=$(ADDRESS) - - --v=5 + - --v=2 env: - name: ADDRESS value: /var/lib/csi/sockets/pluginproxy/csi.sock diff --git a/deploy/kubernetes/base/kustomization.yaml b/deploy/kubernetes/base/kustomization.yaml index 341262e4d8..bcc4f03832 100644 --- a/deploy/kubernetes/base/kustomization.yaml +++ b/deploy/kubernetes/base/kustomization.yaml @@ -5,21 +5,14 @@ resources: - clusterrole-attacher.yaml - clusterrole-provisioner.yaml - clusterrole-resizer.yaml -- clusterrole-snapshot-controller.yaml - clusterrole-snapshotter.yaml - clusterrolebinding-attacher.yaml - clusterrolebinding-provisioner.yaml - clusterrolebinding-resizer.yaml -- clusterrolebinding-snapshot-controller.yaml - clusterrolebinding-snapshotter.yaml - controller.yaml - csidriver.yaml - node.yaml - poddisruptionbudget-controller.yaml -- poddisruptionbudget-snapshot-controller.yaml -- role-snapshot-controller-leaderelection.yaml -- rolebinding-snapshot-controller-leaderelection.yaml - serviceaccount-csi-controller.yaml - serviceaccount-csi-node.yaml -- serviceaccount-snapshot-controller.yaml -- snapshot_controller.yaml diff --git a/deploy/kubernetes/base/node.yaml b/deploy/kubernetes/base/node.yaml index e59bd43f38..c10ccda8ec 100644 --- a/deploy/kubernetes/base/node.yaml +++ b/deploy/kubernetes/base/node.yaml @@ -29,7 +29,6 @@ spec: - fargate nodeSelector: kubernetes.io/os: linux - hostNetwork: true serviceAccountName: ebs-csi-node-sa priorityClassName: system-node-critical tolerations: @@ -42,7 +41,7 @@ spec: - name: ebs-plugin securityContext: privileged: true - image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.0.0 + image: k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.3 args: - node - --endpoint=$(CSI_ENDPOINT) @@ -80,7 +79,7 @@ spec: args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - - --v=5 + - --v=2 env: - name: ADDRESS value: /csi/csi.sock diff --git a/deploy/kubernetes/base/poddisruptionbudget-snapshot-controller.yaml b/deploy/kubernetes/base/poddisruptionbudget-snapshot-controller.yaml deleted file mode 100644 index cee8749077..0000000000 --- a/deploy/kubernetes/base/poddisruptionbudget-snapshot-controller.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/poddisruptionbudget-snapshot-controller.yaml -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: ebs-snapshot-controller - labels: - app.kubernetes.io/name: aws-ebs-csi-driver -spec: - selector: - matchLabels: - app: ebs-snapshot-controller - app.kubernetes.io/name: aws-ebs-csi-driver - maxUnavailable: 1 diff --git a/deploy/kubernetes/base/role-snapshot-controller-leaderelection.yaml b/deploy/kubernetes/base/role-snapshot-controller-leaderelection.yaml deleted file mode 100644 index 3ee9f032ec..0000000000 --- a/deploy/kubernetes/base/role-snapshot-controller-leaderelection.yaml +++ /dev/null @@ -1,12 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/role-snapshot-controller-leaderelection.yaml -kind: Role -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-snapshot-controller-leaderelection - labels: - app.kubernetes.io/name: aws-ebs-csi-driver -rules: - - apiGroups: [ "coordination.k8s.io" ] - resources: [ "leases" ] - verbs: [ "get", "watch", "list", "delete", "update", "create" ] diff --git a/deploy/kubernetes/base/rolebinding-snapshot-controller-leaderelection.yaml b/deploy/kubernetes/base/rolebinding-snapshot-controller-leaderelection.yaml deleted file mode 100644 index 9d66443b9a..0000000000 --- a/deploy/kubernetes/base/rolebinding-snapshot-controller-leaderelection.yaml +++ /dev/null @@ -1,16 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/rolebinding-snapshot-controller-leaderelection.yaml -kind: RoleBinding -apiVersion: rbac.authorization.k8s.io/v1 -metadata: - name: ebs-snapshot-controller-leaderelection - labels: - app.kubernetes.io/name: aws-ebs-csi-driver -subjects: - - kind: ServiceAccount - name: ebs-snapshot-controller - namespace: kube-system -roleRef: - kind: Role - name: ebs-snapshot-controller-leaderelection - apiGroup: rbac.authorization.k8s.io diff --git a/deploy/kubernetes/base/serviceaccount-snapshot-controller.yaml b/deploy/kubernetes/base/serviceaccount-snapshot-controller.yaml deleted file mode 100644 index 38ce91b2db..0000000000 --- a/deploy/kubernetes/base/serviceaccount-snapshot-controller.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/serviceaccount-snapshot-controller.yaml -apiVersion: v1 -kind: ServiceAccount -metadata: - name: ebs-snapshot-controller - labels: - app.kubernetes.io/name: aws-ebs-csi-driver diff --git a/deploy/kubernetes/base/snapshot_controller.yaml b/deploy/kubernetes/base/snapshot_controller.yaml deleted file mode 100644 index 32af1e8845..0000000000 --- a/deploy/kubernetes/base/snapshot_controller.yaml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# Source: aws-ebs-csi-driver/templates/snapshot-controller.yaml -#Snapshot controller -kind: StatefulSet -apiVersion: apps/v1 -metadata: - name: ebs-snapshot-controller - labels: - app.kubernetes.io/name: aws-ebs-csi-driver -spec: - serviceName: ebs-snapshot-controller - replicas: 1 - selector: - matchLabels: - app: ebs-snapshot-controller - app.kubernetes.io/name: aws-ebs-csi-driver - template: - metadata: - labels: - app: ebs-snapshot-controller - app.kubernetes.io/name: aws-ebs-csi-driver - spec: - serviceAccountName: ebs-snapshot-controller - nodeSelector: - kubernetes.io/os: linux - priorityClassName: system-cluster-critical - tolerations: - - key: CriticalAddonsOnly - operator: Exists - - operator: Exists - effect: NoExecute - tolerationSeconds: 300 - containers: - - name: snapshot-controller - image: k8s.gcr.io/sig-storage/snapshot-controller:v3.0.3 - args: - - --v=5 - - --leader-election=false diff --git a/deploy/kubernetes/cluster/crd_snapshotter.yaml b/deploy/kubernetes/cluster/crd_snapshotter.yaml deleted file mode 100644 index 6ca2443d83..0000000000 --- a/deploy/kubernetes/cluster/crd_snapshotter.yaml +++ /dev/null @@ -1,628 +0,0 @@ ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.0 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/419" - creationTimestamp: null - name: volumesnapshotclasses.snapshot.storage.k8s.io -spec: - group: snapshot.storage.k8s.io - names: - kind: VolumeSnapshotClass - listKind: VolumeSnapshotClassList - plural: volumesnapshotclasses - singular: volumesnapshotclass - scope: Cluster - versions: - - additionalPrinterColumns: - - jsonPath: .driver - name: Driver - type: string - - description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. - jsonPath: .deletionPolicy - name: DeletionPolicy - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - deletionPolicy: - description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. Required. - enum: - - Delete - - Retain - type: string - driver: - description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required. - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - parameters: - additionalProperties: - type: string - description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes. - type: object - required: - - deletionPolicy - - driver - type: object - served: true - storage: false - subresources: {} - - additionalPrinterColumns: - - jsonPath: .driver - name: Driver - type: string - - description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. - jsonPath: .deletionPolicy - name: DeletionPolicy - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - deletionPolicy: - description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. Required. - enum: - - Delete - - Retain - type: string - driver: - description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required. - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - parameters: - additionalProperties: - type: string - description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes. - type: object - required: - - deletionPolicy - - driver - type: object - served: true - storage: true - subresources: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.0 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/419" - creationTimestamp: null - name: volumesnapshotcontents.snapshot.storage.k8s.io -spec: - group: snapshot.storage.k8s.io - names: - kind: VolumeSnapshotContent - listKind: VolumeSnapshotContentList - plural: volumesnapshotcontents - singular: volumesnapshotcontent - scope: Cluster - versions: - - additionalPrinterColumns: - - description: Indicates if the snapshot is ready to be used to restore a volume. - jsonPath: .status.readyToUse - name: ReadyToUse - type: boolean - - description: Represents the complete size of the snapshot in bytes - jsonPath: .status.restoreSize - name: RestoreSize - type: integer - - description: Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. - jsonPath: .spec.deletionPolicy - name: DeletionPolicy - type: string - - description: Name of the CSI driver used to create the physical snapshot on the underlying storage system. - jsonPath: .spec.driver - name: Driver - type: string - - description: Name of the VolumeSnapshotClass to which this snapshot belongs. - jsonPath: .spec.volumeSnapshotClassName - name: VolumeSnapshotClass - type: string - - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. - jsonPath: .spec.volumeSnapshotRef.name - name: VolumeSnapshot - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: VolumeSnapshotContent represents the actual "on-disk" snapshot object in the underlying storage system - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - spec: - description: spec defines properties of a VolumeSnapshotContent created by the underlying storage system. Required. - properties: - deletionPolicy: - description: deletionPolicy determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. For dynamically provisioned snapshots, this field will automatically be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field defined in the corresponding VolumeSnapshotClass. For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. Required. - enum: - - Delete - - Retain - type: string - driver: - description: driver is the name of the CSI driver used to create the physical snapshot on the underlying storage system. This MUST be the same as the name returned by the CSI GetPluginName() call for that driver. Required. - type: string - source: - description: source specifies whether the snapshot is (or should be) dynamically provisioned or already exists, and just requires a Kubernetes object representation. This field is immutable after creation. Required. - properties: - snapshotHandle: - description: snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on the underlying storage system for which a Kubernetes object representation was (or should be) created. This field is immutable. - type: string - volumeHandle: - description: volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot should be dynamically taken from. This field is immutable. - type: string - type: object - oneOf: - - required: ["snapshotHandle"] - - required: ["volumeHandle"] - volumeSnapshotClassName: - description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation. - type: string - volumeSnapshotRef: - description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Required. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" - type: string - namespace: - description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" - type: string - resourceVersion: - description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" - type: string - uid: - description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids" - type: string - type: object - required: - - deletionPolicy - - driver - - source - - volumeSnapshotRef - type: object - status: - description: status represents the current information of a snapshot. - properties: - creationTime: - description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it indicates the creation time is unknown. The format of this field is a Unix nanoseconds time encoded as an int64. On Unix, the command `date +%s%N` returns the current time in nanoseconds since 1970-01-01 00:00:00 UTC. - format: int64 - type: integer - error: - description: error is the last observed error during snapshot creation, if any. Upon success after retry, this error field will be cleared. - properties: - message: - description: "message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information." - type: string - time: - description: time is the timestamp when the error was encountered. - format: date-time - type: string - type: object - readyToUse: - description: readyToUse indicates if a snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. - type: boolean - restoreSize: - description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. - format: int64 - minimum: 0 - type: integer - snapshotHandle: - description: snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. If not specified, it indicates that dynamic snapshot creation has either failed or it is still in progress. - type: string - type: object - required: - - spec - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Indicates if the snapshot is ready to be used to restore a volume. - jsonPath: .status.readyToUse - name: ReadyToUse - type: boolean - - description: Represents the complete size of the snapshot in bytes - jsonPath: .status.restoreSize - name: RestoreSize - type: integer - - description: Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. - jsonPath: .spec.deletionPolicy - name: DeletionPolicy - type: string - - description: Name of the CSI driver used to create the physical snapshot on the underlying storage system. - jsonPath: .spec.driver - name: Driver - type: string - - description: Name of the VolumeSnapshotClass to which this snapshot belongs. - jsonPath: .spec.volumeSnapshotClassName - name: VolumeSnapshotClass - type: string - - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. - jsonPath: .spec.volumeSnapshotRef.name - name: VolumeSnapshot - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VolumeSnapshotContent represents the actual "on-disk" snapshot object in the underlying storage system - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - spec: - description: spec defines properties of a VolumeSnapshotContent created by the underlying storage system. Required. - properties: - deletionPolicy: - description: deletionPolicy determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. For dynamically provisioned snapshots, this field will automatically be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field defined in the corresponding VolumeSnapshotClass. For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. Required. - enum: - - Delete - - Retain - type: string - driver: - description: driver is the name of the CSI driver used to create the physical snapshot on the underlying storage system. This MUST be the same as the name returned by the CSI GetPluginName() call for that driver. Required. - type: string - source: - description: source specifies whether the snapshot is (or should be) dynamically provisioned or already exists, and just requires a Kubernetes object representation. This field is immutable after creation. Required. - properties: - snapshotHandle: - description: snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on the underlying storage system for which a Kubernetes object representation was (or should be) created. This field is immutable. - type: string - volumeHandle: - description: volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot should be dynamically taken from. This field is immutable. - type: string - type: object - volumeSnapshotClassName: - description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation. - type: string - volumeSnapshotRef: - description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Required. - properties: - apiVersion: - description: API version of the referent. - type: string - fieldPath: - description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' - type: string - kind: - description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - name: - description: "Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names" - type: string - namespace: - description: "Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/" - type: string - resourceVersion: - description: "Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency" - type: string - uid: - description: "UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids" - type: string - type: object - required: - - deletionPolicy - - driver - - source - - volumeSnapshotRef - type: object - status: - description: status represents the current information of a snapshot. - properties: - creationTime: - description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it indicates the creation time is unknown. The format of this field is a Unix nanoseconds time encoded as an int64. On Unix, the command `date +%s%N` returns the current time in nanoseconds since 1970-01-01 00:00:00 UTC. - format: int64 - type: integer - error: - description: error is the last observed error during snapshot creation, if any. Upon success after retry, this error field will be cleared. - properties: - message: - description: "message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information." - type: string - time: - description: time is the timestamp when the error was encountered. - format: date-time - type: string - type: object - readyToUse: - description: readyToUse indicates if a snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. - type: boolean - restoreSize: - description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. - format: int64 - minimum: 0 - type: integer - snapshotHandle: - description: snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. If not specified, it indicates that dynamic snapshot creation has either failed or it is still in progress. - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] - ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.4.0 - api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/419" - creationTimestamp: null - name: volumesnapshots.snapshot.storage.k8s.io -spec: - group: snapshot.storage.k8s.io - names: - kind: VolumeSnapshot - listKind: VolumeSnapshotList - plural: volumesnapshots - singular: volumesnapshot - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Indicates if the snapshot is ready to be used to restore a volume. - jsonPath: .status.readyToUse - name: ReadyToUse - type: boolean - - description: If a new snapshot needs to be created, this contains the name of the source PVC from which this snapshot was (or will be) created. - jsonPath: .spec.source.persistentVolumeClaimName - name: SourcePVC - type: string - - description: If a snapshot already exists, this contains the name of the existing VolumeSnapshotContent object representing the existing snapshot. - jsonPath: .spec.source.volumeSnapshotContentName - name: SourceSnapshotContent - type: string - - description: Represents the minimum size of volume required to rehydrate from this snapshot. - jsonPath: .status.restoreSize - name: RestoreSize - type: string - - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. - jsonPath: .spec.volumeSnapshotClassName - name: SnapshotClass - type: string - - description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object. - jsonPath: .status.boundVolumeSnapshotContentName - name: SnapshotContent - type: string - - description: Timestamp when the point-in-time snapshot was taken by the underlying storage system. - jsonPath: .status.creationTime - name: CreationTime - type: date - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot. - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - spec: - description: "spec defines the desired characteristics of a snapshot requested by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots Required." - properties: - source: - description: source specifies where a snapshot will be created from. This field is immutable after creation. Required. - properties: - persistentVolumeClaimName: - description: persistentVolumeClaimName specifies the name of the PersistentVolumeClaim object representing the volume from which a snapshot should be created. This PVC is assumed to be in the same namespace as the VolumeSnapshot object. This field should be set if the snapshot does not exists, and needs to be created. This field is immutable. - type: string - volumeSnapshotContentName: - description: volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent object representing an existing volume snapshot. This field should be set if the snapshot already exists and only needs a representation in Kubernetes. This field is immutable. - type: string - type: object - oneOf: - - required: ["persistentVolumeClaimName"] - - required: ["volumeSnapshotContentName"] - volumeSnapshotClassName: - description: "VolumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. VolumeSnapshotClassName may be left nil to indicate that the default SnapshotClass should be used. A given cluster may have multiple default Volume SnapshotClasses: one default per CSI Driver. If a VolumeSnapshot does not specify a SnapshotClass, VolumeSnapshotSource will be checked to figure out what the associated CSI Driver is, and the default VolumeSnapshotClass associated with that CSI Driver will be used. If more than one VolumeSnapshotClass exist for a given CSI Driver and more than one have been marked as default, CreateSnapshot will fail and generate an event. Empty string is not allowed for this field." - type: string - required: - - source - type: object - status: - description: status represents the current information of a snapshot. Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object. - properties: - boundVolumeSnapshotContentName: - description: "boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent object to which this VolumeSnapshot object intends to bind to. If not specified, it indicates that the VolumeSnapshot object has not been successfully bound to a VolumeSnapshotContent object yet. NOTE: To avoid possible security issues, consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object." - type: string - creationTime: - description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it may indicate that the creation time of the snapshot is unknown. - format: date-time - type: string - error: - description: error is the last observed error during snapshot creation, if any. This field could be helpful to upper level controllers(i.e., application controller) to decide whether they should continue on waiting for the snapshot to be created based on the type of error reported. The snapshot controller will keep retrying when an error occurrs during the snapshot creation. Upon success, this error field will be cleared. - properties: - message: - description: "message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information." - type: string - time: - description: time is the timestamp when the error was encountered. - format: date-time - type: string - type: object - readyToUse: - description: readyToUse indicates if the snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. - type: boolean - restoreSize: - type: string - description: restoreSize represents the minimum size of volume required to create a volume from this snapshot. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - required: - - spec - type: object - served: true - storage: false - subresources: - status: {} - - additionalPrinterColumns: - - description: Indicates if the snapshot is ready to be used to restore a volume. - jsonPath: .status.readyToUse - name: ReadyToUse - type: boolean - - description: If a new snapshot needs to be created, this contains the name of the source PVC from which this snapshot was (or will be) created. - jsonPath: .spec.source.persistentVolumeClaimName - name: SourcePVC - type: string - - description: If a snapshot already exists, this contains the name of the existing VolumeSnapshotContent object representing the existing snapshot. - jsonPath: .spec.source.volumeSnapshotContentName - name: SourceSnapshotContent - type: string - - description: Represents the minimum size of volume required to rehydrate from this snapshot. - jsonPath: .status.restoreSize - name: RestoreSize - type: string - - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. - jsonPath: .spec.volumeSnapshotClassName - name: SnapshotClass - type: string - - description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object. - jsonPath: .status.boundVolumeSnapshotContentName - name: SnapshotContent - type: string - - description: Timestamp when the point-in-time snapshot was taken by the underlying storage system. - jsonPath: .status.creationTime - name: CreationTime - type: date - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot. - properties: - apiVersion: - description: "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources" - type: string - kind: - description: "Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds" - type: string - spec: - description: "spec defines the desired characteristics of a snapshot requested by a user. More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots Required." - properties: - source: - description: source specifies where a snapshot will be created from. This field is immutable after creation. Required. - properties: - persistentVolumeClaimName: - description: persistentVolumeClaimName specifies the name of the PersistentVolumeClaim object representing the volume from which a snapshot should be created. This PVC is assumed to be in the same namespace as the VolumeSnapshot object. This field should be set if the snapshot does not exists, and needs to be created. This field is immutable. - type: string - volumeSnapshotContentName: - description: volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent object representing an existing volume snapshot. This field should be set if the snapshot already exists and only needs a representation in Kubernetes. This field is immutable. - type: string - type: object - volumeSnapshotClassName: - description: "VolumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. VolumeSnapshotClassName may be left nil to indicate that the default SnapshotClass should be used. A given cluster may have multiple default Volume SnapshotClasses: one default per CSI Driver. If a VolumeSnapshot does not specify a SnapshotClass, VolumeSnapshotSource will be checked to figure out what the associated CSI Driver is, and the default VolumeSnapshotClass associated with that CSI Driver will be used. If more than one VolumeSnapshotClass exist for a given CSI Driver and more than one have been marked as default, CreateSnapshot will fail and generate an event. Empty string is not allowed for this field." - type: string - required: - - source - type: object - status: - description: status represents the current information of a snapshot. Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object. - properties: - boundVolumeSnapshotContentName: - description: "boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent object to which this VolumeSnapshot object intends to bind to. If not specified, it indicates that the VolumeSnapshot object has not been successfully bound to a VolumeSnapshotContent object yet. NOTE: To avoid possible security issues, consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object." - type: string - creationTime: - description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it may indicate that the creation time of the snapshot is unknown. - format: date-time - type: string - error: - description: error is the last observed error during snapshot creation, if any. This field could be helpful to upper level controllers(i.e., application controller) to decide whether they should continue on waiting for the snapshot to be created based on the type of error reported. The snapshot controller will keep retrying when an error occurrs during the snapshot creation. Upon success, this error field will be cleared. - properties: - message: - description: "message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information." - type: string - time: - description: time is the timestamp when the error was encountered. - format: date-time - type: string - type: object - readyToUse: - description: readyToUse indicates if the snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. - type: boolean - restoreSize: - type: string - description: restoreSize represents the minimum size of volume required to create a volume from this snapshot. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} -status: - acceptedNames: - kind: "" - plural: "" - conditions: [] - storedVersions: [] diff --git a/deploy/kubernetes/overlays/dev/kustomization.yaml b/deploy/kubernetes/overlays/dev/kustomization.yaml deleted file mode 100644 index b4cd8d087c..0000000000 --- a/deploy/kubernetes/overlays/dev/kustomization.yaml +++ /dev/null @@ -1,7 +0,0 @@ -apiVersion: kustomize.config.k8s.io/v1beta1 -kind: Kustomization -bases: - - ../../base -images: - - name: gcr.io/k8s-staging-provider-aws/aws-ebs-csi-driver - newTag: latest diff --git a/deploy/kubernetes/overlays/stable/ecr/kustomization.yaml b/deploy/kubernetes/overlays/stable/ecr/kustomization.yaml index d36d7ca71e..356973c067 100644 --- a/deploy/kubernetes/overlays/stable/ecr/kustomization.yaml +++ b/deploy/kubernetes/overlays/stable/ecr/kustomization.yaml @@ -5,7 +5,7 @@ bases: images: - name: k8s.gcr.io/provider-aws/aws-ebs-csi-driver newName: 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver - newTag: v1.0.0 + newTag: v1.1.3 - name: k8s.gcr.io/sig-storage/csi-provisioner newName: public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner newTag: v2.1.1-eks-1-18-3 diff --git a/deploy/kubernetes/overlays/stable/kustomization.yaml b/deploy/kubernetes/overlays/stable/kustomization.yaml index 36f0134e75..a5002a8bc4 100644 --- a/deploy/kubernetes/overlays/stable/kustomization.yaml +++ b/deploy/kubernetes/overlays/stable/kustomization.yaml @@ -4,7 +4,7 @@ bases: - ../../base images: - name: k8s.gcr.io/provider-aws/aws-ebs-csi-driver - newTag: v1.1.0 + newTag: v1.1.3 - name: k8s.gcr.io/sig-storage/csi-provisioner newTag: v2.1.1 - name: k8s.gcr.io/sig-storage/csi-attacher diff --git a/deploy/kubernetes/values/node.yaml b/deploy/kubernetes/values/node.yaml deleted file mode 100644 index 39afc69d27..0000000000 --- a/deploy/kubernetes/values/node.yaml +++ /dev/null @@ -1,2 +0,0 @@ -image: - tag: latest \ No newline at end of file diff --git a/deploy/kubernetes/values/snapshotter.yaml b/deploy/kubernetes/values/snapshotter.yaml deleted file mode 100644 index 0ff3e8cc91..0000000000 --- a/deploy/kubernetes/values/snapshotter.yaml +++ /dev/null @@ -1 +0,0 @@ -enableVolumeSnapshot: true \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 5ef60d1814..06a85127c2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -12,7 +12,8 @@ The [Amazon Elastic Block Store](https://aws.amazon.com/ebs/) Container Storage | AWS EBS CSI Driver \ CSI Version | v0.3.0| v1.0.0 | v1.1.0 | |----------------------------------------|-------|--------|--------| | master branch | no | no | yes | -| v1.1.0 | no | no | yes | +| v1.2.0 | no | no | yes | +| v1.1.x | no | no | yes | | v1.0.0 | no | no | yes | | v0.10.x | no | no | yes | | v0.9.x | no | no | yes | @@ -75,9 +76,10 @@ There are couple driver options that can be passed as arguments when starting dr Following sections are Kubernetes specific. If you are Kubernetes user, use followings for driver features, installation steps and examples. ## Kubernetes Version Compatibility Matrix -| AWS EBS CSI Driver \ Kubernetes Version| v1.12 | v1.13 | v1.14 | v1.15 | v1.16 | v1.17 | v1.18+ | +| AWS EBS CSI Driver \ Kubernetes Version| v1.12 | v1.13 | v1.14 | v1.15 | v1.16 | v1.17 | v1.18+| |----------------------------------------|-------|-------|-------|-------|-------|-------|-------| | master branch | no | no+ | no | no | no | yes | yes | +| v1.2.0 | no | no+ | no | no | no | yes | yes | | v1.1.0 | no | no+ | no | no | no | yes | yes | | v1.0.0 | no | no+ | no | no | no | yes | yes | | v0.10.x | no | no+ | no | no | no | yes | yes | @@ -94,23 +96,28 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll **Note**: for the entry with `+` sign, it means the driver's default released manifest doesn't work with corresponding Kubernetes version, but the driver container image is compatiable with the Kubernetes version if an older version's manifest is used. ## Container Images: -|AWS EBS CSI Driver Version | Image | -|---------------------------|--------------------------------------------------| -|master branch |amazon/aws-ebs-csi-driver:latest | -|v1.1.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.0 | -|v1.0.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.0.0 | -|v0.10.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.1| -|v0.10.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.0| -|v0.9.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.1 | -|v0.9.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0 | -|v0.8.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.8.1 | -|v0.7.1 |amazon/aws-ebs-csi-driver:v0.7.1 | -|v0.6.0 |amazon/aws-ebs-csi-driver:v0.6.0 | -|v0.5.0 |amazon/aws-ebs-csi-driver:v0.5.0 | -|v0.4.0 |amazon/aws-ebs-csi-driver:v0.4.0 | -|v0.3.0 |amazon/aws-ebs-csi-driver:v0.3.0 | -|v0.2.0 |amazon/aws-ebs-csi-driver:0.2.0 | -|v0.1.0 |amazon/aws-ebs-csi-driver:0.1.0-alpha | +|AWS EBS CSI Driver Version | GCR Image | ECR Image | +|---------------------------|--------------------------------------------------|-----------------------------------------------------------------------------| +|v1.2.0 |Image ToBeBuild | Image ToBeBuild | +|v1.1.3 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.3 | 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver:v1.1.3 | +|v1.1.2 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.2 | 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver:v1.1.2 | +|v1.1.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.1 | 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver:v1.1.1 | +|v1.1.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.1.0 | 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver:v1.1.0 | +|v1.0.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v1.0.0 | | +|v0.10.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.1| 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver:v0.10.1 | +|v0.10.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.10.0| | +|v0.9.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.1 | | +|v0.9.0 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.9.0 | 602401143452.dkr.ecr.us-west-2.amazonaws.com/eks/aws-ebs-csi-driver:v0.9.0 | +|v0.8.1 |k8s.gcr.io/provider-aws/aws-ebs-csi-driver:v0.8.1 | | +|v0.7.1 | | amazon/aws-ebs-csi-driver:v0.7.1 | +|v0.6.0 | | amazon/aws-ebs-csi-driver:v0.6.0 | +|v0.5.0 | | amazon/aws-ebs-csi-driver:v0.5.0 | +|v0.4.0 | | amazon/aws-ebs-csi-driver:v0.4.0 | +|v0.3.0 | | amazon/aws-ebs-csi-driver:v0.3.0 | +|v0.2.0 | | amazon/aws-ebs-csi-driver:0.2.0 | +|v0.1.0 | | amazon/aws-ebs-csi-driver:0.1.0-alpha | + +**Note**: If your cluster isn't in the `us-west-2` Region, please change `602401143452.dkr.ecr.us-west-2.amazonaws.com` to the [address](https://github.com/awsdocs/amazon-eks-user-guide/blob/master/doc_source/add-ons-images.md) that corresponds to your Region. ## Features * **Static Provisioning** - create a new or migrating existing EBS volumes, then create persistence volume (PV) from the EBS volume and consume the PV from container using persistence volume claim (PVC). @@ -127,37 +134,29 @@ Following sections are Kubernetes specific. If you are Kubernetes user, use foll * Enable flag `--allow-privileged=true` for `kubelet` and `kube-apiserver` * Enable `kube-apiserver` feature gates `--feature-gates=CSINodeInfo=true,CSIDriverRegistry=true,CSIBlockVolume=true,VolumeSnapshotDataSource=true` * Enable `kubelet` feature gates `--feature-gates=CSINodeInfo=true,CSIDriverRegistry=true,CSIBlockVolume=true` +* If you intend to use the csi-snapshotter functionality you will need to first install the [CSI Snapshotter](https://github.com/kubernetes-csi/external-snapshotter) ## Installation #### Set up driver permission -The driver requires IAM permission to talk to Amazon EBS to manage the volume on user's behalf. There are several methods to grant driver IAM permission: -* Using secret object - create an IAM user with proper permission, put that user's credentials in [secret manifest](../deploy/kubernetes/secret.yaml) then deploy the secret. +The driver requires IAM permission to talk to Amazon EBS to manage the volume on user's behalf. [The example policy here](./example-iam-policy.json) defines these permissions. There are several methods to grant the driver IAM permission: +* Using IAM [instance profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) - attach the policy to the instance profile IAM role and turn on access to [instance metadata](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for the instance(s) on which the driver Deployment will run +* EKS only: Using [IAM roles for ServiceAccounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) - create an IAM role, attach the policy to it, then follow the IRSA documentation to associate the IAM role with the driver Deployment service account, which if you are installing via helm is determined by value `controller.serviceAccount.name`, `ebs-csi-controller-sa` by default +* Using secret object - create an IAM user, attach the policy to it, put that user's credentials in [secret manifest](../deploy/kubernetes/secret.yaml), then deploy the secret ```sh curl https://raw.githubusercontent.com/kubernetes-sigs/aws-ebs-csi-driver/master/deploy/kubernetes/secret.yaml > secret.yaml # Edit the secret with user credentials kubectl apply -f secret.yaml ``` -* Using IAM [instance profile](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_switch-role-ec2_instance-profiles.html) - grant all the worker nodes with [proper permission](./example-iam-policy.json) by attaching policy to the instance profile of the worker. -#### Deploy CRD (optional) -If your cluster is v1.14+, you can skip this step. Install the `CSINodeInfo` CRD on the cluster: -```sh -kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/release-1.13/pkg/crd/manifests/csinodeinfo.yaml -``` #### Config node toleration settings -By default, driver tolerates taint `CriticalAddonsOnly` and has `tolerationSeconds` configured as `300`, to deploy the driver on any nodes, please set helm `Value.node.tolerateAllTaints` to true before deployment +By default, driver tolerates taint `CriticalAddonsOnly` and has `tolerationSeconds` configured as `300`, to deploy the driver on all nodes, please set helm `Value.node.tolerateAllTaints` to true before deployment #### Deploy driver Please see the compatibility matrix above before you deploy the driver -If you want to deploy the stable driver without alpha features: -```sh -kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-0.10" -``` - -If you want to deploy the driver with alpha features: +To deploy the CSI driver: ```sh -kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/alpha/?ref=master" +kubectl apply -k "github.com/kubernetes-sigs/aws-ebs-csi-driver/deploy/kubernetes/overlays/stable/?ref=release-1.1" ``` Verify driver is running: @@ -180,6 +179,78 @@ helm upgrade --install aws-ebs-csi-driver \ aws-ebs-csi-driver/aws-ebs-csi-driver ``` +##### Upgrading from version 1.X to 2.X of the helm chart +Version 2.0.0 remove support for helm v2 and now requires helm v3 or above + +The [CSI Snapshotter](https://github.com/kubernetes-csi/external-snapshotter) controller and CRDs will no longer be installed as part of this chart and moving forward will be a prerequisite of using the snap shotting functionality. + +The following deprecated values have been removed, and you should now use their counterparts under the `controller` and `node` maps which have been available since chart version 1.1.0 +* affinity +* extraCreateMetadata +* extraVolumeTags +* k8sTagClusterId +* nodeSelector +* podAnnotations +* priorityClassName +* region +* replicaCount +* resources +* tolerations +* topologySpreadConstraints +* volumeAttachLimit + +The values under `serviceAccount.controller` have been relocated to `controller.serviceAccount` +The values under `serviceAccount.node` have been relocated to `node.serviceAccount` + +The following `sidecars` values have been reorganized from +```yaml +sidecars: + provisionerImage: + attacherImage: + snapshotterImage: + livenessProbeImage: + resizerImage: + nodeDriverRegistrarImage: +``` +to +```yaml +sidecars: + provisioner: + image: + attacher: + image: + snapshotter: + image: + livenessProbe: + image: + resizer: + image: + nodeDriverRegistrar: + image: +``` + +With the above reorganization `controller.containerResources`, `controller.env`, `node.containerResources`, and `node.env` were also moved into the sidecars structure as follows +```yaml +sidecars: + provisioner: + env: [] + resources: {} + attacher: + env: [] + resources: {} + snapshotter: + env: [] + resources: {} + livenessProbe: + resources: {} + resizer: + env: [] + resources: {} + nodeDriverRegistrar: + env: [] + resources: {} +``` + #### Deploy driver with debug mode To view driver debug logs, run the CSI driver with `-v=5` command line option @@ -195,12 +266,14 @@ Make sure you follow the [Prerequisites](README.md#Prerequisites) before the exa ## Migrating from in-tree EBS plugin -Starting from Kubernetes 1.17, CSI migration is supported as beta feature (alpha since 1.14). If you have persistence volumes that are created with in-tree `kubernetes.io/aws-ebs` plugin, you could migrate to use EBS CSI driver. To turn on the migration, drain the node and set `CSIMigration` and `CSIMigrationAWS` feature gates to `true` for `kube-controller-manager` and `kubelet`. +Starting from Kubernetes 1.17, CSI migration is supported as beta feature (alpha since 1.14). If you have persistent volumes that are created with in-tree `kubernetes.io/aws-ebs` plugin, you can migrate to use EBS CSI driver. To turn on the migration, set `CSIMigration` and `CSIMigrationAWS` feature gates to `true` for `kube-controller-manager`. Then drain Nodes and set the same feature gates to `true` for `kubelet`. To make sure dynamically provisioned EBS volumes have all tags that the in-tree volume plugin used: -* Run the external-provisioner sidecar with `--extra-create-metadata=true` cmdline option. External-provisioner v1.6 or newer is required. +* Run the external-provisioner sidecar with `--extra-create-metadata=true` cmdline option. The helm chart sets this option true by default. * Run the CSI driver with `--k8s-tag-cluster-id=` command line option. +To make sure that the CSI driver has permission to Attach, Detach, and Delete volumes that were dynamically provisioned and tagged by the in-tree plugin prior to migration being turned on, the IAM policy has to grant permission to operate on volumes with tag `kubernetes.io/cluster/": "owned"` like in [the example policy](./example-iam-policy.json#L85). + **Warning**: * kubelet *must* be drained of all pods with mounted EBS volumes ***before*** changing its CSI migration feature flags. Failure to do this will cause deleted pods to get stuck in `Terminating`, requiring a forced delete which can cause filesystem corruption. See [#679](../../../issues/679) for more details. @@ -229,10 +302,6 @@ Please see [Release Process](./RELEASE.md). * EC2 instance is required to run integration test, since it is exercising the actual flow of creating EBS volume, attaching it and read/write on the disk. See [Integration Testing](../tests/integration/README.md) for more details. * E2E tests exercises various driver functionalities in Kubernetes cluster. See [E2E Testing](../tests/e2e/README.md) for more details. -### Build and Publish Container Image -* Build image and push it with latest tag: `make image && make push` -* Build image and push it with release tag: `make image-release && make push-release` - ### Helm and manifests The helm chart for this project is in the `charts/aws-ebs-csi-driver` directory. The manifests for this project are in the `deploy/kubernetes` directory. All of the manifests except kustomize patches are generated by running `helm template`. This keeps the helm chart and the manifests in sync. diff --git a/docs/example-iam-policy.json b/docs/example-iam-policy.json index e1c2354bfb..e48432ef92 100644 --- a/docs/example-iam-policy.json +++ b/docs/example-iam-policy.json @@ -69,6 +69,30 @@ } } }, + { + "Effect": "Allow", + "Action": [ + "ec2:CreateVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "aws:RequestTag/kubernetes.io/cluster/*": "owned" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "ec2:ResourceTag/ebs.csi.aws.com/cluster": "true" + } + } + }, { "Effect": "Allow", "Action": [ @@ -89,7 +113,7 @@ "Resource": "*", "Condition": { "StringLike": { - "ec2:ResourceTag/ebs.csi.aws.com/cluster": "true" + "ec2:ResourceTag/kubernetes.io/cluster/*": "owned" } } }, @@ -118,4 +142,4 @@ } } ] -} \ No newline at end of file +} diff --git a/examples/kubernetes/dynamic-provisioning/README.md b/examples/kubernetes/dynamic-provisioning/README.md index 179af5ab37..afced29391 100644 --- a/examples/kubernetes/dynamic-provisioning/README.md +++ b/examples/kubernetes/dynamic-provisioning/README.md @@ -5,7 +5,7 @@ This example shows how to create a EBS volume and consume it from container dyna 1. Kubernetes 1.13+ (CSI 1.0). -2. The [aws-ebs-csi-driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) is installed with `--set enableVolumeScheduling=true`. +2. The [aws-ebs-csi-driver](https://github.com/kubernetes-sigs/aws-ebs-csi-driver) is installed. ## Usage diff --git a/examples/kubernetes/snapshot/specs/classes/snapshotclass.yaml b/examples/kubernetes/snapshot/specs/classes/snapshotclass.yaml index c3670ef4b8..2d15c9849b 100644 --- a/examples/kubernetes/snapshot/specs/classes/snapshotclass.yaml +++ b/examples/kubernetes/snapshot/specs/classes/snapshotclass.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotClass metadata: name: csi-aws-vsc diff --git a/examples/kubernetes/snapshot/specs/snapshot-import/README.md b/examples/kubernetes/snapshot/specs/snapshot-import/README.md index 41e7950f26..9d2800e16e 100644 --- a/examples/kubernetes/snapshot/specs/snapshot-import/README.md +++ b/examples/kubernetes/snapshot/specs/snapshot-import/README.md @@ -23,7 +23,7 @@ volumes using the `VolumeSnapshot` custom resources. snapshot in us-west-2b availability zone. ``` -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotContent metadata: name: static-snapshot-content diff --git a/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot-content.yaml b/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot-content.yaml index c284cbab8a..4d507847da 100644 --- a/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot-content.yaml +++ b/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot-content.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshotContent metadata: name: static-snapshot-content diff --git a/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot.yaml b/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot.yaml index d23597b6a9..0bf9e59163 100644 --- a/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot.yaml +++ b/examples/kubernetes/snapshot/specs/snapshot-import/static-snapshot/volume-snapshot.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: static-snapshot-demo diff --git a/examples/kubernetes/snapshot/specs/snapshot/snapshot.yaml b/examples/kubernetes/snapshot/specs/snapshot/snapshot.yaml index b0ea9e027c..6806a5ed5a 100644 --- a/examples/kubernetes/snapshot/specs/snapshot/snapshot.yaml +++ b/examples/kubernetes/snapshot/specs/snapshot/snapshot.yaml @@ -1,4 +1,4 @@ -apiVersion: snapshot.storage.k8s.io/v1beta1 +apiVersion: snapshot.storage.k8s.io/v1 kind: VolumeSnapshot metadata: name: ebs-volume-snapshot diff --git a/examples/kubernetes/windows/README.md b/examples/kubernetes/windows/README.md new file mode 100644 index 0000000000..0b092ae6c2 --- /dev/null +++ b/examples/kubernetes/windows/README.md @@ -0,0 +1,74 @@ +## Windows + +**This example requires pre-release versions of csi-proxy and the driver that do not exist yet. It is intended for developers only for now. Only basic read/write (mount/unmount and attach/detach) functionality has been tested, other features like resize don't work yet.** + +This example shows how to create a EBS volume and consume it from a Windows container dynamically. + + +## Prerequisites + +1. A 1.18+ Windows node. Windows support has only been tested on 1.18 EKS Windows nodes. https://docs.aws.amazon.com/eks/latest/userguide/windows-support.html +2. [csi-proxy](https://github.com/kubernetes-csi/csi-proxy) v1.0.0+ installed on the Windows node. +3. The driver v1.2.0+ Node plugin (DaemonSet) installed on the Windows node. +4. The driver v1.2.0+ Controller plugin (Deployment) installed on a Linux node (as it cannot run on a Windows node). + +## Usage + +1. Create a sample app along with the StorageClass and the PersistentVolumeClaim: +``` +kubectl apply -f specs/ +``` + +2. Validate the volume was created and `volumeHandle` contains an EBS volumeID: +``` +kubectl describe pv +``` + +3. Validate the pod can write data to the volume: +``` +kubectl exec -it windows-server-iis-7c5fc8f6c5-t5mk9 -- powershell + +PS C:\> New-Item -Path data -Name "testfile1.txt" -ItemType "file" -Value "This +is a text string." + + + Directory: C:\data + + +Mode LastWriteTime Length Name +---- ------------- ------ ---- +-a---- 4/7/2021 12:31 AM 22 testfile1.txt +``` + +4. Validate a different pod can read data from the volume: +``` +kubectl delete po windows-server-iis-7c5fc8f6c5-t5mk9 + +kubectl exec -it windows-server-iis-7c5fc8f6c5-j44qv -- powershell + +PS C:\> ls data + + + Directory: C:\data + + +Mode LastWriteTime Length Name +---- ------------- ------ ---- +-a---- 4/7/2021 12:31 AM 22 testfile1.txt +``` + +5. OPTIONAL: In case you want to run some e2e tests with Windows pods, make sure to cordon Linux nodes for the duration of the test and modify the vpc-admission-webhook so that the Pods created as part of the tests get scheduled to the Windows nodes. +``` +kubectl cordon -l kubernetes.io/os=linux +# edit the webhook such that OSLabelSelectorOverride=all, otherwise the webhook +# won't mutate Pods created by the test and they won't run +kubectl edit deployment -n kube-system vpc-admission-webhook +deployment.apps/vpc-admission-webhook edited +ginkgo -nodes=1 -v --focus="External.Storage.*default.fs.*should.store.data" ./tests/e2e-kubernetes/ -- -kubeconfig=$KUBECONFIG -gce-zone=us-west-2a -node-os-distro=windows +``` + +6. Cleanup resources: +``` +kubectl delete -f specs/ +kubectl uncordon -l kubernetes.io/os=linux +``` diff --git a/examples/kubernetes/windows/specs/windows.yaml b/examples/kubernetes/windows/specs/windows.yaml new file mode 100644 index 0000000000..566e1b47b8 --- /dev/null +++ b/examples/kubernetes/windows/specs/windows.yaml @@ -0,0 +1,59 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: windows-server-iis +spec: + selector: + matchLabels: + app: windows-server-iis + tier: backend + track: stable + replicas: 1 + template: + metadata: + labels: + app: windows-server-iis + tier: backend + track: stable + spec: + containers: + - name: windows-server-iis + image: mcr.microsoft.com/windows/servercore:1809 + ports: + - name: http + containerPort: 80 + imagePullPolicy: IfNotPresent + command: + - powershell.exe + - -command + - "Add-WindowsFeature Web-Server; Invoke-WebRequest -UseBasicParsing -Uri 'https://dotnetbinaries.blob.core.windows.net/servicemonitor/2.0.1.6/ServiceMonitor.exe' -OutFile 'C:\\ServiceMonitor.exe'; echo '

Hello EKS!!!

' > C:\\inetpub\\wwwroot\\default.html; C:\\ServiceMonitor.exe 'w3svc'; " + volumeMounts: + - name: persistent-storage + mountPath: C:\data + nodeSelector: + kubernetes.io/os: windows + volumes: + - name: persistent-storage + persistentVolumeClaim: + claimName: ebs-claim +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: ebs-claim +spec: + storageClassName: windows + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 4Gi +--- +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: windows +provisioner: ebs.csi.aws.com +volumeBindingMode: WaitForFirstConsumer +parameters: + fstype: ntfs diff --git a/go.mod b/go.mod index 1f8a0b6a47..9b504fa63b 100644 --- a/go.mod +++ b/go.mod @@ -1,19 +1,19 @@ module github.com/kubernetes-sigs/aws-ebs-csi-driver require ( - github.com/aws/aws-sdk-go v1.35.37 + github.com/aws/aws-sdk-go v1.40.4 github.com/container-storage-interface/spec v1.3.0 github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a // indirect github.com/golang/mock v1.5.0 github.com/golang/protobuf v1.4.3 github.com/imdario/mergo v0.3.7 // indirect - github.com/kubernetes-csi/csi-proxy/client v0.2.2 + github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 github.com/kubernetes-csi/csi-test v2.0.0+incompatible github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0 github.com/onsi/ginkgo v1.11.0 github.com/onsi/gomega v1.7.1 github.com/stretchr/testify v1.6.1 - golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 + golang.org/x/sys v0.0.0-20210423082822-04245dca01da google.golang.org/grpc v1.34.0 k8s.io/api v0.21.0 k8s.io/apimachinery v0.21.0 diff --git a/go.sum b/go.sum index da7ceecd9b..c5af30ddc5 100644 --- a/go.sum +++ b/go.sum @@ -41,10 +41,10 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20200415212048-7901bc822317/go.mod h1:DF8FZRxMHMGv/vP2lQP6h+dYzzjpuRn24VeRiYn3qjQ= github.com/JeffAshton/win_pdh v0.0.0-20161109143554-76bb4ee9f0ab/go.mod h1:3VYc5hodBMJ5+l/7J4xAyMeuM2PNuepvHlGs8yilUCA= github.com/MakeNowJust/heredoc v0.0.0-20170808103936-bb23615498cd/go.mod h1:64YHyfSL2R96J44Nlwm39UHepQbyR5q10x7iYa1ks2E= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.15 h1:qkLXKzb1QoVatRyd/YlXZ/Kg0m5K3SPuoD82jjSOaBc= github.com/Microsoft/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990/go.mod h1:ay/0dTb7NsG8QMDfsRfLHgZo/6xAJShLe1+ePPflihk= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= @@ -67,8 +67,8 @@ github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:l github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/auth0/go-jwt-middleware v0.0.0-20170425171159-5493cabe49f7/go.mod h1:LWMyo4iOLWXHGdBki7NIht1kHru/0wM179h+d3g8ATM= github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= -github.com/aws/aws-sdk-go v1.35.37 h1:XA71k5PofXJ/eeXdWrTQiuWPEEyq8liguR+Y/QUELhI= -github.com/aws/aws-sdk-go v1.35.37/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.40.4 h1:kxTX1kVjuXN1vuq6JgZvWI/Lt9zCfUFuAAxFoq0dHYI= +github.com/aws/aws-sdk-go v1.40.4/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -377,8 +377,8 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kubernetes-csi/csi-proxy/client v0.2.2 h1:VpMddHnbYA1oBeU5nrisdyrpOAAT0HqME7fsTi6BG2w= -github.com/kubernetes-csi/csi-proxy/client v0.2.2/go.mod h1:6ptQQmti5QHwBxSsh8Cy00oGdogj0JXewFnu8FFjgOs= +github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1 h1:rWwsNUTbgFfUMYGe/w4N+AJAR8Z/wQ1QMgf5JdTlv8g= +github.com/kubernetes-csi/csi-proxy/client v1.0.0-rc.1/go.mod h1:URLOkEbRhOwKVvGvug6HSKRTpLSFuQ/Gt3xahDag8qc= github.com/kubernetes-csi/csi-test v2.0.0+incompatible h1:ia04uVFUM/J9n/v3LEMn3rEG6FmKV5BH9QLw7H68h44= github.com/kubernetes-csi/csi-test v2.0.0+incompatible/go.mod h1:YxJ4UiuPWIhMBkxUKY5c267DyA0uDZ/MtAimhx/2TA0= github.com/kubernetes-csi/external-snapshotter/client/v4 v4.0.0 h1:ipLtV9ubLEYx42YvwDa12eVPQvjuGZoPdbCozGzVNRc= @@ -688,8 +688,9 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210224082022-3d97a244fca7 h1:OgUuv8lsRpBibGNbSizVwKWlysjaNzmC9gYMhPVfqFM= golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -755,8 +756,9 @@ golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 h1:8qxJSnu+7dRq6upnbntrmriWByIakBuct5OM/MdQC1M= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -766,8 +768,9 @@ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= diff --git a/hack/e2e/README.md b/hack/e2e/README.md index 538f0aa021..d245cd31b0 100644 --- a/hack/e2e/README.md +++ b/hack/e2e/README.md @@ -41,7 +41,16 @@ To commit changes and submit them as a PR back to the ebs repo: ``` git diff ebs/master:hack/e2e HEAD:hack/e2e > /tmp/hack_e2e.diff -cd $GOPATH/src/github.com/kubernetes-sigs/aws-ebs-csi-driver +pushd $GOPATH/src/github.com/kubernetes-sigs/aws-ebs-csi-driver +git apply --reject --directory hack/e2e /tmp/hack_e2e.diff +git commit +``` + +To consume newer changes from the ebs repo: + +``` +git fetch ebs +git diff HEAD:hack/e2e ebs/master:hack/e2e > /tmp/hack_e2e.diff git apply --reject --directory hack/e2e /tmp/hack_e2e.diff git commit ``` diff --git a/hack/e2e/ecr.sh b/hack/e2e/ecr.sh index 8f710d95be..df7b973b71 100644 --- a/hack/e2e/ecr.sh +++ b/hack/e2e/ecr.sh @@ -11,7 +11,7 @@ function ecr_build_and_push() { IMAGE_NAME=${3} IMAGE_TAG=${4} set +e - if docker images | grep "${IMAGE_NAME}" | grep "${IMAGE_TAG}"; then + if docker images --format "{{.Repository}}:{{.Tag}}" | grep "${IMAGE_NAME}:${IMAGE_TAG}"; then set -e loudecho "Assuming ${IMAGE_NAME}:${IMAGE_TAG} has been built and pushed" else diff --git a/hack/e2e/eksctl.sh b/hack/e2e/eksctl.sh index 2d96860405..3916a1444f 100644 --- a/hack/e2e/eksctl.sh +++ b/hack/e2e/eksctl.sh @@ -4,8 +4,9 @@ set -euo pipefail function eksctl_install() { INSTALL_PATH=${1} + EKSCTL_VERSION=${2} if [[ ! -e ${INSTALL_PATH}/eksctl ]]; then - EKSCTL_DOWNLOAD_URL="https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" + EKSCTL_DOWNLOAD_URL="https://github.com/weaveworks/eksctl/releases/download/${EKSCTL_VERSION}/eksctl_$(uname -s)_amd64.tar.gz" curl --silent --location "${EKSCTL_DOWNLOAD_URL}" | tar xz -C "${INSTALL_PATH}" chmod +x "${INSTALL_PATH}"/eksctl fi @@ -20,6 +21,9 @@ function eksctl_create_cluster() { K8S_VERSION=${6} CLUSTER_FILE=${7} KUBECONFIG=${8} + EKSCTL_PATCH_FILE=${9} + EKSCTL_ADMIN_ROLE=${10} + WINDOWS=${11} generate_ssh_key "${SSH_KEY_PATH}" @@ -38,10 +42,13 @@ function eksctl_create_cluster() { --nodes=3 \ --instance-types="${INSTANCE_TYPE}" \ --version="${K8S_VERSION}" \ + --disable-pod-imds \ --dry-run \ "${CLUSTER_NAME}" > "${CLUSTER_FILE}" - # TODO implement patching + if test -f "$EKSCTL_PATCH_FILE"; then + eksctl_patch_cluster_file "$CLUSTER_FILE" "$EKSCTL_PATCH_FILE" + fi loudecho "Creating cluster $CLUSTER_NAME with $CLUSTER_FILE" ${BIN} create cluster -f "${CLUSTER_FILE}" --kubeconfig "${KUBECONFIG}" @@ -51,6 +58,26 @@ function eksctl_create_cluster() { loudecho "Getting cluster ${CLUSTER_NAME}" ${BIN} get cluster "${CLUSTER_NAME}" + + if [[ -n "$EKSCTL_ADMIN_ROLE" ]]; then + AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) + ADMIN_ARN="arn:aws:iam::${AWS_ACCOUNT_ID}:role/${EKSCTL_ADMIN_ROLE}" + loudecho "Granting ${ADMIN_ARN} admin access to the cluster" + ${BIN} create iamidentitymapping --cluster "${CLUSTER_NAME}" --arn "${ADMIN_ARN}" --group system:masters --username admin + fi + + if [[ "$WINDOWS" == true ]]; then + ${BIN} create nodegroup \ + --cluster="${CLUSTER_NAME}" \ + --node-ami-family=WindowsServer2019FullContainer \ + -n ng-windows \ + -m 1 \ + -M 1 \ + --ssh-access \ + --ssh-public-key "${SSH_KEY_PATH}".pub + ${BIN} utils install-vpc-controllers --cluster="${CLUSTER_NAME}" --approve + fi + return $? } @@ -73,3 +100,23 @@ function eksctl_delete_cluster() { loudecho "Deleting cluster ${CLUSTER_NAME}" ${BIN} delete cluster "${CLUSTER_NAME}" } + +function eksctl_patch_cluster_file() { + CLUSTER_FILE=${1} # input must be yaml + EKSCTL_PATCH_FILE=${2} # input must be yaml + + loudecho "Patching cluster $CLUSTER_NAME with $EKSCTL_PATCH_FILE" + + # Temporary intermediate files for patching + CLUSTER_FILE_0=$CLUSTER_FILE.0 + CLUSTER_FILE_1=$CLUSTER_FILE.1 + + cp "$CLUSTER_FILE" "$CLUSTER_FILE_0" + + # Patch only the Cluster + kubectl patch -f "$CLUSTER_FILE_0" --local --type merge --patch "$(cat "$EKSCTL_PATCH_FILE")" -o yaml > "$CLUSTER_FILE_1" + mv "$CLUSTER_FILE_1" "$CLUSTER_FILE_0" + + # Done patching, overwrite original CLUSTER_FILE + mv "$CLUSTER_FILE_0" "$CLUSTER_FILE" # output is yaml +} diff --git a/hack/e2e/kops.sh b/hack/e2e/kops.sh index 40bca20d4f..ef12d5ba56 100644 --- a/hack/e2e/kops.sh +++ b/hack/e2e/kops.sh @@ -22,12 +22,14 @@ function kops_create_cluster() { CLUSTER_NAME=${2} BIN=${3} ZONES=${4} - INSTANCE_TYPE=${5} - K8S_VERSION=${6} - CLUSTER_FILE=${7} - KUBECONFIG=${8} - KOPS_PATCH_FILE=${9} - KOPS_STATE_FILE=${10} + NODE_COUNT=${5} + INSTANCE_TYPE=${6} + K8S_VERSION=${7} + CLUSTER_FILE=${8} + KUBECONFIG=${9} + KOPS_PATCH_FILE=${10} + KOPS_PATCH_NODE_FILE=${11} + KOPS_STATE_FILE=${12} generate_ssh_key "${SSH_KEY_PATH}" @@ -39,14 +41,19 @@ function kops_create_cluster() { ${BIN} create cluster --state "${KOPS_STATE_FILE}" \ --ssh-public-key="${SSH_KEY_PATH}".pub \ --zones "${ZONES}" \ - --node-count=3 \ + --node-count="${NODE_COUNT}" \ --node-size="${INSTANCE_TYPE}" \ --kubernetes-version="${K8S_VERSION}" \ --dry-run \ - -o json \ + -o yaml \ "${CLUSTER_NAME}" > "${CLUSTER_FILE}" - kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_FILE" + if test -f "$KOPS_PATCH_FILE"; then + kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_FILE" "Cluster" "" + fi + if test -f "$KOPS_PATCH_NODE_FILE"; then + kops_patch_cluster_file "$CLUSTER_FILE" "$KOPS_PATCH_NODE_FILE" "InstanceGroup" "Node" + fi loudecho "Creating cluster $CLUSTER_NAME with $CLUSTER_FILE" ${BIN} create --state "${KOPS_STATE_FILE}" -f "${CLUSTER_FILE}" @@ -86,35 +93,63 @@ function kops_delete_cluster() { ${BIN} delete cluster --name "${CLUSTER_NAME}" --state "${KOPS_STATE_FILE}" --yes } -# TODO switch this to python, all this hacking with jq stinks! +# TODO switch this to python, work exclusively with yaml, use kops toolbox +# template/kops set?, all this hacking with jq stinks! function kops_patch_cluster_file() { - CLUSTER_FILE=${1} - KOPS_PATCH_FILE=${2} + CLUSTER_FILE=${1} # input must be yaml + KOPS_PATCH_FILE=${2} # input must be yaml + KIND=${3} # must be either Cluster or InstanceGroup + ROLE=${4} # must be either Master or Node loudecho "Patching cluster $CLUSTER_NAME with $KOPS_PATCH_FILE" - # Temporary intermediate files for patching + # Temporary intermediate files for patching, don't mutate CLUSTER_FILE until + # the end + CLUSTER_FILE_JSON=$CLUSTER_FILE.json CLUSTER_FILE_0=$CLUSTER_FILE.0 CLUSTER_FILE_1=$CLUSTER_FILE.1 - # Output is an array of Cluster and InstanceGroups - jq '.[] | select(.kind=="Cluster")' "$CLUSTER_FILE" > "$CLUSTER_FILE_0" + # HACK convert the multiple yaml documents to an array of json objects + yaml_to_json "$CLUSTER_FILE" "$CLUSTER_FILE_JSON" - # Patch only the Cluster + # Find the json objects to patch + FILTER=".[] | select(.kind==\"$KIND\")" + if [ -n "$ROLE" ]; then + FILTER="$FILTER | select(.spec.role==\"$ROLE\")" + fi + jq "$FILTER" "$CLUSTER_FILE_JSON" > "$CLUSTER_FILE_0" + + # Patch only the json objects kubectl patch -f "$CLUSTER_FILE_0" --local --type merge --patch "$(cat "$KOPS_PATCH_FILE")" -o json > "$CLUSTER_FILE_1" mv "$CLUSTER_FILE_1" "$CLUSTER_FILE_0" - # Write the patched Cluster back to the array - jq '(.[] | select(.kind=="Cluster")) = $cluster[0]' "$CLUSTER_FILE" --slurpfile cluster "$CLUSTER_FILE_0" > "$CLUSTER_FILE_1" + # Delete the original json objects, add the patched + # TODO Cluster must always be first? + jq "del($FILTER)" "$CLUSTER_FILE_JSON" | jq ". + \$patched | sort" --slurpfile patched "$CLUSTER_FILE_0" > "$CLUSTER_FILE_1" mv "$CLUSTER_FILE_1" "$CLUSTER_FILE_0" - # HACK convert the json array to multiple yaml documents - for ((i = 0; i < $(jq length "$CLUSTER_FILE_0"); i++)); do - echo "---" >> "$CLUSTER_FILE_1" - jq ".[$i]" "$CLUSTER_FILE_0" | kubectl patch -f - --local -p "{}" --type merge -o yaml >> "$CLUSTER_FILE_1" - done + # HACK convert the array of json objects to multiple yaml documents + json_to_yaml "$CLUSTER_FILE_0" "$CLUSTER_FILE_1" mv "$CLUSTER_FILE_1" "$CLUSTER_FILE_0" - # Done patching, overwrite original CLUSTER_FILE - mv "$CLUSTER_FILE_0" "$CLUSTER_FILE" + # Done patching, overwrite original yaml CLUSTER_FILE + mv "$CLUSTER_FILE_0" "$CLUSTER_FILE" # output is yaml + + # Clean up + rm "$CLUSTER_FILE_JSON" +} + +function yaml_to_json() { + IN=${1} + OUT=${2} + kubectl patch -f "$IN" --local -p "{}" --type merge -o json | jq '.' -s > "$OUT" +} + +function json_to_yaml() { + IN=${1} + OUT=${2} + for ((i = 0; i < $(jq length "$IN"); i++)); do + echo "---" >> "$OUT" + jq ".[$i]" "$IN" | kubectl patch -f - --local -p "{}" --type merge -o yaml >> "$OUT" + done } diff --git a/hack/e2e/run.sh b/hack/e2e/run.sh index 3eeac41142..bbefc4fd54 100755 --- a/hack/e2e/run.sh +++ b/hack/e2e/run.sh @@ -35,12 +35,13 @@ CLUSTER_TYPE=${CLUSTER_TYPE:-kops} TEST_DIR=${BASE_DIR}/csi-test-artifacts BIN_DIR=${TEST_DIR}/bin SSH_KEY_PATH=${TEST_DIR}/id_rsa -CLUSTER_FILE=${TEST_DIR}/${CLUSTER_NAME}.${CLUSTER_TYPE}.json -KUBECONFIG=${KUBECONFIG:-"${TEST_DIR}/${CLUSTER_NAME}.kubeconfig"} +CLUSTER_FILE=${TEST_DIR}/${CLUSTER_NAME}.${CLUSTER_TYPE}.yaml +KUBECONFIG=${KUBECONFIG:-"${TEST_DIR}/${CLUSTER_NAME}.${CLUSTER_TYPE}.kubeconfig"} REGION=${AWS_REGION:-us-west-2} ZONES=${AWS_AVAILABILITY_ZONES:-us-west-2a,us-west-2b,us-west-2c} FIRST_ZONE=$(echo "${ZONES}" | cut -d, -f1) +NODE_COUNT=${NODE_COUNT:-3} INSTANCE_TYPE=${INSTANCE_TYPE:-c4.large} AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) @@ -49,13 +50,22 @@ IMAGE_TAG=${IMAGE_TAG:-${TEST_ID}} # kops: must include patch version (e.g. 1.19.1) # eksctl: mustn't include patch version (e.g. 1.19) -K8S_VERSION=${K8S_VERSION:-1.20.6} +K8S_VERSION=${K8S_VERSION:-1.20.8} -KOPS_VERSION=${KOPS_VERSION:-1.20.0} +KOPS_VERSION=${KOPS_VERSION:-1.21.0} KOPS_STATE_FILE=${KOPS_STATE_FILE:-s3://k8s-kops-csi-e2e} KOPS_PATCH_FILE=${KOPS_PATCH_FILE:-./hack/kops-patch.yaml} +KOPS_PATCH_NODE_FILE=${KOPS_PATCH_NODE_FILE:-./hack/kops-patch-node.yaml} + +EKSCTL_VERSION=${EKSCTL_VERSION:-0.56.0-rc.1} +EKSCTL_PATCH_FILE=${EKSCTL_PATCH_FILE:-./hack/eksctl-patch.yaml} +EKSCTL_ADMIN_ROLE=${EKSCTL_ADMIN_ROLE:-} +# Creates a windows node group. The windows ami doesn't (yet) install csi-proxy +# so that has to be done separately. +WINDOWS=${WINDOWS:-"false"} HELM_VALUES_FILE=${HELM_VALUES_FILE:-./hack/values.yaml} +HELM_EXTRA_FLAGS=${HELM_EXTRA_FLAGS:-} TEST_PATH=${TEST_PATH:-"./tests/e2e/..."} ARTIFACTS=${ARTIFACTS:-"${TEST_DIR}/artifacts"} @@ -64,7 +74,8 @@ GINKGO_SKIP=${GINKGO_SKIP:-"\[Disruptive\]"} GINKGO_NODES=${GINKGO_NODES:-4} TEST_EXTRA_FLAGS=${TEST_EXTRA_FLAGS:-} -EBS_SNAPSHOT_CRD=${EBS_SNAPSHOT_CRD:-"./deploy/kubernetes/cluster/crd_snapshotter.yaml"} +EBS_INSTALL_SNAPSHOT=${EBS_INSTALL_SNAPSHOT:-"false"} +EBS_INSTALL_SNAPSHOT_VERSION=${EBS_INSTALL_SNAPSHOT_VERSION:-"v4.1.1"} EBS_CHECK_MIGRATION=${EBS_CHECK_MIGRATION:-"false"} CLEAN=${CLEAN:-"true"} @@ -78,8 +89,8 @@ if [[ "${CLUSTER_TYPE}" == "kops" ]]; then kops_install "${BIN_DIR}" "${KOPS_VERSION}" KOPS_BIN=${BIN_DIR}/kops elif [[ "${CLUSTER_TYPE}" == "eksctl" ]]; then - loudecho "Installing eksctl latest to ${BIN_DIR}" - eksctl_install "${BIN_DIR}" + loudecho "Installing eksctl ${EKSCTL_VERSION} to ${BIN_DIR}" + eksctl_install "${BIN_DIR}" "${EKSCTL_VERSION}" EKSCTL_BIN=${BIN_DIR}/eksctl else loudecho "${CLUSTER_TYPE} must be kops or eksctl!" @@ -109,11 +120,13 @@ if [[ "${CLUSTER_TYPE}" == "kops" ]]; then "$CLUSTER_NAME" \ "$KOPS_BIN" \ "$ZONES" \ + "$NODE_COUNT" \ "$INSTANCE_TYPE" \ "$K8S_VERSION" \ "$CLUSTER_FILE" \ "$KUBECONFIG" \ "$KOPS_PATCH_FILE" \ + "$KOPS_PATCH_NODE_FILE" \ "$KOPS_STATE_FILE" if [[ $? -ne 0 ]]; then exit 1 @@ -127,29 +140,45 @@ elif [[ "${CLUSTER_TYPE}" == "eksctl" ]]; then "$INSTANCE_TYPE" \ "$K8S_VERSION" \ "$CLUSTER_FILE" \ - "$KUBECONFIG" + "$KUBECONFIG" \ + "$EKSCTL_PATCH_FILE" \ + "$EKSCTL_ADMIN_ROLE" \ + "$WINDOWS" if [[ $? -ne 0 ]]; then exit 1 fi fi +if [[ "${EBS_INSTALL_SNAPSHOT}" == true ]]; then + loudecho "Installing snapshot controller and CRDs" + kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml + kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml + kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/client/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml + kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/client/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml + kubectl apply --kubeconfig "${KUBECONFIG}" -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/"${EBS_INSTALL_SNAPSHOT_VERSION}"/client/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml +fi + loudecho "Deploying driver" startSec=$(date +'%s') -"${HELM_BIN}" upgrade --install "${DRIVER_NAME}" \ - --namespace kube-system \ - --set image.repository="${IMAGE_NAME}" \ - --set image.tag="${IMAGE_TAG}" \ - -f "${HELM_VALUES_FILE}" \ - --wait \ - --kubeconfig "${KUBECONFIG}" \ - ./charts/"${DRIVER_NAME}" - -if [[ -r "${EBS_SNAPSHOT_CRD}" ]]; then - loudecho "Deploying snapshot CRD" - kubectl apply -f "$EBS_SNAPSHOT_CRD" \ - --kubeconfig "${KUBECONFIG}" - # TODO deploy snapshot controller too instead of including in helm chart + +HELM_ARGS=(upgrade --install "${DRIVER_NAME}" + --namespace kube-system + --set image.repository="${IMAGE_NAME}" + --set image.tag="${IMAGE_TAG}" + --wait + --kubeconfig "${KUBECONFIG}" + ./charts/"${DRIVER_NAME}") +if [[ -f "$HELM_VALUES_FILE" ]]; then + HELM_ARGS+=(-f "${HELM_VALUES_FILE}") +fi +eval "EXPANDED_HELM_EXTRA_FLAGS=$HELM_EXTRA_FLAGS" +if [[ -n "$EXPANDED_HELM_EXTRA_FLAGS" ]]; then + HELM_ARGS+=("${EXPANDED_HELM_EXTRA_FLAGS}") fi +set -x +"${HELM_BIN}" "${HELM_ARGS[@]}" +set +x + endSec=$(date +'%s') secondUsed=$(((endSec - startSec) / 1)) # Set timeout threshold as 20 seconds for now, usually it takes less than 10s to startup diff --git a/hack/eksctl-patch.yaml b/hack/eksctl-patch.yaml new file mode 100644 index 0000000000..a8d3e4aa15 --- /dev/null +++ b/hack/eksctl-patch.yaml @@ -0,0 +1,9 @@ +iam: + vpcResourceControllerPolicy: true + withOIDC: true + serviceAccounts: + - metadata: + name: ebs-csi-controller-sa + namespace: kube-system + wellKnownPolicies: + ebsCSIController: true diff --git a/hack/kops-patch.yaml b/hack/kops-patch.yaml index 0fa34e5e1d..7475ca50bd 100644 --- a/hack/kops-patch.yaml +++ b/hack/kops-patch.yaml @@ -5,22 +5,142 @@ spec: { "Effect": "Allow", "Action": [ - "ec2:AttachVolume", "ec2:CreateSnapshot", - "ec2:CreateTags", - "ec2:CreateVolume", - "ec2:DeleteSnapshot", - "ec2:DeleteTags", - "ec2:DeleteVolume", + "ec2:AttachVolume", + "ec2:DetachVolume", + "ec2:ModifyVolume", + "ec2:DescribeAvailabilityZones", "ec2:DescribeInstances", "ec2:DescribeSnapshots", "ec2:DescribeTags", "ec2:DescribeVolumes", - "ec2:DetachVolume", - "ec2:ModifyVolume", "ec2:DescribeVolumesModifications" ], "Resource": "*" + }, + { + "Effect": "Allow", + "Action": [ + "ec2:CreateTags" + ], + "Resource": [ + "arn:aws:ec2:*:*:volume/*", + "arn:aws:ec2:*:*:snapshot/*" + ], + "Condition": { + "StringEquals": { + "ec2:CreateAction": [ + "CreateVolume", + "CreateSnapshot" + ] + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteTags" + ], + "Resource": [ + "arn:aws:ec2:*:*:volume/*", + "arn:aws:ec2:*:*:snapshot/*" + ] + }, + { + "Effect": "Allow", + "Action": [ + "ec2:CreateVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "aws:RequestTag/ebs.csi.aws.com/cluster": "true" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:CreateVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "aws:RequestTag/CSIVolumeName": "*" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:CreateVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "aws:RequestTag/kubernetes.io/cluster/*": "owned" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "ec2:ResourceTag/ebs.csi.aws.com/cluster": "true" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "ec2:ResourceTag/CSIVolumeName": "*" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteVolume" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "ec2:ResourceTag/kubernetes.io/cluster/*": "owned" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteSnapshot" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "ec2:ResourceTag/CSIVolumeSnapshotName": "*" + } + } + }, + { + "Effect": "Allow", + "Action": [ + "ec2:DeleteSnapshot" + ], + "Resource": "*", + "Condition": { + "StringLike": { + "ec2:ResourceTag/ebs.csi.aws.com/cluster": "true" + } + } } ] kubeAPIServer: diff --git a/hack/prow.sh b/hack/prow.sh index 2cdebf741c..4c99a0c0c9 100755 --- a/hack/prow.sh +++ b/hack/prow.sh @@ -42,7 +42,6 @@ docker run --rm --privileged multiarch/qemu-user-static --reset -p yes loudecho "Build and push debian target" docker buildx build \ --tag="${REGISTRY_NAME}"/aws-ebs-csi-driver:"${GIT_TAG}" \ - --tag="${REGISTRY_NAME}"/aws-ebs-csi-driver:latest \ --platform=linux/arm64,linux/amd64 \ --progress=plain \ --push=true \ @@ -52,7 +51,6 @@ docker buildx build \ loudecho "Build and push amazonlinux target" docker buildx build \ --tag="${REGISTRY_NAME}"/aws-ebs-csi-driver:"${GIT_TAG}"-amazonlinux \ - --tag="${REGISTRY_NAME}"/aws-ebs-csi-driver:latest-amazonlinux \ --platform=linux/arm64,linux/amd64 \ --progress=plain \ --push=true \ diff --git a/hack/values.yaml b/hack/values.yaml index 0ff3e8cc91..253aa649f0 100644 --- a/hack/values.yaml +++ b/hack/values.yaml @@ -1 +1,4 @@ -enableVolumeSnapshot: true \ No newline at end of file +controller: + logLevel: 5 +node: + logLevel: 5 diff --git a/hack/values_eksctl.yaml b/hack/values_eksctl.yaml new file mode 100644 index 0000000000..5b1e27d562 --- /dev/null +++ b/hack/values_eksctl.yaml @@ -0,0 +1,6 @@ +controller: + logLevel: 5 + serviceAccount: + create: false # let eksctl create it +node: + logLevel: 5 diff --git a/pkg/cloud/cloud.go b/pkg/cloud/cloud.go index 7cd14cc027..d2fabf47be 100644 --- a/pkg/cloud/cloud.go +++ b/pkg/cloud/cloud.go @@ -136,6 +136,9 @@ var ( // ErrNotFound is returned when a resource is not found. ErrNotFound = errors.New("Resource was not found") + // ErrIdempotent is returned when another request with same idempotent token is in-flight. + ErrIdempotentParameterMismatch = errors.New("Parameters on this idempotent request are inconsistent with parameters used in previous request(s)") + // ErrAlreadyExists is returned when a resource is already existent. ErrAlreadyExists = errors.New("Resource already exists") @@ -317,8 +320,9 @@ func (c *cloud) CreateDisk(ctx context.Context, volumeName string, diskOptions * } } - request := &ec2.CreateVolumeInput{ + requestInput := &ec2.CreateVolumeInput{ AvailabilityZone: aws.String(zone), + ClientToken: aws.String(volumeName), Size: aws.Int64(capacityGiB), VolumeType: aws.String(createType), TagSpecifications: []*ec2.TagSpecification{&tagSpec}, @@ -327,29 +331,32 @@ func (c *cloud) CreateDisk(ctx context.Context, volumeName string, diskOptions * // EBS doesn't handle empty outpost arn, so we have to include it only when it's non-empty if len(diskOptions.OutpostArn) > 0 { - request.OutpostArn = aws.String(diskOptions.OutpostArn) + requestInput.OutpostArn = aws.String(diskOptions.OutpostArn) } if len(diskOptions.KmsKeyID) > 0 { - request.KmsKeyId = aws.String(diskOptions.KmsKeyID) - request.Encrypted = aws.Bool(true) + requestInput.KmsKeyId = aws.String(diskOptions.KmsKeyID) + requestInput.Encrypted = aws.Bool(true) } if iops > 0 { - request.Iops = aws.Int64(iops) + requestInput.Iops = aws.Int64(iops) } if throughput > 0 && diskOptions.VolumeType == VolumeTypeGP3 { - request.Throughput = aws.Int64(throughput) + requestInput.Throughput = aws.Int64(throughput) } snapshotID := diskOptions.SnapshotID if len(snapshotID) > 0 { - request.SnapshotId = aws.String(snapshotID) + requestInput.SnapshotId = aws.String(snapshotID) } - response, err := c.ec2.CreateVolumeWithContext(ctx, request) + response, err := c.ec2.CreateVolumeWithContext(ctx, requestInput) if err != nil { if isAWSErrorSnapshotNotFound(err) { return nil, ErrNotFound } + if isAWSErrorIdempotentParameterMismatch(err) { + return nil, ErrIdempotentParameterMismatch + } return nil, fmt.Errorf("could not create volume in EC2: %v", err) } @@ -989,6 +996,13 @@ func isAWSErrorSnapshotNotFound(err error) bool { return isAWSError(err, "InvalidSnapshot.NotFound") } +// isAWSErrorIdempotentParameterMismatch returns a boolean indicating whether the +// given error is an AWS IdempotentParameterMismatch error. +// This error is reported when the two request contains same client-token but different parameters +func isAWSErrorIdempotentParameterMismatch(err error) bool { + return isAWSError(err, "IdempotentParameterMismatch") +} + // ResizeDisk resizes an EBS volume in GiB increments, rouding up to the next possible allocatable unit. // It returns the volume size after this call or an error if the size couldn't be determined. func (c *cloud) ResizeDisk(ctx context.Context, volumeID string, newSizeBytes int64) (int64, error) { diff --git a/pkg/cloud/cloud_test.go b/pkg/cloud/cloud_test.go index 7c53a135c7..d033575f31 100644 --- a/pkg/cloud/cloud_test.go +++ b/pkg/cloud/cloud_test.go @@ -203,6 +203,30 @@ func TestCreateDisk(t *testing.T) { expErr: fmt.Errorf("could not create volume in EC2: CreateVolume generic error"), expCreateVolumeErr: fmt.Errorf("CreateVolume generic error"), }, + { + name: "fail: ec2.CreateVolume returned snapshot not found error", + volumeName: "vol-test-name-error", + diskOptions: &DiskOptions{ + CapacityBytes: util.GiBToBytes(1), + Tags: map[string]string{VolumeNameTagKey: "vol-test", AwsEbsDriverTagKey: "true"}, + AvailabilityZone: expZone, + }, + expCreateVolumeInput: &ec2.CreateVolumeInput{}, + expErr: ErrNotFound, + expCreateVolumeErr: awserr.New("InvalidSnapshot.NotFound", "Snapshot not found", fmt.Errorf("not able to find source snapshot")), + }, + { + name: "fail: ec2.CreateVolume returned Idempotent Parameter Mismatch error", + volumeName: "vol-test-name-error", + diskOptions: &DiskOptions{ + CapacityBytes: util.GiBToBytes(1), + Tags: map[string]string{VolumeNameTagKey: "vol-test", AwsEbsDriverTagKey: "true"}, + AvailabilityZone: expZone, + }, + expCreateVolumeInput: &ec2.CreateVolumeInput{}, + expErr: ErrIdempotentParameterMismatch, + expCreateVolumeErr: awserr.New("IdempotentParameterMismatch", "Another request is in-flight", fmt.Errorf("another request is in-flight")), + }, { name: "fail: ec2.DescribeVolumes error after volume created", volumeName: "vol-test-name-error", diff --git a/pkg/cloud/metadata.go b/pkg/cloud/metadata.go index e2c7ec29ec..995b043a59 100644 --- a/pkg/cloud/metadata.go +++ b/pkg/cloud/metadata.go @@ -34,6 +34,7 @@ import ( "k8s.io/klog" ) +// Metadata is info about the ec2 instance on which the driver is running type Metadata struct { InstanceID string InstanceType string @@ -72,84 +73,58 @@ func (m *Metadata) GetOutpostArn() arn.ARN { return m.OutpostArn } -func NewMetadata() (MetadataService, error) { +type EC2MetadataClient func() (EC2Metadata, error) + +var DefaultEC2MetadataClient = func() (EC2Metadata, error) { sess := session.Must(session.NewSession(&aws.Config{})) svc := ec2metadata.New(sess) - var clientset *kubernetes.Clientset - if !svc.Available() { - // creates the in-cluster config - config, err := rest.InClusterConfig() - if err != nil { - return nil, err - } - // creates the clientset - clientset, err = kubernetes.NewForConfig(config) - if err != nil { - return nil, err - } + return svc, nil +} + +type KubernetesAPIClient func() (kubernetes.Interface, error) + +var DefaultKubernetesAPIClient = func() (kubernetes.Interface, error) { + // creates the in-cluster config + config, err := rest.InClusterConfig() + if err != nil { + return nil, err } - metadataService, err := NewMetadataService(svc, clientset) + // creates the clientset + clientset, err := kubernetes.NewForConfig(config) if err != nil { - return nil, fmt.Errorf("error getting information from metadata service or node object: %w", err) + return nil, err } - return metadataService, err + return clientset, nil } -// NewMetadataService returns a new MetadataServiceImplementation. -func NewMetadataService(svc EC2Metadata, clientset kubernetes.Interface) (MetadataService, error) { +func NewMetadataService(ec2MetadataClient EC2MetadataClient, k8sAPIClient KubernetesAPIClient) (MetadataService, error) { + klog.Infof("retrieving instance data from ec2 metadata") + svc, err := ec2MetadataClient() if !svc.Available() { - klog.Warningf("EC2 instance metadata is not available") - nodeName := os.Getenv("CSI_NODE_NAME") - if nodeName == "" { - return nil, fmt.Errorf("instance metadata is unavailable and CSI_NODE_NAME env var not set") - } - - // get node with k8s API - node, err := clientset.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) - if err != nil { - return nil, err - } - - providerID := node.Spec.ProviderID - if providerID == "" { - return nil, fmt.Errorf("node providerID empty, cannot parse") - } - - awsRegionRegex := "([a-z]{2}(-gov)?)-(central|(north|south)?(east|west)?)-[0-9]" - awsAvailabilityZoneRegex := "([a-z]{2}(-gov)?)-(central|(north|south)?(east|west)?)-[0-9][a-z]" - awsInstanceIDRegex := "i-[a-z0-9]+$" - - re := regexp.MustCompile(awsRegionRegex) - region := re.FindString(providerID) - if region == "" { - return nil, fmt.Errorf("did not find aws region in node providerID string") - } - - re = regexp.MustCompile(awsAvailabilityZoneRegex) - availabilityZone := re.FindString(providerID) - if availabilityZone == "" { - return nil, fmt.Errorf("did not find aws availability zone in node providerID string") - } - - re = regexp.MustCompile(awsInstanceIDRegex) - instanceID := re.FindString(providerID) - if instanceID == "" { - return nil, fmt.Errorf("did not find aws instance ID in node providerID string") - } - - metadata := Metadata{ - InstanceID: instanceID, - InstanceType: "", // we have no way to find this, so we leave it empty - Region: region, - AvailabilityZone: availabilityZone, - } + klog.Warning("ec2 metadata is not available") + } else if err != nil { + klog.Warningf("error creating ec2 metadata client: %v", err) + } else { + klog.Infof("ec2 metadata is available") + return EC2MetadataInstanceInfo(svc) + } - return &metadata, nil + klog.Infof("retrieving instance data from kubernetes api") + clientset, err := k8sAPIClient() + if err != nil { + klog.Warningf("error creating kubernetes api client: %v", err) + } else { + klog.Infof("kubernetes api is available") + return KubernetesAPIInstanceInfo(clientset) } + return nil, fmt.Errorf("error getting instance data from ec2 metadata or kubernetes api") +} + +func EC2MetadataInstanceInfo(svc EC2Metadata) (*Metadata, error) { doc, err := svc.GetInstanceIdentityDocument() if err != nil { - return nil, fmt.Errorf("could not get EC2 instance identity metadata") + return nil, fmt.Errorf("could not get EC2 instance identity metadata: %v", err) } if len(doc.InstanceID) == 0 { @@ -168,6 +143,13 @@ func NewMetadataService(svc EC2Metadata, clientset kubernetes.Interface) (Metada return nil, fmt.Errorf("could not get valid EC2 availability zone") } + instanceInfo := Metadata{ + InstanceID: doc.InstanceID, + InstanceType: doc.InstanceType, + Region: doc.Region, + AvailabilityZone: doc.AvailabilityZone, + } + outpostArn, err := svc.GetMetadata(OutpostArnEndpoint) // "outpust-arn" returns 404 for non-outpost instances. note that the request is made to a link-local address. // it's guaranteed to be in the form `arn::outposts:::outpost/` @@ -176,23 +158,64 @@ func NewMetadataService(svc EC2Metadata, clientset kubernetes.Interface) (Metada return nil, fmt.Errorf("something went wrong while getting EC2 outpost arn: %s", err.Error()) } else if err == nil { klog.Infof("Running in an outpost environment with arn: %s", outpostArn) + outpostArn = strings.ReplaceAll(outpostArn, "outpost/", "") + parsedArn, err := arn.Parse(outpostArn) + if err != nil { + klog.Warningf("Failed to parse the outpost arn: %s", outpostArn) + } else { + klog.Infof("Using outpost arn: %v", parsedArn) + instanceInfo.OutpostArn = parsedArn + } } - metadata := Metadata{ - InstanceID: doc.InstanceID, - InstanceType: doc.InstanceType, - Region: doc.Region, - AvailabilityZone: doc.AvailabilityZone, + return &instanceInfo, nil +} + +func KubernetesAPIInstanceInfo(clientset kubernetes.Interface) (*Metadata, error) { + nodeName := os.Getenv("CSI_NODE_NAME") + if nodeName == "" { + return nil, fmt.Errorf("CSI_NODE_NAME env var not set") } - outpostArn = strings.ReplaceAll(outpostArn, "outpost/", "") - parsedArn, err := arn.Parse(outpostArn) + // get node with k8s API + node, err := clientset.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) if err != nil { - klog.Warningf("Failed to parse the outpost arn: %s", outpostArn) - } else { - klog.Infof("Using outpost arn: %v", parsedArn) - metadata.OutpostArn = parsedArn + return nil, fmt.Errorf("error getting Node %v: %v", nodeName, err) + } + + providerID := node.Spec.ProviderID + if providerID == "" { + return nil, fmt.Errorf("node providerID empty, cannot parse") + } + + awsRegionRegex := "([a-z]{2}(-gov)?)-(central|(north|south)?(east|west)?)-[0-9]" + awsAvailabilityZoneRegex := "([a-z]{2}(-gov)?)-(central|(north|south)?(east|west)?)-[0-9][a-z]" + awsInstanceIDRegex := "i-[a-z0-9]+$" + + re := regexp.MustCompile(awsRegionRegex) + region := re.FindString(providerID) + if region == "" { + return nil, fmt.Errorf("did not find aws region in node providerID string") + } + + re = regexp.MustCompile(awsAvailabilityZoneRegex) + availabilityZone := re.FindString(providerID) + if availabilityZone == "" { + return nil, fmt.Errorf("did not find aws availability zone in node providerID string") + } + + re = regexp.MustCompile(awsInstanceIDRegex) + instanceID := re.FindString(providerID) + if instanceID == "" { + return nil, fmt.Errorf("did not find aws instance ID in node providerID string") + } + + instanceInfo := Metadata{ + InstanceID: instanceID, + InstanceType: "", // we have no way to find this, so we leave it empty + Region: region, + AvailabilityZone: availabilityZone, } - return &metadata, nil + return &instanceInfo, nil } diff --git a/pkg/cloud/metadata_test.go b/pkg/cloud/metadata_test.go index 11afa7b512..07ebd34bae 100644 --- a/pkg/cloud/metadata_test.go +++ b/pkg/cloud/metadata_test.go @@ -29,20 +29,17 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" k8s_testing "k8s.io/client-go/testing" ) -var ( - stdInstanceID = "instance-1" - stdInstanceType = "t2.medium" - stdRegion = "instance-1" - stdAvailabilityZone = "az-1" -) - const ( - nodeName = "ip-123-45-67-890.us-west-2.compute.internal" - nodeObjectInstanceID = "i-abcdefgh123456789" + nodeName = "ip-123-45-67-890.us-west-2.compute.internal" + stdInstanceID = "i-abcdefgh123456789" + stdInstanceType = "t2.medium" + stdRegion = "us-west-2" + stdAvailabilityZone = "us-west-2b" ) func TestNewMetadataService(t *testing.T) { @@ -51,75 +48,66 @@ func TestNewMetadataService(t *testing.T) { validOutpostArn, _ := arn.Parse(strings.ReplaceAll(validRawOutpostArn, "outpost/", "")) testCases := []struct { - name string - isAvailable bool - isPartial bool - identityDocument ec2metadata.EC2InstanceIdentityDocument - rawOutpostArn string - outpostArn arn.ARN - getInstanceDocErr error - getOutpostArnErr error // We should keep this specific to outpost-arn until we need to use more endpoints - getNodeErr error - node v1.Node - nodeNameEnvVar string + name string + ec2metadataAvailable bool + clientsetReactors func(*fake.Clientset) + getInstanceIdentityDocumentValue ec2metadata.EC2InstanceIdentityDocument + getInstanceIdentityDocumentError error + invalidInstanceIdentityDocument bool + getMetadataValue string + getMetadataError error + expectedOutpostArn arn.ARN + expectedErr error + node v1.Node + nodeNameEnvVar string }{ { - name: "success: normal", - isAvailable: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "success: normal", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: stdAvailabilityZone, }, - getInstanceDocErr: nil, }, { - name: "success: outpost-arn is available", - isAvailable: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "success: outpost-arn is available", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: stdAvailabilityZone, }, - rawOutpostArn: validRawOutpostArn, - outpostArn: validOutpostArn, - getInstanceDocErr: nil, + getMetadataValue: validRawOutpostArn, + expectedOutpostArn: validOutpostArn, }, { - name: "success: outpost-arn is invalid", - isAvailable: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "success: outpost-arn is invalid", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: stdAvailabilityZone, }, - getInstanceDocErr: nil, + getMetadataValue: "foo", }, { - name: "success: outpost-arn is not found", - isAvailable: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "success: outpost-arn is not found", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: stdAvailabilityZone, }, - getInstanceDocErr: nil, - getOutpostArnErr: fmt.Errorf("404"), + getMetadataError: fmt.Errorf("404"), }, { - name: "success: metadata not available, used k8s api", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: nil, + name: "success: metadata not available, used k8s api", + ec2metadataAvailable: false, node: v1.Node{ TypeMeta: metav1.TypeMeta{ Kind: "Node", @@ -129,50 +117,34 @@ func TestNewMetadataService(t *testing.T) { Name: nodeName, }, Spec: v1.NodeSpec{ - ProviderID: "aws:///us-west-2b/i-abcdefgh123456789", + ProviderID: "aws:///" + stdAvailabilityZone + "/" + stdInstanceID, }, Status: v1.NodeStatus{}, }, nodeNameEnvVar: nodeName, }, { - name: "failure: metadata not available, k8s client error", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, + name: "failure: metadata not available, k8s client error", + ec2metadataAvailable: false, + clientsetReactors: func(clientset *fake.Clientset) { + clientset.PrependReactor("get", "*", func(action k8s_testing.Action) (handled bool, ret runtime.Object, err error) { + return true, nil, fmt.Errorf("client failure") + }) }, - getInstanceDocErr: nil, - getNodeErr: fmt.Errorf("client failure"), - nodeNameEnvVar: nodeName, + expectedErr: fmt.Errorf("error getting Node %s: client failure", nodeName), + nodeNameEnvVar: nodeName, }, { - name: "failure: metadata not available, node name env var not set", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: nil, - getNodeErr: fmt.Errorf("instance metadata is unavailable and CSI_NODE_NAME env var not set"), - nodeNameEnvVar: "", + name: "failure: metadata not available, node name env var not set", + ec2metadataAvailable: false, + expectedErr: fmt.Errorf("CSI_NODE_NAME env var not set"), + nodeNameEnvVar: "", }, { - name: "failure: metadata not available, no provider ID", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: nil, - getNodeErr: fmt.Errorf("node providerID empty, cannot parse"), + name: "failure: metadata not available, no provider ID", + ec2metadataAvailable: false, + expectedErr: fmt.Errorf("node providerID empty, cannot parse"), node: v1.Node{ TypeMeta: metav1.TypeMeta{ Kind: "Node", @@ -189,16 +161,9 @@ func TestNewMetadataService(t *testing.T) { nodeNameEnvVar: nodeName, }, { - name: "failure: metadata not available, invalid region", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: nil, - getNodeErr: fmt.Errorf("did not find aws region in node providerID string"), + name: "failure: metadata not available, invalid region", + ec2metadataAvailable: false, + expectedErr: fmt.Errorf("did not find aws region in node providerID string"), node: v1.Node{ TypeMeta: metav1.TypeMeta{ Kind: "Node", @@ -215,16 +180,9 @@ func TestNewMetadataService(t *testing.T) { nodeNameEnvVar: nodeName, }, { - name: "failure: metadata not available, invalid az", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: nil, - getNodeErr: fmt.Errorf("did not find aws availability zone in node providerID string"), + name: "failure: metadata not available, invalid az", + ec2metadataAvailable: false, + expectedErr: fmt.Errorf("did not find aws availability zone in node providerID string"), node: v1.Node{ TypeMeta: metav1.TypeMeta{ Kind: "Node", @@ -241,16 +199,9 @@ func TestNewMetadataService(t *testing.T) { nodeNameEnvVar: nodeName, }, { - name: "failure: metadata not available, invalid instance id", - isAvailable: false, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: nil, - getNodeErr: fmt.Errorf("did not find aws instance ID in node providerID string"), + name: "failure: metadata not available, invalid instance id", + ec2metadataAvailable: false, + expectedErr: fmt.Errorf("did not find aws instance ID in node providerID string"), node: v1.Node{ TypeMeta: metav1.TypeMeta{ Kind: "Node", @@ -267,143 +218,123 @@ func TestNewMetadataService(t *testing.T) { nodeNameEnvVar: nodeName, }, { - name: "fail: GetInstanceIdentityDocument returned error", - isAvailable: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ - InstanceID: stdInstanceID, - InstanceType: stdInstanceType, - Region: stdRegion, - AvailabilityZone: stdAvailabilityZone, - }, - getInstanceDocErr: fmt.Errorf(""), + name: "fail: GetInstanceIdentityDocument returned error", + ec2metadataAvailable: true, + getInstanceIdentityDocumentError: fmt.Errorf("foo"), + expectedErr: fmt.Errorf("could not get EC2 instance identity metadata: foo"), }, { - name: "fail: GetInstanceIdentityDocument returned empty instance", - isAvailable: true, - isPartial: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "fail: GetInstanceIdentityDocument returned empty instance", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: "", InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: stdAvailabilityZone, }, - getInstanceDocErr: nil, + invalidInstanceIdentityDocument: true, + expectedErr: fmt.Errorf("could not get valid EC2 instance ID"), }, { - name: "fail: GetInstanceIdentityDocument returned empty region", - isAvailable: true, - isPartial: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "fail: GetInstanceIdentityDocument returned empty region", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: "", AvailabilityZone: stdAvailabilityZone, }, - getInstanceDocErr: nil, + invalidInstanceIdentityDocument: true, + expectedErr: fmt.Errorf("could not get valid EC2 region"), }, { - name: "fail: GetInstanceIdentityDocument returned empty az", - isAvailable: true, - isPartial: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "fail: GetInstanceIdentityDocument returned empty az", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: "", }, - getInstanceDocErr: nil, + invalidInstanceIdentityDocument: true, + expectedErr: fmt.Errorf("could not get valid EC2 availability zone"), }, { - name: "fail: outpost-arn failed", - isAvailable: true, - identityDocument: ec2metadata.EC2InstanceIdentityDocument{ + name: "fail: outpost-arn failed", + ec2metadataAvailable: true, + getInstanceIdentityDocumentValue: ec2metadata.EC2InstanceIdentityDocument{ InstanceID: stdInstanceID, InstanceType: stdInstanceType, Region: stdRegion, AvailabilityZone: stdAvailabilityZone, }, - getInstanceDocErr: nil, - getOutpostArnErr: fmt.Errorf("405"), + getMetadataError: fmt.Errorf("405"), + expectedErr: fmt.Errorf("something went wrong while getting EC2 outpost arn: 405"), }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { clientset := fake.NewSimpleClientset(&tc.node) - if tc.name == "failure: metadata not available, k8s client error" { - clientset.PrependReactor("get", "*", func(action k8s_testing.Action) (handled bool, ret runtime.Object, err error) { - return true, nil, fmt.Errorf("client failure") - }) + clientsetInitialized := false + if tc.clientsetReactors != nil { + tc.clientsetReactors(clientset) } + mockCtrl := gomock.NewController(t) mockEC2Metadata := mocks.NewMockEC2Metadata(mockCtrl) - mockEC2Metadata.EXPECT().Available().Return(tc.isAvailable) - os.Setenv("CSI_NODE_NAME", tc.nodeNameEnvVar) - if tc.isAvailable { - mockEC2Metadata.EXPECT().GetInstanceIdentityDocument().Return(tc.identityDocument, tc.getInstanceDocErr) - } + ec2MetadataClient := func() (EC2Metadata, error) { return mockEC2Metadata, nil } + k8sAPIClient := func() (kubernetes.Interface, error) { clientsetInitialized = true; return clientset, nil } - if tc.isAvailable && tc.getInstanceDocErr == nil && !tc.isPartial { - mockEC2Metadata.EXPECT().GetMetadata(OutpostArnEndpoint).Return(tc.rawOutpostArn, tc.getOutpostArnErr) - } + mockEC2Metadata.EXPECT().Available().Return(tc.ec2metadataAvailable) + if tc.ec2metadataAvailable { + mockEC2Metadata.EXPECT().GetInstanceIdentityDocument().Return(tc.getInstanceIdentityDocumentValue, tc.getInstanceIdentityDocumentError) - m, err := NewMetadataService(mockEC2Metadata, clientset) - if tc.isAvailable && tc.getInstanceDocErr == nil && tc.getOutpostArnErr == nil && !tc.isPartial { - if err != nil { - t.Fatalf("NewMetadataService() failed: expected no error, got %v", err) + // GetMetadata is to get the outpost ARN. It should be skipped if + // GetInstanceIdentityDocument returns an error or (somehow?) partial + // output + if tc.getInstanceIdentityDocumentError == nil && !tc.invalidInstanceIdentityDocument { + if tc.getMetadataValue != "" || tc.getMetadataError != nil { + mockEC2Metadata.EXPECT().GetMetadata(OutpostArnEndpoint).Return(tc.getMetadataValue, tc.getMetadataError) + } else { + mockEC2Metadata.EXPECT().GetMetadata(OutpostArnEndpoint).Return("", fmt.Errorf("404")) + } } - - if m.GetInstanceID() != tc.identityDocument.InstanceID { - t.Fatalf("GetInstanceID() failed: expected %v, got %v", tc.identityDocument.InstanceID, m.GetInstanceID()) + if clientsetInitialized == true { + t.Errorf("kubernetes client was unexpectedly initialized when metadata is available!") + if len(clientset.Actions()) > 0 { + t.Errorf("kubernetes client was unexpectedly called! %v", clientset.Actions()) + } } + } - if m.GetInstanceType() != tc.identityDocument.InstanceType { - t.Fatalf("GetInstanceType() failed: expected %v, got %v", tc.identityDocument.InstanceType, m.GetInstanceType()) - } + os.Setenv("CSI_NODE_NAME", tc.nodeNameEnvVar) - if m.GetRegion() != tc.identityDocument.Region { - t.Fatalf("GetRegion() failed: expected %v, got %v", tc.identityDocument.Region, m.GetRegion()) + m, err := NewMetadataService(ec2MetadataClient, k8sAPIClient) + if err != nil { + if tc.expectedErr == nil { + t.Errorf("got error %q, expected no error", err) + } else if err.Error() != tc.expectedErr.Error() { + t.Errorf("got error %q, expected %q", err, tc.expectedErr) } - - if m.GetAvailabilityZone() != tc.identityDocument.AvailabilityZone { - t.Fatalf("GetAvailabilityZone() failed: expected %v, got %v", tc.identityDocument.AvailabilityZone, m.GetAvailabilityZone()) + } else { + if m == nil { + t.Fatalf("metadataService is unexpectedly nil!") } - - if m.GetOutpostArn() != tc.outpostArn { - t.Fatalf("GetOutpostArn() failed: expected %v, got %v", tc.outpostArn, m.GetOutpostArn()) + if m.GetInstanceID() != stdInstanceID { + t.Errorf("NewMetadataService() failed: got wrong instance ID %v, expected %v", m.GetInstanceID(), stdInstanceID) } - } else if !tc.isAvailable { - if tc.name == "success: metadata not available, used k8s api" { - if err != nil { - t.Fatalf("NewMetadataService() failed: expected no error, got %v", err) - } - if m.GetInstanceID() != nodeObjectInstanceID { - t.Fatalf("NewMetadataService() failed: got wrong instance ID %v, expected %v", m.GetInstanceID(), nodeObjectInstanceID) - } - if m.GetRegion() != "us-west-2" { - t.Fatalf("NewMetadataService() failed: got wrong region %v, expected %v", m.GetRegion(), "us-west-2") - } - if m.GetAvailabilityZone() != "us-west-2b" { - t.Fatalf("NewMetadataService() failed: got wrong AZ %v, expected %v", m.GetRegion(), "us-west-2b") - } - if m.GetOutpostArn() != tc.outpostArn { - t.Fatalf("GetOutpostArn() failed: got %v, expected %v", m.GetOutpostArn(), tc.outpostArn) - } - } else { - if err == nil { - t.Fatalf("NewMetadataService() failed: expected error but got nothing") - } - if err.Error() != tc.getNodeErr.Error() { - t.Fatalf("NewMetadataService() returned an unexpected error. Expected %v, got %v", tc.getNodeErr, err) - } + if m.GetRegion() != stdRegion { + t.Errorf("NewMetadataService() failed: got wrong region %v, expected %v", m.GetRegion(), stdRegion) } - } else { - if err == nil && tc.getOutpostArnErr == nil { - t.Fatal("NewMetadataService() failed: expected error when GetInstanceIdentityDocument returns partial data, got nothing") + if m.GetAvailabilityZone() != stdAvailabilityZone { + t.Errorf("NewMetadataService() failed: got wrong AZ %v, expected %v", m.GetAvailabilityZone(), stdAvailabilityZone) + } + if m.GetOutpostArn() != tc.expectedOutpostArn { + t.Errorf("GetOutpostArn() failed: got %v, expected %v", m.GetOutpostArn(), tc.expectedOutpostArn) } } - mockCtrl.Finish() }) } diff --git a/pkg/driver/constants.go b/pkg/driver/constants.go index 503ec2bee4..43028b57eb 100644 --- a/pkg/driver/constants.go +++ b/pkg/driver/constants.go @@ -86,6 +86,11 @@ const ( // in-tree volume plugin. Used only when --cluster-id is set. NameTag = "Name" + // KubernetesClusterTag is tag applied to provisioned EBS volume for backward compatibility with + // in-tree volume plugin. Used only when --cluster-id is set. + // See https://github.com/kubernetes/cloud-provider-aws/blob/release-1.20/pkg/providers/v1/tags.go#L38-L41. + KubernetesClusterTag = "KubernetesCluster" + // PVCNameTag is tag applied to provisioned EBS volume for backward compatibility // with in-tree volume plugin. Value of the tag is PVC name. It is applied only when // the external provisioner sidecar is started with --extra-create-metadata=true and diff --git a/pkg/driver/controller.go b/pkg/driver/controller.go index 03a550deff..fa718c8570 100644 --- a/pkg/driver/controller.go +++ b/pkg/driver/controller.go @@ -66,7 +66,7 @@ type controllerService struct { var ( // NewMetadataFunc is a variable for the cloud.NewMetadata function that can // be overwritten in unit tests. - NewMetadataFunc = cloud.NewMetadata + NewMetadataFunc = cloud.NewMetadataService // NewCloudFunc is a variable for the cloud.NewCloud function that can // be overwritten in unit tests. NewCloudFunc = cloud.NewCloud @@ -78,7 +78,7 @@ func newControllerService(driverOptions *DriverOptions) controllerService { region := os.Getenv("AWS_REGION") if region == "" { klog.V(5).Infof("[Debug] Retrieving region from metadata service") - metadata, err := NewMetadataFunc() + metadata, err := NewMetadataFunc(cloud.DefaultEC2MetadataClient, cloud.DefaultKubernetesAPIClient) if err != nil { panic(err) } @@ -99,40 +99,21 @@ func newControllerService(driverOptions *DriverOptions) controllerService { func (d *controllerService) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { klog.V(4).Infof("CreateVolume: called with args %+v", *req) - volName := req.GetName() - if len(volName) == 0 { - return nil, status.Error(codes.InvalidArgument, "Volume name not provided") + if err := validateCreateVolumeRequest(req); err != nil { + return nil, err } - volSizeBytes, err := getVolSizeBytes(req) if err != nil { return nil, err } + volName := req.GetName() - volCaps := req.GetVolumeCapabilities() - if len(volCaps) == 0 { - return nil, status.Error(codes.InvalidArgument, "Volume capabilities not provided") - } - - if !isValidVolumeCapabilities(volCaps) { - modes := util.GetAccessModes(volCaps) - stringModes := strings.Join(*modes, ", ") - errString := "Volume capabilities " + stringModes + " not supported. Only AccessModes[ReadWriteOnce] supported." - return nil, status.Error(codes.InvalidArgument, errString) - } - - disk, err := d.cloud.GetDiskByName(ctx, volName, volSizeBytes) - if err != nil { - switch err { - case cloud.ErrNotFound: - case cloud.ErrMultiDisks: - return nil, status.Error(codes.Internal, err.Error()) - case cloud.ErrDiskExistsDiffSize: - return nil, status.Error(codes.AlreadyExists, err.Error()) - default: - return nil, status.Error(codes.Internal, err.Error()) - } + // check if a request is already in-flight + if ok := d.inFlight.Insert(volName); !ok { + msg := fmt.Sprintf("Create volume request for %s is already in progress", volName) + return nil, status.Error(codes.Aborted, msg) } + defer d.inFlight.Delete(volName) var ( volumeType string @@ -209,21 +190,6 @@ func (d *controllerService) CreateVolume(ctx context.Context, req *csi.CreateVol snapshotID = sourceSnapshot.GetSnapshotId() } - // volume exists already - if disk != nil { - if disk.SnapshotID != snapshotID { - return nil, status.Errorf(codes.AlreadyExists, "Volume already exists, but was restored from a different snapshot than %s", snapshotID) - } - return newCreateVolumeResponse(disk), nil - } - - // check if a request is already in-flight because the CreateVolume API is not idempotent - if ok := d.inFlight.Insert(req.String()); !ok { - msg := fmt.Sprintf("Create volume request for %s is already in progress", volName) - return nil, status.Error(codes.Aborted, msg) - } - defer d.inFlight.Delete(req.String()) - // create a new volume zone := pickAvailabilityZone(req.GetAccessibilityRequirements()) outpostArn := getOutpostArn(req.GetAccessibilityRequirements()) @@ -233,6 +199,7 @@ func (d *controllerService) CreateVolume(ctx context.Context, req *csi.CreateVol resourceLifecycleTag := ResourceLifecycleTagPrefix + d.driverOptions.kubernetesClusterID volumeTags[resourceLifecycleTag] = ResourceLifecycleOwned volumeTags[NameTag] = d.driverOptions.kubernetesClusterID + "-dynamic-" + volName + volumeTags[KubernetesClusterTag] = d.driverOptions.kubernetesClusterID } for k, v := range d.driverOptions.extraTags { volumeTags[k] = v @@ -253,23 +220,54 @@ func (d *controllerService) CreateVolume(ctx context.Context, req *csi.CreateVol SnapshotID: snapshotID, } - disk, err = d.cloud.CreateDisk(ctx, volName, opts) + disk, err := d.cloud.CreateDisk(ctx, volName, opts) if err != nil { errCode := codes.Internal if err == cloud.ErrNotFound { errCode = codes.NotFound } + if err == cloud.ErrIdempotentParameterMismatch { + errCode = codes.AlreadyExists + } return nil, status.Errorf(errCode, "Could not create volume %q: %v", volName, err) } return newCreateVolumeResponse(disk), nil } +func validateCreateVolumeRequest(req *csi.CreateVolumeRequest) error { + volName := req.GetName() + if len(volName) == 0 { + return status.Error(codes.InvalidArgument, "Volume name not provided") + } + + volCaps := req.GetVolumeCapabilities() + if len(volCaps) == 0 { + return status.Error(codes.InvalidArgument, "Volume capabilities not provided") + } + + if !isValidVolumeCapabilities(volCaps) { + modes := util.GetAccessModes(volCaps) + stringModes := strings.Join(*modes, ", ") + errString := "Volume capabilities " + stringModes + " not supported. Only AccessModes[ReadWriteOnce] supported." + return status.Error(codes.InvalidArgument, errString) + } + return nil +} + func (d *controllerService) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { klog.V(4).Infof("DeleteVolume: called with args: %+v", *req) + if err := validateDeleteVolumeRequest(req); err != nil { + return nil, err + } + volumeID := req.GetVolumeId() - if len(volumeID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Volume ID not provided") + + // check if a request is already in-flight + if ok := d.inFlight.Insert(volumeID); !ok { + msg := fmt.Sprintf(internal.VolumeOperationAlreadyExistsErrorMsg, volumeID) + return nil, status.Error(codes.Aborted, msg) } + defer d.inFlight.Delete(volumeID) if _, err := d.cloud.DeleteDisk(ctx, volumeID); err != nil { if err == cloud.ErrNotFound { @@ -282,30 +280,21 @@ func (d *controllerService) DeleteVolume(ctx context.Context, req *csi.DeleteVol return &csi.DeleteVolumeResponse{}, nil } +func validateDeleteVolumeRequest(req *csi.DeleteVolumeRequest) error { + if len(req.GetVolumeId()) == 0 { + return status.Error(codes.InvalidArgument, "Volume ID not provided") + } + return nil +} + func (d *controllerService) ControllerPublishVolume(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (*csi.ControllerPublishVolumeResponse, error) { klog.V(4).Infof("ControllerPublishVolume: called with args %+v", *req) - volumeID := req.GetVolumeId() - if len(volumeID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Volume ID not provided") + if err := validateControllerPublishVolumeRequest(req); err != nil { + return nil, err } + volumeID := req.GetVolumeId() nodeID := req.GetNodeId() - if len(nodeID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Node ID not provided") - } - - volCap := req.GetVolumeCapability() - if volCap == nil { - return nil, status.Error(codes.InvalidArgument, "Volume capability not provided") - } - - caps := []*csi.VolumeCapability{volCap} - if !isValidVolumeCapabilities(caps) { - modes := util.GetAccessModes(caps) - stringModes := strings.Join(*modes, ", ") - errString := "Volume capabilities " + stringModes + " not supported. Only AccessModes[ReadWriteOnce] supported." - return nil, status.Error(codes.InvalidArgument, errString) - } if !d.cloud.IsExistInstance(ctx, nodeID) { return nil, status.Errorf(codes.NotFound, "Instance %q not found", nodeID) @@ -333,17 +322,38 @@ func (d *controllerService) ControllerPublishVolume(ctx context.Context, req *cs return &csi.ControllerPublishVolumeResponse{PublishContext: pvInfo}, nil } +func validateControllerPublishVolumeRequest(req *csi.ControllerPublishVolumeRequest) error { + if len(req.GetVolumeId()) == 0 { + return status.Error(codes.InvalidArgument, "Volume ID not provided") + } + + if len(req.GetNodeId()) == 0 { + return status.Error(codes.InvalidArgument, "Node ID not provided") + } + + volCap := req.GetVolumeCapability() + if volCap == nil { + return status.Error(codes.InvalidArgument, "Volume capability not provided") + } + + caps := []*csi.VolumeCapability{volCap} + if !isValidVolumeCapabilities(caps) { + modes := util.GetAccessModes(caps) + stringModes := strings.Join(*modes, ", ") + errString := "Volume capabilities " + stringModes + " not supported. Only AccessModes[ReadWriteOnce] supported." + return status.Error(codes.InvalidArgument, errString) + } + return nil +} + func (d *controllerService) ControllerUnpublishVolume(ctx context.Context, req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) { klog.V(4).Infof("ControllerUnpublishVolume: called with args %+v", *req) - volumeID := req.GetVolumeId() - if len(volumeID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Volume ID not provided") + if err := validateControllerUnpublishVolumeRequest(req); err != nil { + return nil, err } + volumeID := req.GetVolumeId() nodeID := req.GetNodeId() - if len(nodeID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Node ID not provided") - } if err := d.cloud.DetachDisk(ctx, volumeID, nodeID); err != nil { if err == cloud.ErrNotFound { @@ -356,6 +366,18 @@ func (d *controllerService) ControllerUnpublishVolume(ctx context.Context, req * return &csi.ControllerUnpublishVolumeResponse{}, nil } +func validateControllerUnpublishVolumeRequest(req *csi.ControllerUnpublishVolumeRequest) error { + if len(req.GetVolumeId()) == 0 { + return status.Error(codes.InvalidArgument, "Volume ID not provided") + } + + if len(req.GetNodeId()) == 0 { + return status.Error(codes.InvalidArgument, "Node ID not provided") + } + + return nil +} + func (d *controllerService) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error) { klog.V(4).Infof("ControllerGetCapabilities: called with args %+v", *req) var caps []*csi.ControllerServiceCapability @@ -489,15 +511,20 @@ func isValidVolumeContext(volContext map[string]string) bool { func (d *controllerService) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) { klog.V(4).Infof("CreateSnapshot: called with args %+v", req) - snapshotName := req.GetName() - if len(snapshotName) == 0 { - return nil, status.Error(codes.InvalidArgument, "Snapshot name not provided") + if err := validateCreateSnapshotRequest(req); err != nil { + return nil, err } + snapshotName := req.GetName() volumeID := req.GetSourceVolumeId() - if len(volumeID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Snapshot volume source ID not provided") + + // check if a request is already in-flight + if ok := d.inFlight.Insert(snapshotName); !ok { + msg := fmt.Sprintf(internal.VolumeOperationAlreadyExistsErrorMsg, snapshotName) + return nil, status.Error(codes.Aborted, msg) } + defer d.inFlight.Delete(snapshotName) + snapshot, err := d.cloud.GetSnapshotByName(ctx, snapshotName) if err != nil && err != cloud.ErrNotFound { klog.Errorf("Error looking for the snapshot %s: %v", snapshotName, err) @@ -535,12 +562,31 @@ func (d *controllerService) CreateSnapshot(ctx context.Context, req *csi.CreateS return newCreateSnapshotResponse(snapshot) } +func validateCreateSnapshotRequest(req *csi.CreateSnapshotRequest) error { + if len(req.GetName()) == 0 { + return status.Error(codes.InvalidArgument, "Snapshot name not provided") + } + + if len(req.GetSourceVolumeId()) == 0 { + return status.Error(codes.InvalidArgument, "Snapshot volume source ID not provided") + } + return nil +} + func (d *controllerService) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequest) (*csi.DeleteSnapshotResponse, error) { klog.V(4).Infof("DeleteSnapshot: called with args %+v", req) + if err := validateDeleteSnapshotRequest(req); err != nil { + return nil, err + } + snapshotID := req.GetSnapshotId() - if len(snapshotID) == 0 { - return nil, status.Error(codes.InvalidArgument, "Snapshot ID not provided") + + // check if a request is already in-flight + if ok := d.inFlight.Insert(snapshotID); !ok { + msg := fmt.Sprintf("DeleteSnapshot for Snapshot %s is already in progress", snapshotID) + return nil, status.Error(codes.Aborted, msg) } + defer d.inFlight.Delete(snapshotID) if _, err := d.cloud.DeleteSnapshot(ctx, snapshotID); err != nil { if err == cloud.ErrNotFound { @@ -553,6 +599,13 @@ func (d *controllerService) DeleteSnapshot(ctx context.Context, req *csi.DeleteS return &csi.DeleteSnapshotResponse{}, nil } +func validateDeleteSnapshotRequest(req *csi.DeleteSnapshotRequest) error { + if len(req.GetSnapshotId()) == 0 { + return status.Error(codes.InvalidArgument, "Snapshot ID not provided") + } + return nil +} + func (d *controllerService) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsRequest) (*csi.ListSnapshotsResponse, error) { klog.V(4).Infof("ListSnapshots: called with args %+v", req) var snapshots []*cloud.Snapshot diff --git a/pkg/driver/controller_test.go b/pkg/driver/controller_test.go index 84d78db1b0..304ac34be2 100644 --- a/pkg/driver/controller_test.go +++ b/pkg/driver/controller_test.go @@ -109,7 +109,7 @@ func TestNewControllerService(t *testing.T) { oldNewMetadataFunc := NewMetadataFunc defer func() { NewMetadataFunc = oldNewMetadataFunc }() - NewMetadataFunc = func() (cloud.MetadataService, error) { + NewMetadataFunc = func(cloud.EC2MetadataClient, cloud.KubernetesAPIClient) (cloud.MetadataService, error) { if tc.newMetadataFuncErrors { return nil, testErr } @@ -194,7 +194,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -265,7 +264,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -333,7 +331,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -390,7 +387,7 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(mockDisk, nil) + mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ cloud: mockCloud, @@ -435,18 +432,11 @@ func TestCreateVolume(t *testing.T) { ctx := context.Background() - mockDisk := &cloud.Disk{ - VolumeID: req.Name, - AvailabilityZone: expZone, - CapacityGiB: util.BytesToGiB(stdVolSize), - SnapshotID: "another-snapshot-id", - } - mockCtl := gomock.NewController(t) defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(mockDisk, nil) + mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(nil, cloud.ErrIdempotentParameterMismatch) awsDriver := controllerService{ cloud: mockCloud, @@ -454,9 +444,8 @@ func TestCreateVolume(t *testing.T) { driverOptions: &DriverOptions{}, } - if _, err := awsDriver.CreateVolume(ctx, req); err == nil { - t.Error("CreateVolume with invalid SnapshotID unexpectedly succeeded") - } + _, err := awsDriver.CreateVolume(ctx, req) + checkExpectedErrorCode(t, err, codes.AlreadyExists) }, }, { @@ -528,7 +517,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -546,7 +534,7 @@ func TestCreateVolume(t *testing.T) { } // Subsequent call returns the created disk - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(mockDisk, nil) + mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) resp, err := awsDriver.CreateVolume(ctx, extraReq) if err != nil { srvErr, ok := status.FromError(err) @@ -615,7 +603,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(volSizeBytes)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -633,13 +620,8 @@ func TestCreateVolume(t *testing.T) { t.Fatalf("Unexpected error: %v", srvErr.Code()) } - extraVolSizeBytes, err := getVolSizeBytes(extraReq) - if err != nil { - t.Fatalf("Unable to get volume size bytes for req: %s", err) - } - // Subsequent failure - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(extraReq.Name), gomock.Eq(extraVolSizeBytes)).Return(nil, cloud.ErrDiskExistsDiffSize) + mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(extraReq.Name), gomock.Any()).Return(nil, cloud.ErrIdempotentParameterMismatch) if _, err := awsDriver.CreateVolume(ctx, extraReq); err != nil { srvErr, ok := status.FromError(err) if !ok { @@ -679,7 +661,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(cloud.DefaultVolumeSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -741,7 +722,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(expVol.CapacityBytes)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -798,7 +778,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(volSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -841,7 +820,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -884,7 +862,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -926,7 +903,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -968,7 +944,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1010,7 +985,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1053,7 +1027,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1091,7 +1064,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) awsDriver := controllerService{ cloud: mockCloud, @@ -1132,7 +1104,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) awsDriver := controllerService{ cloud: mockCloud, @@ -1173,7 +1144,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) awsDriver := controllerService{ cloud: mockCloud, @@ -1247,7 +1217,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1264,7 +1233,7 @@ func TestCreateVolume(t *testing.T) { t.Fatalf("Unexpected error: %v", srvErr.Code()) } - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(mockDisk, nil) + mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(mockDisk, nil) resp, err := awsDriver.CreateVolume(ctx, extraReq) if err != nil { srvErr, ok := status.FromError(err) @@ -1329,7 +1298,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(diskOptions)).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1356,12 +1324,14 @@ func TestCreateVolume(t *testing.T) { name: "success with cluster-id", testFunc: func(t *testing.T) { const ( - volumeName = "random-vol-name" - clusterID = "test-cluster-id" - expectedOwnerTag = "kubernetes.io/cluster/test-cluster-id" - expectedOwnerTagValue = "owned" - expectedNameTag = "Name" - expectedNameTagValue = "test-cluster-id-dynamic-random-vol-name" + volumeName = "random-vol-name" + clusterID = "test-cluster-id" + expectedOwnerTag = "kubernetes.io/cluster/test-cluster-id" + expectedOwnerTagValue = "owned" + expectedNameTag = "Name" + expectedNameTagValue = "test-cluster-id-dynamic-random-vol-name" + expectedKubernetesClusterTag = "KubernetesCluster" + expectedKubernetesClusterTagValue = "test-cluster-id" ) req := &csi.CreateVolumeRequest{ Name: volumeName, @@ -1381,10 +1351,11 @@ func TestCreateVolume(t *testing.T) { diskOptions := &cloud.DiskOptions{ CapacityBytes: stdVolSize, Tags: map[string]string{ - cloud.VolumeNameTagKey: volumeName, - cloud.AwsEbsDriverTagKey: "true", - expectedOwnerTag: expectedOwnerTagValue, - expectedNameTag: expectedNameTagValue, + cloud.VolumeNameTagKey: volumeName, + cloud.AwsEbsDriverTagKey: "true", + expectedOwnerTag: expectedOwnerTagValue, + expectedNameTag: expectedNameTagValue, + expectedKubernetesClusterTag: expectedKubernetesClusterTagValue, }, } @@ -1392,7 +1363,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(diskOptions)).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1418,7 +1388,6 @@ func TestCreateVolume(t *testing.T) { testFunc: func(t *testing.T) { const ( volumeName = "random-vol-name" - clusterID = "test-cluster-id" expectedPVCNameTag = "kubernetes.io/created-for/pvc/name" expectedPVCNamespaceTag = "kubernetes.io/created-for/pvc/namespace" expectedPVNameTag = "kubernetes.io/created-for/pv/name" @@ -1460,7 +1429,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(diskOptions)).Return(mockDisk, nil) awsDriver := controllerService{ @@ -1536,11 +1504,10 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) inFlight := internal.NewInFlight() - inFlight.Insert(req.String()) - defer inFlight.Delete(req.String()) + inFlight.Insert(req.GetName()) + defer inFlight.Delete(req.GetName()) awsDriver := controllerService{ cloud: mockCloud, @@ -1549,17 +1516,8 @@ func TestCreateVolume(t *testing.T) { } _, err := awsDriver.CreateVolume(ctx, req) - if err == nil { - t.Fatalf("Expected CreateVolume to fail but got no error") - } - srvErr, ok := status.FromError(err) - if !ok { - t.Fatalf("Could not get error status code from error: %v", srvErr) - } - if srvErr.Code() != codes.Aborted { - t.Fatalf("Expected Aborted but got: %s", srvErr.Code()) - } + checkExpectedErrorCode(t, err, codes.Aborted) }, }, { @@ -1580,7 +1538,6 @@ func TestCreateVolume(t *testing.T) { defer mockCtl.Finish() mockCloud := mocks.NewMockCloud(mockCtl) - mockCloud.EXPECT().GetDiskByName(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Eq(stdVolSize)).Return(nil, cloud.ErrNotFound) awsDriver := controllerService{ cloud: mockCloud, @@ -1602,6 +1559,33 @@ func TestCreateVolume(t *testing.T) { } }, }, + { + name: "Fail with IdempotentParameterMismatch error", + testFunc: func(t *testing.T) { + req := &csi.CreateVolumeRequest{ + Name: "vol-test", + CapacityRange: stdCapRange, + VolumeCapabilities: stdVolCap, + } + + ctx := context.Background() + + mockCtl := gomock.NewController(t) + defer mockCtl.Finish() + + mockCloud := mocks.NewMockCloud(mockCtl) + mockCloud.EXPECT().CreateDisk(gomock.Eq(ctx), gomock.Eq(req.Name), gomock.Any()).Return(nil, cloud.ErrIdempotentParameterMismatch) + + awsDriver := controllerService{ + cloud: mockCloud, + inFlight: internal.NewInFlight(), + driverOptions: &DriverOptions{}, + } + + _, err := awsDriver.CreateVolume(ctx, req) + checkExpectedErrorCode(t, err, codes.AlreadyExists) + }, + }, } for _, tc := range testCases { @@ -1714,6 +1698,31 @@ func TestDeleteVolume(t *testing.T) { } }, }, + { + name: "fail another request already in-flight", + testFunc: func(t *testing.T) { + req := &csi.DeleteVolumeRequest{ + VolumeId: "vol-test", + } + + ctx := context.Background() + mockCtl := gomock.NewController(t) + defer mockCtl.Finish() + + mockCloud := mocks.NewMockCloud(mockCtl) + inFlight := internal.NewInFlight() + inFlight.Insert(req.GetVolumeId()) + defer inFlight.Delete(req.GetVolumeId()) + awsDriver := controllerService{ + cloud: mockCloud, + inFlight: inFlight, + driverOptions: &DriverOptions{}, + } + _, err := awsDriver.DeleteVolume(ctx, req) + + checkExpectedErrorCode(t, err, codes.Aborted) + }, + }, } for _, tc := range testCases { @@ -2259,6 +2268,34 @@ func TestCreateSnapshot(t *testing.T) { } }, }, + { + name: "fail with another request in-flight", + testFunc: func(t *testing.T) { + req := &csi.CreateSnapshotRequest{ + Name: "test-snapshot", + Parameters: nil, + SourceVolumeId: "vol-test", + } + + mockCtl := gomock.NewController(t) + defer mockCtl.Finish() + + mockCloud := mocks.NewMockCloud(mockCtl) + + inFlight := internal.NewInFlight() + inFlight.Insert(req.GetName()) + defer inFlight.Delete(req.GetName()) + + awsDriver := controllerService{ + cloud: mockCloud, + inFlight: inFlight, + driverOptions: &DriverOptions{}, + } + _, err := awsDriver.CreateSnapshot(context.Background(), req) + + checkExpectedErrorCode(t, err, codes.Aborted) + }, + }, } for _, tc := range testCases { @@ -2321,6 +2358,34 @@ func TestDeleteSnapshot(t *testing.T) { } }, }, + { + name: "fail with another request in-flight", + testFunc: func(t *testing.T) { + ctx := context.Background() + + mockCtl := gomock.NewController(t) + defer mockCtl.Finish() + + mockCloud := mocks.NewMockCloud(mockCtl) + + req := &csi.DeleteSnapshotRequest{ + SnapshotId: "test-snapshotID", + } + inFlight := internal.NewInFlight() + inFlight.Insert(req.GetSnapshotId()) + defer inFlight.Delete(req.GetSnapshotId()) + + awsDriver := controllerService{ + cloud: mockCloud, + inFlight: inFlight, + driverOptions: &DriverOptions{}, + } + + _, err := awsDriver.DeleteSnapshot(ctx, req) + + checkExpectedErrorCode(t, err, codes.Aborted) + }, + }, } for _, tc := range testCases { @@ -3082,3 +3147,17 @@ func TestControllerExpandVolume(t *testing.T) { }) } } + +func checkExpectedErrorCode(t *testing.T, err error, expectedCode codes.Code) { + if err == nil { + t.Fatalf("Expected operation to fail but got no error") + } + + srvErr, ok := status.FromError(err) + if !ok { + t.Fatalf("Could not get error status code from error: %v", srvErr) + } + if srvErr.Code() != expectedCode { + t.Fatalf("Expected Aborted but got: %s", srvErr.Code()) + } +} diff --git a/pkg/driver/internal/inflight.go b/pkg/driver/internal/inflight.go index 5f0d2a9ad7..9b45680fbc 100644 --- a/pkg/driver/internal/inflight.go +++ b/pkg/driver/internal/inflight.go @@ -30,6 +30,10 @@ type Idempotent interface { String() string } +const ( + VolumeOperationAlreadyExistsErrorMsg = "An operation with the given Volume %s already exists" +) + // InFlight is a struct used to manage in flight requests per volumeId. type InFlight struct { mux *sync.Mutex diff --git a/pkg/driver/mount.go b/pkg/driver/mount.go index f1ce7b48c8..0e3e938a0b 100644 --- a/pkg/driver/mount.go +++ b/pkg/driver/mount.go @@ -17,199 +17,40 @@ limitations under the License. package driver import ( - "fmt" - "k8s.io/klog" - "os" - "strconv" - "strings" - "github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter" mountutils "k8s.io/mount-utils" - utilexec "k8s.io/utils/exec" ) +type mountInterface = mountutils.Interface + +// Mounter is the interface implemented by NodeMounter. +// A mix & match of functions defined in upstream libraries. (FormatAndMount +// from struct SafeFormatAndMount, PathExists from an old edition of +// mount.Interface). Define it explicitly so that it can be mocked and to +// insulate from oft-changing upstream interfaces/structs type Mounter interface { - // Implemented by NodeMounter.SafeFormatAndMount - mountutils.Interface - FormatAndMount(source string, target string, fstype string, options []string) error + mountInterface - // Implemented by NodeMounter.SafeFormatAndMount.Exec - // TODO this won't make sense on Windows with csi-proxy - utilexec.Interface + FormatAndMount(source string, target string, fstype string, options []string) error - // Implemented by NodeMounter below GetDeviceNameFromMount(mountPath string) (string, int, error) - // TODO this won't make sense on Windows with csi-proxy MakeFile(path string) error MakeDir(path string) error PathExists(path string) (bool, error) NeedResize(devicePath string, deviceMountPath string) (bool, error) } +// NodeMounter implements Mounter. +// A superstruct of SafeFormatAndMount. type NodeMounter struct { - mountutils.SafeFormatAndMount - utilexec.Interface + *mountutils.SafeFormatAndMount } func newNodeMounter() (Mounter, error) { + // mounter.NewSafeMounter returns a SafeFormatAndMount safeMounter, err := mounter.NewSafeMounter() if err != nil { return nil, err } - return &NodeMounter{*safeMounter, safeMounter.Exec}, nil -} - -// GetDeviceNameFromMount returns the volume ID for a mount path. -func (m NodeMounter) GetDeviceNameFromMount(mountPath string) (string, int, error) { - return mountutils.GetDeviceNameFromMount(m, mountPath) -} - -// This function is mirrored in ./sanity_test.go to make sure sanity test covered this block of code -// Please mirror the change to func MakeFile in ./sanity_test.go -func (m *NodeMounter) MakeFile(path string) error { - f, err := os.OpenFile(path, os.O_CREATE, os.FileMode(0644)) - if err != nil { - if !os.IsExist(err) { - return err - } - } - if err = f.Close(); err != nil { - return err - } - return nil -} - -// This function is mirrored in ./sanity_test.go to make sure sanity test covered this block of code -// Please mirror the change to func MakeFile in ./sanity_test.go -func (m *NodeMounter) MakeDir(path string) error { - err := os.MkdirAll(path, os.FileMode(0755)) - if err != nil { - if !os.IsExist(err) { - return err - } - } - return nil -} - -// This function is mirrored in ./sanity_test.go to make sure sanity test covered this block of code -// Please mirror the change to func MakeFile in ./sanity_test.go -func (m *NodeMounter) PathExists(path string) (bool, error) { - return mountutils.PathExists(path) -} - -//TODO: use common util from vendor kubernetes/mount-util -func (m *NodeMounter) NeedResize(devicePath string, deviceMountPath string) (bool, error) { - // TODO(xiangLi) resize fs size on formatted file system following this PR https://github.com/kubernetes/kubernetes/pull/99223 - // Port the in-tree un-released change first, need to remove after in-tree release - deviceSize, err := m.getDeviceSize(devicePath) - if err != nil { - return false, err - } - var fsSize, blockSize uint64 - format, err := m.SafeFormatAndMount.GetDiskFormat(devicePath) - if err != nil { - formatErr := fmt.Errorf("ResizeFS.Resize - error checking format for device %s: %v", devicePath, err) - return false, formatErr - } - - // If disk has no format, there is no need to resize the disk because mkfs.* - // by default will use whole disk anyways. - if format == "" { - return false, nil - } - - klog.V(3).Infof("ResizeFs.needResize - checking mounted volume %s", devicePath) - switch format { - case "ext3", "ext4": - blockSize, fsSize, err = m.getExtSize(devicePath) - klog.V(5).Infof("Ext size: filesystem size=%d, block size=%d", fsSize, blockSize) - case "xfs": - blockSize, fsSize, err = m.getXFSSize(deviceMountPath) - klog.V(5).Infof("Xfs size: filesystem size=%d, block size=%d, err=%v", fsSize, blockSize, err) - default: - klog.Errorf("Not able to parse given filesystem info. fsType: %s, will not resize", format) - return false, fmt.Errorf("Could not parse fs info on given filesystem format: %s. Supported fs types are: xfs, ext3, ext4", format) - } - if err != nil { - return false, err - } - // Tolerate one block difference, just in case of rounding errors somewhere. - klog.V(5).Infof("Volume %s: device size=%d, filesystem size=%d, block size=%d", devicePath, deviceSize, fsSize, blockSize) - if deviceSize <= fsSize+blockSize { - return false, nil - } - return true, nil -} -func (m *NodeMounter) getDeviceSize(devicePath string) (uint64, error) { - output, err := m.SafeFormatAndMount.Exec.Command("blockdev", "--getsize64", devicePath).CombinedOutput() - outStr := strings.TrimSpace(string(output)) - if err != nil { - return 0, fmt.Errorf("failed to read size of device %s: %s: %s", devicePath, err, outStr) - } - size, err := strconv.ParseUint(outStr, 10, 64) - if err != nil { - return 0, fmt.Errorf("failed to parse size of device %s %s: %s", devicePath, outStr, err) - } - return size, nil -} - -func (m *NodeMounter) getExtSize(devicePath string) (uint64, uint64, error) { - output, err := m.SafeFormatAndMount.Exec.Command("dumpe2fs", "-h", devicePath).CombinedOutput() - if err != nil { - return 0, 0, fmt.Errorf("failed to read size of filesystem on %s: %s: %s", devicePath, err, string(output)) - } - - blockSize, blockCount, _ := m.parseFsInfoOutput(string(output), ":", "block size", "block count") - - if blockSize == 0 { - return 0, 0, fmt.Errorf("could not find block size of device %s", devicePath) - } - if blockCount == 0 { - return 0, 0, fmt.Errorf("could not find block count of device %s", devicePath) - } - return blockSize, blockSize * blockCount, nil -} - -func (m *NodeMounter) getXFSSize(devicePath string) (uint64, uint64, error) { - output, err := m.SafeFormatAndMount.Exec.Command("xfs_io", "-c", "statfs", devicePath).CombinedOutput() - if err != nil { - return 0, 0, fmt.Errorf("failed to read size of filesystem on %s: %s: %s", devicePath, err, string(output)) - } - - blockSize, blockCount, _ := m.parseFsInfoOutput(string(output), "=", "geom.bsize", "geom.datablocks") - - if blockSize == 0 { - return 0, 0, fmt.Errorf("could not find block size of device %s", devicePath) - } - if blockCount == 0 { - return 0, 0, fmt.Errorf("could not find block count of device %s", devicePath) - } - return blockSize, blockSize * blockCount, nil -} - -func (m *NodeMounter) parseFsInfoOutput(cmdOutput string, spliter string, blockSizeKey string, blockCountKey string) (uint64, uint64, error) { - lines := strings.Split(cmdOutput, "\n") - var blockSize, blockCount uint64 - var err error - - for _, line := range lines { - tokens := strings.Split(line, spliter) - if len(tokens) != 2 { - continue - } - key, value := strings.ToLower(strings.TrimSpace(tokens[0])), strings.ToLower(strings.TrimSpace(tokens[1])) - if key == blockSizeKey { - blockSize, err = strconv.ParseUint(value, 10, 64) - if err != nil { - return 0, 0, fmt.Errorf("failed to parse block size %s: %s", value, err) - } - } - if key == blockCountKey { - blockCount, err = strconv.ParseUint(value, 10, 64) - if err != nil { - return 0, 0, fmt.Errorf("failed to parse block count %s: %s", value, err) - } - } - } - return blockSize, blockCount, err + return &NodeMounter{safeMounter}, nil } diff --git a/pkg/driver/mount_linux.go b/pkg/driver/mount_linux.go new file mode 100644 index 0000000000..ea4427c549 --- /dev/null +++ b/pkg/driver/mount_linux.go @@ -0,0 +1,184 @@ +// +build linux + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver + +import ( + "fmt" + "k8s.io/klog" + "os" + "strconv" + "strings" + + mountutils "k8s.io/mount-utils" +) + +// GetDeviceNameFromMount returns the volume ID for a mount path. +func (m NodeMounter) GetDeviceNameFromMount(mountPath string) (string, int, error) { + return mountutils.GetDeviceNameFromMount(m, mountPath) +} + +// This function is mirrored in ./sanity_test.go to make sure sanity test covered this block of code +// Please mirror the change to func MakeFile in ./sanity_test.go +func (m *NodeMounter) MakeFile(path string) error { + f, err := os.OpenFile(path, os.O_CREATE, os.FileMode(0644)) + if err != nil { + if !os.IsExist(err) { + return err + } + } + if err = f.Close(); err != nil { + return err + } + return nil +} + +// This function is mirrored in ./sanity_test.go to make sure sanity test covered this block of code +// Please mirror the change to func MakeFile in ./sanity_test.go +func (m *NodeMounter) MakeDir(path string) error { + err := os.MkdirAll(path, os.FileMode(0755)) + if err != nil { + if !os.IsExist(err) { + return err + } + } + return nil +} + +// This function is mirrored in ./sanity_test.go to make sure sanity test covered this block of code +// Please mirror the change to func MakeFile in ./sanity_test.go +func (m *NodeMounter) PathExists(path string) (bool, error) { + return mountutils.PathExists(path) +} + +//TODO: use common util from vendor kubernetes/mount-util +func (m *NodeMounter) NeedResize(devicePath string, deviceMountPath string) (bool, error) { + // TODO(xiangLi) resize fs size on formatted file system following this PR https://github.com/kubernetes/kubernetes/pull/99223 + // Port the in-tree un-released change first, need to remove after in-tree release + deviceSize, err := m.getDeviceSize(devicePath) + if err != nil { + return false, err + } + var fsSize, blockSize uint64 + format, err := m.SafeFormatAndMount.GetDiskFormat(devicePath) + if err != nil { + formatErr := fmt.Errorf("ResizeFS.Resize - error checking format for device %s: %v", devicePath, err) + return false, formatErr + } + + // If disk has no format, there is no need to resize the disk because mkfs.* + // by default will use whole disk anyways. + if format == "" { + return false, nil + } + + klog.V(3).Infof("ResizeFs.needResize - checking mounted volume %s", devicePath) + switch format { + case "ext3", "ext4": + blockSize, fsSize, err = m.getExtSize(devicePath) + klog.V(5).Infof("Ext size: filesystem size=%d, block size=%d", fsSize, blockSize) + case "xfs": + blockSize, fsSize, err = m.getXFSSize(deviceMountPath) + klog.V(5).Infof("Xfs size: filesystem size=%d, block size=%d, err=%v", fsSize, blockSize, err) + default: + klog.Errorf("Not able to parse given filesystem info. fsType: %s, will not resize", format) + return false, fmt.Errorf("Could not parse fs info on given filesystem format: %s. Supported fs types are: xfs, ext3, ext4", format) + } + if err != nil { + return false, err + } + // Tolerate one block difference, just in case of rounding errors somewhere. + klog.V(5).Infof("Volume %s: device size=%d, filesystem size=%d, block size=%d", devicePath, deviceSize, fsSize, blockSize) + if deviceSize <= fsSize+blockSize { + return false, nil + } + return true, nil +} +func (m *NodeMounter) getDeviceSize(devicePath string) (uint64, error) { + output, err := m.SafeFormatAndMount.Exec.Command("blockdev", "--getsize64", devicePath).CombinedOutput() + outStr := strings.TrimSpace(string(output)) + if err != nil { + return 0, fmt.Errorf("failed to read size of device %s: %s: %s", devicePath, err, outStr) + } + size, err := strconv.ParseUint(outStr, 10, 64) + if err != nil { + return 0, fmt.Errorf("failed to parse size of device %s %s: %s", devicePath, outStr, err) + } + return size, nil +} + +func (m *NodeMounter) getExtSize(devicePath string) (uint64, uint64, error) { + output, err := m.SafeFormatAndMount.Exec.Command("dumpe2fs", "-h", devicePath).CombinedOutput() + if err != nil { + return 0, 0, fmt.Errorf("failed to read size of filesystem on %s: %s: %s", devicePath, err, string(output)) + } + + blockSize, blockCount, _ := m.parseFsInfoOutput(string(output), ":", "block size", "block count") + + if blockSize == 0 { + return 0, 0, fmt.Errorf("could not find block size of device %s", devicePath) + } + if blockCount == 0 { + return 0, 0, fmt.Errorf("could not find block count of device %s", devicePath) + } + return blockSize, blockSize * blockCount, nil +} + +func (m *NodeMounter) getXFSSize(devicePath string) (uint64, uint64, error) { + output, err := m.SafeFormatAndMount.Exec.Command("xfs_io", "-c", "statfs", devicePath).CombinedOutput() + if err != nil { + return 0, 0, fmt.Errorf("failed to read size of filesystem on %s: %s: %s", devicePath, err, string(output)) + } + + blockSize, blockCount, _ := m.parseFsInfoOutput(string(output), "=", "geom.bsize", "geom.datablocks") + + if blockSize == 0 { + return 0, 0, fmt.Errorf("could not find block size of device %s", devicePath) + } + if blockCount == 0 { + return 0, 0, fmt.Errorf("could not find block count of device %s", devicePath) + } + return blockSize, blockSize * blockCount, nil +} + +func (m *NodeMounter) parseFsInfoOutput(cmdOutput string, spliter string, blockSizeKey string, blockCountKey string) (uint64, uint64, error) { + lines := strings.Split(cmdOutput, "\n") + var blockSize, blockCount uint64 + var err error + + for _, line := range lines { + tokens := strings.Split(line, spliter) + if len(tokens) != 2 { + continue + } + key, value := strings.ToLower(strings.TrimSpace(tokens[0])), strings.ToLower(strings.TrimSpace(tokens[1])) + if key == blockSizeKey { + blockSize, err = strconv.ParseUint(value, 10, 64) + if err != nil { + return 0, 0, fmt.Errorf("failed to parse block size %s: %s", value, err) + } + } + if key == blockCountKey { + blockCount, err = strconv.ParseUint(value, 10, 64) + if err != nil { + return 0, 0, fmt.Errorf("failed to parse block count %s: %s", value, err) + } + } + } + return blockSize, blockCount, err +} diff --git a/pkg/driver/mount_test.go b/pkg/driver/mount_test.go index 18354e9442..32eb5a95f0 100644 --- a/pkg/driver/mount_test.go +++ b/pkg/driver/mount_test.go @@ -234,7 +234,7 @@ Journal checksum: 0xb7df3c6e Interface: mount.New(""), Exec: &fexec, } - fakeMounter := NodeMounter{safe, &fexec} + fakeMounter := NodeMounter{&safe} var blockSize uint64 var fsSize uint64 @@ -296,9 +296,9 @@ func TestNeedResize(t *testing.T) { } safe := mount.SafeFormatAndMount{ Interface: mount.New(""), - Exec: utilexec.New(), + Exec: &fexec, } - fakeMounter := NodeMounter{safe, &fexec} + fakeMounter := NodeMounter{&safe} needResize, err := fakeMounter.NeedResize(test.devicePath, test.deviceMountPath) if needResize != test.expectResult { diff --git a/pkg/driver/mount_windows.go b/pkg/driver/mount_windows.go new file mode 100644 index 0000000000..916672a136 --- /dev/null +++ b/pkg/driver/mount_windows.go @@ -0,0 +1,99 @@ +// +build windows + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver + +import ( + "fmt" + "regexp" + + "github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter" +) + +func (m NodeMounter) FormatAndMount(source string, target string, fstype string, options []string) error { + proxyMounter, ok := m.SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) + if !ok { + return fmt.Errorf("failed to cast mounter to csi proxy mounter") + } + return proxyMounter.FormatAndMount(source, target, fstype, options) +} + +// GetDeviceNameFromMount returns the volume ID for a mount path. +// The ref count returned is always 1 or 0 because csi-proxy doesn't provide a +// way to determine the actual ref count (as opposed to Linux where the mount +// table gets read). In practice this shouldn't matter, as in the NodeStage +// case the ref count is ignored and in the NodeUnstage case, the ref count +// being >1 is just a warning. +// Command to determine ref count would be something like: +// Get-Volume -UniqueId "\\?\Volume{7c3da0c1-0000-0000-0000-010000000000}\" | Get-Partition | Select AccessPaths +func (m NodeMounter) GetDeviceNameFromMount(mountPath string) (string, int, error) { + proxyMounter, ok := m.SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) + if !ok { + return "", 0, fmt.Errorf("failed to cast mounter to csi proxy mounter") + } + deviceName, err := proxyMounter.GetDeviceNameFromMount(mountPath, "") + if err != nil { + // HACK change csi-proxy behavior instead of relying on fragile internal + // implementation details! + // if err contains '"(Get-Item...).Target, output: , error: ' then the + // internal Get-Item cmdlet didn't fail but no item/device was found at the + // path so we should return empty string and nil error just like the Linux + // implementation would. + pattern := `(Get-Item -Path \S+).Target, output: , error: ` + matched, matchErr := regexp.MatchString(pattern, err.Error()) + if matched { + return "", 0, nil + } + err = fmt.Errorf("error getting device name from mount: %v", err) + if matchErr != nil { + err = fmt.Errorf("%v, and error matching pattern %q: %v", err, pattern, matchErr) + } + return "", 0, err + } + return deviceName, 1, nil +} + +func (m *NodeMounter) MakeFile(path string) error { + proxyMounter, ok := m.SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) + if !ok { + return fmt.Errorf("failed to cast mounter to csi proxy mounter") + } + return proxyMounter.MakeFile(path) +} + +func (m *NodeMounter) MakeDir(path string) error { + proxyMounter, ok := m.SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) + if !ok { + return fmt.Errorf("failed to cast mounter to csi proxy mounter") + } + return proxyMounter.MakeDir(path) +} + +func (m *NodeMounter) PathExists(path string) (bool, error) { + proxyMounter, ok := m.SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) + if !ok { + return false, fmt.Errorf("failed to cast mounter to csi proxy mounter") + } + return proxyMounter.ExistsPath(path) +} + +func (m *NodeMounter) NeedResize(devicePath string, deviceMountPath string) (bool, error) { + // TODO this is called at NodeStage to ensure file system is the correct size + // Implement it to respect spec v1.4.0 https://github.com/container-storage-interface/spec/pull/452 + return false, nil +} diff --git a/pkg/driver/node.go b/pkg/driver/node.go index bb8e728189..641e16a732 100644 --- a/pkg/driver/node.go +++ b/pkg/driver/node.go @@ -83,7 +83,7 @@ type nodeService struct { // it panics if failed to create the service func newNodeService(driverOptions *DriverOptions) nodeService { klog.V(5).Infof("[Debug] Retrieving node info from metadata service") - metadata, err := cloud.NewMetadata() + metadata, err := cloud.NewMetadataService(cloud.DefaultEC2MetadataClient, cloud.DefaultKubernetesAPIClient) if err != nil { panic(err) } @@ -143,12 +143,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol fsType = defaultFsType } - var mountOptions []string - for _, f := range mountVolume.MountFlags { - if !hasMountOption(mountOptions, f) { - mountOptions = append(mountOptions, f) - } - } + mountOptions := collectMountOptions(fsType, mountVolume.MountFlags) if ok := d.inFlight.Insert(volumeID); !ok { return nil, status.Errorf(codes.Aborted, VolumeOperationAlreadyExists, volumeID) @@ -223,7 +218,7 @@ func (d *nodeService) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol return nil, status.Errorf(codes.Internal, "Could not determine if volume %q (%q) need to be resized: %v", req.GetVolumeId(), source, err) } if needResize { - r := mountutils.NewResizeFs(d.mounter) + r := mountutils.NewResizeFs(d.mounter.(*NodeMounter).Exec) klog.V(2).Infof("Volume %s needs resizing", source) if _, err := r.Resize(source, target); err != nil { return nil, status.Errorf(codes.Internal, "Could not resize volume %q (%q): %v", volumeID, source, err) @@ -326,7 +321,7 @@ func (d *nodeService) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandV // TODO this won't make sense on Windows with csi-proxy args := []string{"-o", "source", "--noheadings", "--target", volumePath} - output, err := d.mounter.Command("findmnt", args...).Output() + output, err := d.mounter.(*NodeMounter).Exec.Command("findmnt", args...).Output() if err != nil { return nil, status.Errorf(codes.Internal, "Could not determine device path: %v", err) @@ -336,7 +331,7 @@ func (d *nodeService) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandV return nil, status.Errorf(codes.Internal, "Could not get valid device for mount path: %q", req.GetVolumePath()) } - r := mountutils.NewResizeFs(d.mounter) + r := mountutils.NewResizeFs(d.mounter.(*NodeMounter).Exec) // TODO: lock per volume ID to have some idempotency if _, err := r.Resize(devicePath, volumePath); err != nil { @@ -613,9 +608,8 @@ func (d *nodeService) nodePublishVolumeForFileSystem(req *csi.NodePublishVolumeR } } - klog.V(4).Infof("NodePublishVolume: creating dir %s", target) - if err := d.mounter.MakeDir(target); err != nil { - return status.Errorf(codes.Internal, "Could not create dir %q: %v", target, err) + if err := d.preparePublishTarget(target); err != nil { + return status.Errorf(codes.Internal, err.Error()) } fsType := mode.Mount.GetFsType() @@ -623,6 +617,8 @@ func (d *nodeService) nodePublishVolumeForFileSystem(req *csi.NodePublishVolumeR fsType = defaultFsType } + mountOptions = collectMountOptions(fsType, mountOptions) + klog.V(4).Infof("NodePublishVolume: mounting %s at %s with option %s as fstype %s", source, target, mountOptions, fsType) if err := d.mounter.Mount(source, target, fsType, mountOptions); err != nil { if removeErr := os.Remove(target); removeErr != nil { @@ -658,3 +654,24 @@ func hasMountOption(options []string, opt string) bool { } return false } + +// collectMountOptions returns array of mount options from +// VolumeCapability_MountVolume and special mount options for +// given filesystem. +func collectMountOptions(fsType string, mntFlags []string) []string { + var options []string + for _, opt := range mntFlags { + if !hasMountOption(options, opt) { + options = append(options, opt) + } + } + + // By default, xfs does not allow mounting of two volumes with the same filesystem uuid. + // Force ignore this uuid to be able to mount volume + its clone / restored snapshot on the same node. + if fsType == FSTypeXfs { + if !hasMountOption(options, "nouuid") { + options = append(options, "nouuid") + } + } + return options +} diff --git a/pkg/driver/node_linux.go b/pkg/driver/node_linux.go index 4c4a9d0955..a6efa9b305 100644 --- a/pkg/driver/node_linux.go +++ b/pkg/driver/node_linux.go @@ -26,7 +26,7 @@ import ( "strings" "golang.org/x/sys/unix" - "k8s.io/klog" + "k8s.io/klog/v2" ) // findDevicePath finds path of device and verifies its existence @@ -93,6 +93,14 @@ func findNvmeVolume(findName string) (device string, err error) { return resolved, nil } +func (d *nodeService) preparePublishTarget(target string) error { + klog.V(4).Infof("NodePublishVolume: creating dir %s", target) + if err := d.mounter.MakeDir(target); err != nil { + return fmt.Errorf("Could not create dir %q: %v", target, err) + } + return nil +} + // IsBlock checks if the given path is a block device func (d *nodeService) IsBlockDevice(fullPath string) (bool, error) { var st unix.Stat_t @@ -105,7 +113,7 @@ func (d *nodeService) IsBlockDevice(fullPath string) (bool, error) { } func (d *nodeService) getBlockSizeBytes(devicePath string) (int64, error) { - cmd := d.mounter.Command("blockdev", "--getsize64", devicePath) + cmd := d.mounter.(*NodeMounter).Exec.Command("blockdev", "--getsize64", devicePath) output, err := cmd.Output() if err != nil { return -1, fmt.Errorf("error when getting size of block volume at path %s: output: %s, err: %v", devicePath, string(output), err) diff --git a/pkg/driver/node_test.go b/pkg/driver/node_test.go index 20bf8c48dc..c3019b3e34 100644 --- a/pkg/driver/node_test.go +++ b/pkg/driver/node_test.go @@ -613,7 +613,7 @@ func TestNodePublishVolume(t *testing.T) { }, }, { - name: "success fstype", + name: "success fstype xfs", testFunc: func(t *testing.T) { mockCtl := gomock.NewController(t) defer mockCtl.Finish() @@ -628,7 +628,7 @@ func TestNodePublishVolume(t *testing.T) { } mockMounter.EXPECT().MakeDir(gomock.Eq(targetPath)).Return(nil) - mockMounter.EXPECT().Mount(gomock.Eq(stagingTargetPath), gomock.Eq(targetPath), gomock.Eq(FSTypeXfs), gomock.Eq([]string{"bind"})).Return(nil) + mockMounter.EXPECT().Mount(gomock.Eq(stagingTargetPath), gomock.Eq(targetPath), gomock.Eq(FSTypeXfs), gomock.Eq([]string{"bind", "nouuid"})).Return(nil) req := &csi.NodePublishVolumeRequest{ PublishContext: map[string]string{DevicePathKey: devicePath}, diff --git a/pkg/driver/node_windows.go b/pkg/driver/node_windows.go new file mode 100644 index 0000000000..3a46c8ce76 --- /dev/null +++ b/pkg/driver/node_windows.go @@ -0,0 +1,99 @@ +// +build windows + +/* +Copyright 2019 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package driver + +import ( + "context" + "errors" + "fmt" + "strconv" + "strings" + + diskapi "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1" + diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1" + "github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/mounter" + "k8s.io/klog" +) + +// findDevicePath finds disk number of device +// https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-windows-volumes.html#list-nvme-powershell +func (d *nodeService) findDevicePath(devicePath, volumeID, _ string) (string, error) { + + diskClient, err := diskclient.NewClient() + if err != nil { + return "", fmt.Errorf("error creating csi-proxy disk client: %q", err) + } + defer diskClient.Close() + + response, err := diskClient.ListDiskIDs(context.TODO(), &diskapi.ListDiskIDsRequest{}) + if err != nil { + return "", fmt.Errorf("error listing disk ids: %q", err) + } + + diskIDs := response.GetDiskIDs() + + foundDiskNumber := "" + for diskNumber, diskID := range diskIDs { + serialNumber := diskID.GetSerialNumber() + cleanVolumeID := strings.ReplaceAll(volumeID, "-", "") + if strings.Contains(serialNumber, cleanVolumeID) { + foundDiskNumber = strconv.Itoa(int(diskNumber)) + break + } + } + + if foundDiskNumber == "" { + return "", fmt.Errorf("disk number for device path %q volume id %q not found", devicePath, volumeID) + } + + return foundDiskNumber, nil +} + +func (d *nodeService) preparePublishTarget(target string) error { + // On Windows, Mount will create the parent of target and mklink (create a symbolic link) at target later, so don't create a + // directory at target now. Otherwise mklink will error: "Cannot create a file when that file already exists". + // Instead, delete the target if it already exists (like if it was created by kubelet <1.20) + // https://github.com/kubernetes/kubernetes/pull/88759 + klog.V(4).Infof("NodePublishVolume: removing dir %s", target) + exists, err := d.mounter.PathExists(target) + if err != nil { + return fmt.Errorf("error checking path %q exists: %v", target, err) + } + + proxyMounter, ok := (d.mounter.(*NodeMounter)).SafeFormatAndMount.Interface.(*mounter.CSIProxyMounter) + if !ok { + return fmt.Errorf("failed to cast mounter to csi proxy mounter") + } + + if exists { + if err := proxyMounter.Rmdir(target); err != nil { + return fmt.Errorf("error Rmdir target %q: %v", target, err) + } + } + return nil +} + +// IsBlock checks if the given path is a block device +func (d *nodeService) IsBlockDevice(fullPath string) (bool, error) { + return false, errors.New("unsupported") +} + +func (d *nodeService) getBlockSizeBytes(devicePath string) (int64, error) { + return 0, errors.New("unsupported") +} diff --git a/pkg/driver/sanity_test.go b/pkg/driver/sanity_test.go index b8e8a3e2e3..91d7422050 100644 --- a/pkg/driver/sanity_test.go +++ b/pkg/driver/sanity_test.go @@ -120,6 +120,14 @@ func (c *fakeCloudProvider) CreateDisk(ctx context.Context, volumeName string, d return nil, cloud.ErrNotFound } } + if existingDisk, ok := c.disks[volumeName]; ok { + //Already Created volume + if existingDisk.Disk.CapacityGiB != util.BytesToGiB(diskOptions.CapacityBytes) { + return nil, cloud.ErrIdempotentParameterMismatch + } else { + return existingDisk.Disk, nil + } + } d := &fakeDisk{ Disk: &cloud.Disk{ VolumeID: fmt.Sprintf("vol-%d", r1.Uint64()), diff --git a/pkg/mounter/safe_mounter_windows.go b/pkg/mounter/safe_mounter_windows.go index 35a3277d78..c1a50c55c3 100644 --- a/pkg/mounter/safe_mounter_windows.go +++ b/pkg/mounter/safe_mounter_windows.go @@ -22,16 +22,17 @@ import ( "context" "fmt" "os" + "strconv" "strings" - disk "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2" - diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2" + disk "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1" + diskclient "github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1" - fs "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1" - fsclient "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1" + fs "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1" + fsclient "github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1" - volume "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2" - volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2" + volume "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1" + volumeclient "github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1" "k8s.io/klog/v2" "k8s.io/mount-utils" @@ -58,11 +59,11 @@ func normalizeWindowsPath(path string) string { func (mounter *CSIProxyMounter) Mount(source string, target string, fstype string, options []string) error { // Mount is called after the format is done. // TODO: Confirm that fstype is empty. - linkRequest := &fs.LinkPathRequest{ + linkRequest := &fs.CreateSymlinkRequest{ SourcePath: normalizeWindowsPath(source), TargetPath: normalizeWindowsPath(target), } - _, err := mounter.FsClient.LinkPath(context.Background(), linkRequest) + _, err := mounter.FsClient.CreateSymlink(context.Background(), linkRequest) if err != nil { return err } @@ -75,9 +76,8 @@ func (mounter *CSIProxyMounter) Mount(source string, target string, fstype strin // rmdir with either pod or plugin context. func (mounter *CSIProxyMounter) Rmdir(path string) error { rmdirRequest := &fs.RmdirRequest{ - Path: normalizeWindowsPath(path), - Context: fs.PathContext_POD, - Force: true, + Path: normalizeWindowsPath(path), + Force: true, } _, err := mounter.FsClient.Rmdir(context.Background(), rmdirRequest) if err != nil { @@ -89,9 +89,9 @@ func (mounter *CSIProxyMounter) Rmdir(path string) error { // Unmount - Removes the directory - equivalent to unmount on Linux. func (mounter *CSIProxyMounter) Unmount(target string) error { // WriteVolumeCache before unmount - response, err := mounter.VolumeClient.GetVolumeIDFromMount(context.Background(), &volume.VolumeIDFromMountRequest{Mount: target}) + response, err := mounter.VolumeClient.GetVolumeIDFromTargetPath(context.Background(), &volume.GetVolumeIDFromTargetPathRequest{TargetPath: target}) if err != nil || response == nil { - klog.Warningf("GetVolumeIDFromMount(%s) failed with error: %v, response: %v", target, err, response) + klog.Warningf("GetVolumeIDFromTargetPath(%s) failed with error: %v, response: %v", target, err, response) } else { request := &volume.WriteVolumeCacheRequest{ VolumeId: response.VolumeId, @@ -124,14 +124,14 @@ func (mounter *CSIProxyMounter) IsLikelyNotMountPoint(path string) (bool, error) return true, os.ErrNotExist } - response, err := mounter.FsClient.IsMountPoint(context.Background(), - &fs.IsMountPointRequest{ + response, err := mounter.FsClient.IsSymlink(context.Background(), + &fs.IsSymlinkRequest{ Path: normalizeWindowsPath(path), }) if err != nil { return false, err } - return !response.IsMountPoint, nil + return !response.IsSymlink, nil } func (mounter *CSIProxyMounter) PathIsDevice(pathname string) (bool, error) { @@ -144,8 +144,8 @@ func (mounter *CSIProxyMounter) DeviceOpened(pathname string) (bool, error) { // GetDeviceNameFromMount returns the volume ID for a mount path. func (mounter *CSIProxyMounter) GetDeviceNameFromMount(mountPath, pluginMountDir string) (string, error) { - req := &volume.VolumeIDFromMountRequest{Mount: normalizeWindowsPath(mountPath)} - resp, err := mounter.VolumeClient.GetVolumeIDFromMount(context.Background(), req) + req := &volume.GetVolumeIDFromTargetPathRequest{TargetPath: normalizeWindowsPath(mountPath)} + resp, err := mounter.VolumeClient.GetVolumeIDFromTargetPath(context.Background(), req) if err != nil { return "", err } @@ -166,8 +166,7 @@ func (mounter *CSIProxyMounter) MakeFile(pathname string) error { // with Plugin context.. func (mounter *CSIProxyMounter) MakeDir(pathname string) error { mkdirReq := &fs.MkdirRequest{ - Path: normalizeWindowsPath(pathname), - Context: fs.PathContext_PLUGIN, + Path: normalizeWindowsPath(pathname), } _, err := mounter.FsClient.Mkdir(context.Background(), mkdirReq) if err != nil { @@ -238,7 +237,7 @@ func (mounter *CSIProxyMounter) FindDiskByLun(lun string) (diskNum string, err e // If match is found then return back the disk number. for diskID, location := range findDiskByLunResponse.DiskLocations { if strings.EqualFold(location.LUNID, lun) { - return diskID, nil + return strconv.Itoa(int(diskID)), nil } } return "", fmt.Errorf("could not find disk id for lun: %s", lun) @@ -246,18 +245,23 @@ func (mounter *CSIProxyMounter) FindDiskByLun(lun string) (diskNum string, err e // FormatAndMount - accepts the source disk number, target path to mount, the fstype to format with and options to be used. func (mounter *CSIProxyMounter) FormatAndMount(source string, target string, fstype string, options []string) error { + diskNumber, err := strconv.Atoi(source) + if err != nil { + return err + } + // Call PartitionDisk CSI proxy call to partition the disk and return the volume id partionDiskRequest := &disk.PartitionDiskRequest{ - DiskID: source, + DiskNumber: uint32(diskNumber), } - _, err := mounter.DiskClient.PartitionDisk(context.Background(), partionDiskRequest) + _, err = mounter.DiskClient.PartitionDisk(context.Background(), partionDiskRequest) if err != nil { return err } // List the volumes on the given disk. volumeIDsRequest := &volume.ListVolumesOnDiskRequest{ - DiskId: source, + DiskNumber: uint32(diskNumber), } volumeIdResponse, err := mounter.VolumeClient.ListVolumesOnDisk(context.Background(), volumeIDsRequest) if err != nil { @@ -291,8 +295,8 @@ func (mounter *CSIProxyMounter) FormatAndMount(source string, target string, fst // Mount the volume by calling the CSI proxy call. mountVolumeRequest := &volume.MountVolumeRequest{ - VolumeId: volumeID, - Path: normalizeWindowsPath(target), + VolumeId: volumeID, + TargetPath: normalizeWindowsPath(target), } _, err = mounter.VolumeClient.MountVolume(context.Background(), mountVolumeRequest) if err != nil { @@ -303,7 +307,7 @@ func (mounter *CSIProxyMounter) FormatAndMount(source string, target string, fst // ResizeVolume resizes the volume to the maximum available size. func (mounter *CSIProxyMounter) ResizeVolume(devicePath string) error { - req := &volume.ResizeVolumeRequest{VolumeId: devicePath, Size: 0} + req := &volume.ResizeVolumeRequest{VolumeId: devicePath, SizeBytes: 0} _, err := mounter.VolumeClient.ResizeVolume(context.Background(), req) if err != nil { @@ -315,14 +319,14 @@ func (mounter *CSIProxyMounter) ResizeVolume(devicePath string) error { // GetVolumeSizeInBytes returns the size of the volume in bytes. func (mounter *CSIProxyMounter) GetVolumeSizeInBytes(devicePath string) (int64, error) { - req := &volume.VolumeStatsRequest{VolumeId: devicePath} + req := &volume.GetVolumeStatsRequest{VolumeId: devicePath} - resp, err := mounter.VolumeClient.VolumeStats(context.Background(), req) + resp, err := mounter.VolumeClient.GetVolumeStats(context.Background(), req) if err != nil { return -1, err } - return resp.VolumeSize, nil + return resp.TotalBytes, nil } // NewCSIProxyMounter - creates a new CSI Proxy mounter struct which encompassed all the diff --git a/tests/e2e-kubernetes/manifests.yaml b/tests/e2e-kubernetes/manifests.yaml index e6d302be64..cdee83b1fe 100644 --- a/tests/e2e-kubernetes/manifests.yaml +++ b/tests/e2e-kubernetes/manifests.yaml @@ -22,8 +22,10 @@ DriverInfo: fsGroup: true block: true exec: true - volumeLimits: false - controllerExpansion: true - nodeExpansion: true snapshotDataSource: true + pvcDataSource: false multipods: true + controllerExpansion: true + nodeExpansion: true + volumeLimits: true + topology: true diff --git a/tests/e2e-upgrade/README.md b/tests/e2e-upgrade/README.md new file mode 100644 index 0000000000..a187cb5172 --- /dev/null +++ b/tests/e2e-upgrade/README.md @@ -0,0 +1 @@ +Test the AWS EBS CSI driver before/during/after the CSIMigration and CSIMigrationAWS features are enabled/disabled. For details see (https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/625-csi-migration#upgradedowngradeskew-testing) diff --git a/tests/e2e-upgrade/e2e_test.go b/tests/e2e-upgrade/e2e_test.go new file mode 100644 index 0000000000..dc2e8ce165 --- /dev/null +++ b/tests/e2e-upgrade/e2e_test.go @@ -0,0 +1,394 @@ +package e2e_upgrade + +import ( + "context" + "flag" + "fmt" + "math/rand" + "path/filepath" + "regexp" + "strings" + "testing" + "time" + + "github.com/onsi/ginkgo" + . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "k8s.io/apimachinery/pkg/api/resource" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/util/homedir" + "k8s.io/kubernetes/test/e2e/framework" + frameworkconfig "k8s.io/kubernetes/test/e2e/framework/config" + e2epod "k8s.io/kubernetes/test/e2e/framework/pod" + e2epv "k8s.io/kubernetes/test/e2e/framework/pv" + "k8s.io/kubernetes/test/e2e/storage/utils" +) + +var ( + kopsBinaryPath = flag.String("binary", "kops", "") + kopsStateStore = flag.String("state", "s3://k8s-kops-csi-e2e", "") + kopsClusterName = flag.String("name", "", "") +) + +// TestKopsMigration tests the configurations described here: +// https://github.com/kubernetes/community/blob/master/contributors/design-proposals/storage/csi-migration.md#upgradedowngradeskew-testing +func TestKopsMigration(t *testing.T) { + RegisterFailHandler(ginkgo.Fail) + ginkgo.RunSpecs(t, "TestKopsMigration") +} + +func init() { + rand.Seed(time.Now().UnixNano()) + + testing.Init() + frameworkconfig.CopyFlags(frameworkconfig.Flags, flag.CommandLine) + framework.RegisterCommonFlags(flag.CommandLine) + framework.RegisterClusterFlags(flag.CommandLine) + + flag.Parse() + + if home := homedir.HomeDir(); home != "" && framework.TestContext.KubeConfig == "" { + framework.TestContext.KubeConfig = filepath.Join(home, ".kube", "config") + } + framework.AfterReadingAllFlags(&framework.TestContext) + + ginkgo.Describe("Kops", func() { + var ( + k *kops + clientset *kubernetes.Clientset + f *framework.Framework + ) + k = &kops{*kopsBinaryPath, *kopsStateStore, *kopsClusterName} + var err error + clientset, err = k.exportKubecfg(framework.TestContext.KubeConfig) + if err != nil { + panic(err) + } + f = framework.NewFramework("kops-migrate", framework.Options{}, clientset) + + ginkgo.It("should call csi plugin for all operations after migration toggled on", func() { + migrationOn := false + toggleMigration(k, migrationOn) + _, inTreePVC, _ := createAndVerify(k, migrationOn, f, nil) + // Don't deleteAndVerify, the other test covers it. The inTreePod will + // get evicted & deleted as part of the following toggle + + migrationOn = true + toggleMigration(k, migrationOn) + csiPod, csiPVC, csiPV := createAndVerify(k, migrationOn, f, inTreePVC) + deleteAndVerify(f, migrationOn, csiPod, csiPVC, csiPV) + }) + + ginkgo.It("should call in-tree plugin for all operations after migration toggled off", func() { + migrationOn := true + toggleMigration(k, migrationOn) + _, csiPVC, _ := createAndVerify(k, migrationOn, f, nil) + // Don't deleteAndVerify, the other test covers it. The csiPod will + // get evicted & deleted as part of the following toggle + + migrationOn = false + toggleMigration(k, migrationOn) + inTreePod, inTreePVC, inTreePV := createAndVerify(k, migrationOn, f, csiPVC) + deleteAndVerify(f, migrationOn, inTreePod, inTreePVC, inTreePV) + }) + + /* + ginkgo.It("should call in-tree plugin for attach & mount and csi plugin for provision after kube-controller-manager migration toggled on and kubelet migration toggled off", func() { + // TODO + }) + */ + }) +} + +var ( + csiVerifier = verifier{ + name: "csi", + provisioner: "ebs.csi.aws.com", + plugin: "kubernetes.io/csi/ebs.csi.aws.com", + } + inTreeVerifier = verifier{ + name: "in-tree", + provisioner: "kubernetes.io/aws-ebs", + plugin: "kubernetes.io/aws-ebs", + } +) + +func toggleMigration(k *kops, migrationOn bool) { + var step string + var err error + if migrationOn { + step = "Toggling kube-controller-manager migration ON" + ginkgo.By(step) + err = k.toggleMigration("kubeControllerManager", migrationOn) + framework.ExpectNoError(err, step) + + step = "Toggling kubelet migration ON" + ginkgo.By(step) + err = k.toggleMigration("kubelet", migrationOn) + framework.ExpectNoError(err, step) + } else { + step = "Toggling kubelet migration OFF" + ginkgo.By(step) + err = k.toggleMigration("kubelet", migrationOn) + framework.ExpectNoError(err, step) + + step = "Toggling kube-controller-manager migration OFF" + ginkgo.By(step) + err = k.toggleMigration("kubeControllerManager", migrationOn) + framework.ExpectNoError(err, step) + } +} + +// createAndVerify creates a pod + pvc and verifies that csi/in-tree does +// operations according to whether migrationOn is true/false. optionally +// accepts a preTogglePVC to verify the same for a pvc that already existed +// prior to migration being toggled on/off +func createAndVerify(k *kops, migrationOn bool, f *framework.Framework, preTogglePVC *v1.PersistentVolumeClaim) (*v1.Pod, *v1.PersistentVolumeClaim, *v1.PersistentVolume) { + var step string + var err error + var v *verifier + if migrationOn { + v = &csiVerifier + } else { + v = &inTreeVerifier + } + + clientset, err := k.exportKubecfg(framework.TestContext.KubeConfig) + f.ClientSet = clientset + + if preTogglePVC != nil { + step = "Creating post-toggle Pod using pre-toggle PVC" + ginkgo.By(step) + extraPod, _, preTogglePV, err := createPodPVC(f, preTogglePVC) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Verifying pre-toggle PV %q got re-attached by %s", preTogglePV.Name, v.name) + ginkgo.By(step) + err = v.verifyAttach(f, preTogglePV) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Verifying pre-toggle PV %q got re-mounted by %s", preTogglePV.Name, v.name) + ginkgo.By(step) + err = v.verifyMount(f, preTogglePV, extraPod.Spec.NodeName) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Deleting pod %q", extraPod.Name) + ginkgo.By(step) + err = e2epod.DeletePodWithWait(f.ClientSet, extraPod) + framework.ExpectNoError(err, step) + } + + step = "Creating post-toggle Pod using post-toggle PVC" + ginkgo.By(step) + pod, pvc, pv, err := createPodPVC(f, nil) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Verifying post-toggle PV %q got attached by %s", pv.Name, v.name) + ginkgo.By(step) + err = v.verifyAttach(f, pv) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Verifying post-toggle PV %q got mounted by %s", pv.Name, v.name) + ginkgo.By(step) + err = v.verifyMount(f, pv, pod.Spec.NodeName) + framework.ExpectNoError(err, step) + + return pod, pvc, pv +} + +// deleteAndVerify deletes a pod + pvc and verifies that csi/in-tree does +// operations according to whether migrationOn is true/false +func deleteAndVerify(f *framework.Framework, migrationOn bool, pod *v1.Pod, pvc *v1.PersistentVolumeClaim, pv *v1.PersistentVolume) { + var step string + var err error + var v *verifier + if migrationOn { + v = &csiVerifier + } else { + v = &inTreeVerifier + } + + step = fmt.Sprintf("Deleting Pod %q", pod.Name) + ginkgo.By(step) + err = e2epod.DeletePodWithWait(f.ClientSet, pod) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Deleting PVC %q", pvc.Name) + ginkgo.By(step) + err = f.ClientSet.CoreV1().PersistentVolumeClaims(pvc.Namespace).Delete(context.TODO(), pvc.Name, metav1.DeleteOptions{}) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Waiting for PV %q to be deleted", pv.Name) + ginkgo.By(step) + err = f.ClientSet.CoreV1().PersistentVolumeClaims(pvc.Namespace).Delete(context.TODO(), pvc.Name, metav1.DeleteOptions{}) + err = e2epv.WaitForPersistentVolumeDeleted(f.ClientSet, pvc.Spec.VolumeName, 30*time.Second, 2*time.Minute) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Verifying PV %q got unmounted by %s", pv.Name, v.name) + ginkgo.By(step) + err = v.verifyUnmount(f, pv, pod.Spec.NodeName) + framework.ExpectNoError(err, step) + + step = fmt.Sprintf("Verifying PV %q got detached by %s", pv.Name, v.name) + ginkgo.By(step) + err = v.verifyDetach(f, pv) + framework.ExpectNoError(err, step) +} + +func createPodPVC(f *framework.Framework, pvc *v1.PersistentVolumeClaim) (*v1.Pod, *v1.PersistentVolumeClaim, *v1.PersistentVolume, error) { + clientset := f.ClientSet + ns := f.Namespace.Name + var err error + + if pvc == nil { + pvc = &v1.PersistentVolumeClaim{ + ObjectMeta: metav1.ObjectMeta{ + GenerateName: f.BaseName, + }, + Spec: v1.PersistentVolumeClaimSpec{ + AccessModes: []v1.PersistentVolumeAccessMode{v1.ReadWriteOnce}, + Resources: v1.ResourceRequirements{ + Requests: v1.ResourceList{ + v1.ResourceStorage: resource.MustParse("1Gi"), + }, + }, + }, + } + pvc, err = clientset.CoreV1().PersistentVolumeClaims(ns).Create(context.TODO(), pvc, metav1.CreateOptions{}) + if err != nil { + return nil, nil, nil, err + } + } + + pod := e2epod.MakePod(ns, nil, []*v1.PersistentVolumeClaim{pvc}, false, "") + pod, err = clientset.CoreV1().Pods(ns).Create(context.TODO(), pod, metav1.CreateOptions{}) + if err != nil { + return nil, nil, nil, err + } + + err = e2epod.WaitForPodNameRunningInNamespace(clientset, pod.Name, ns) + if err != nil { + return nil, nil, nil, err + } + + pod, err = clientset.CoreV1().Pods(ns).Get(context.TODO(), pod.Name, metav1.GetOptions{}) + if err != nil { + return nil, nil, nil, err + } + + pvc, err = clientset.CoreV1().PersistentVolumeClaims(ns).Get(context.TODO(), pvc.Name, metav1.GetOptions{}) + if err != nil { + return nil, nil, nil, err + } + + pv, err := clientset.CoreV1().PersistentVolumes().Get(context.TODO(), pvc.Spec.VolumeName, metav1.GetOptions{}) + if err != nil { + return nil, nil, nil, err + } + + return pod, pvc, pv, nil +} + +type verifier struct { + name string + provisioner string + plugin string +} + +/* +func (v *verifier) verifyProvision(pv *v1.PersistentVolume) error { + provisionedBy, ok := pv.Annotations["pv.kubernetes.io/provisioned-by"] + if !ok { + return errors.New("provisioned-by annotation missing") + } else if provisionedBy != v.provisioner { + return fmt.Errorf("provisioned-by annotation is %q but expected %q", provisionedBy, v.provisioner) + } + return nil +} + +// TODO verifyProvision/verifyDelete: check csi pod logs or kcm logs, relying on provisioned-by will break soon https://github.com/kubernetes-sigs/sig-storage-lib-external-provisioner/pull/104 +*/ + +func (v *verifier) verifyAttach(f *framework.Framework, pv *v1.PersistentVolume) error { + re := regexp.MustCompile(fmt.Sprintf("AttachVolume.Attach.*%s.*%s", v.plugin, volumeID(pv))) + return findKubeControllerManagerLogs(f.ClientSet, re) +} + +func (v *verifier) verifyDetach(f *framework.Framework, pv *v1.PersistentVolume) error { + re := regexp.MustCompile(fmt.Sprintf("DetachVolume.Detach.*%s.*%s", v.plugin, volumeID(pv))) + return findKubeControllerManagerLogs(f.ClientSet, re) +} + +func (v *verifier) verifyMount(f *framework.Framework, pv *v1.PersistentVolume, nodeName string) error { + re := regexp.MustCompile(fmt.Sprintf("MountVolume.Mount.*%s.*%s", v.plugin, volumeID(pv))) + return findKubeletLogs(f, nodeName, re) +} + +func (v *verifier) verifyUnmount(f *framework.Framework, pv *v1.PersistentVolume, nodeName string) error { + re := regexp.MustCompile(fmt.Sprintf("UnmountVolume.TearDown.*%s.*%s", v.plugin, volumeID(pv))) + return findKubeletLogs(f, nodeName, re) +} + +func volumeID(pv *v1.PersistentVolume) string { + segments := strings.Split(pv.Spec.AWSElasticBlockStore.VolumeID, "/") + return segments[len(segments)-1] +} + +func findKubeletLogs(f *framework.Framework, nodeName string, re *regexp.Regexp) error { + logs, err := kubeletLogs(f, nodeName) + if err != nil { + return fmt.Errorf("error getting kubelet logs: %v", err) + } + match := re.FindString(logs) + if match == "" { + return fmt.Errorf("regexp %q not found", re) + } + return nil +} + +func findKubeControllerManagerLogs(clientset kubernetes.Interface, re *regexp.Regexp) error { + logs, err := kubeControllerManagerLogs(clientset) + if err != nil { + return fmt.Errorf("error getting kube-controller-manager logs: %v", err) + } + match := re.FindString(logs) + if match == "" { + return fmt.Errorf("regexp %q not found", re) + } + return nil +} + +func kubeletLogs(f *framework.Framework, nodeName string) (string, error) { + hostExec := utils.NewHostExec(f) + node, err := f.ClientSet.CoreV1().Nodes().Get(context.TODO(), nodeName, metav1.GetOptions{}) + if err != nil { + return "", err + } + logs, err := hostExec.IssueCommandWithResult("journalctl -u kubelet", node) + if err != nil { + return "", err + } + return logs, nil +} + +func kubeControllerManagerLogs(clientset kubernetes.Interface) (string, error) { + return podLogs(clientset, "kube-controller-manager") +} + +func podLogs(clientset kubernetes.Interface, podNamePrefix string) (string, error) { + pods, err := clientset.CoreV1().Pods(metav1.NamespaceSystem).List(context.TODO(), metav1.ListOptions{}) + if err != nil { + return "", err + } + for _, pod := range pods.Items { + if strings.HasPrefix(pod.Name, podNamePrefix) { + body, err := clientset.CoreV1().Pods(metav1.NamespaceSystem).GetLogs(pod.Name, &v1.PodLogOptions{}).Do(context.TODO()).Raw() + if err != nil { + return "", err + } + return string(body), nil + } + } + return "", fmt.Errorf("%q pod not found", podNamePrefix) +} diff --git a/tests/e2e-upgrade/kops.go b/tests/e2e-upgrade/kops.go new file mode 100644 index 0000000000..f527eeb6cc --- /dev/null +++ b/tests/e2e-upgrade/kops.go @@ -0,0 +1,170 @@ +package e2e_upgrade + +import ( + "fmt" + "io/ioutil" + "log" + "os" + "os/exec" + "strconv" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/tools/clientcmd" +) + +type kops struct { + kopsBinaryPath string + kopsStateStore string + kopsClusterName string +} + +func (k *kops) commandQuiet(args ...string) *exec.Cmd { + args = append(args, "--state", k.kopsStateStore, "--name", k.kopsClusterName) + cmd := exec.Command(k.kopsBinaryPath, args...) + log.Print(cmd.String()) + return cmd +} + +func (k *kops) command(args ...string) *exec.Cmd { + cmd := k.commandQuiet(args...) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stderr + return cmd +} + +func (k *kops) getCluster() (*unstructured.Unstructured, error) { + cmd := k.commandQuiet( + "get", + "cluster", + "-o", + "json", + ) + out, err := cmd.CombinedOutput() + if err != nil { + return nil, fmt.Errorf("out: %v, err: %v", string(out), err) + } + + // kops client/API takes a long time to compile so settle for kops cli and unstructured + cluster := new(unstructured.Unstructured) + _, _, err = unstructured.UnstructuredJSONScheme.Decode(out, nil, cluster) + if err != nil { + return nil, err + } + + return cluster, nil +} + +// similar to kubetest2 code +// https://github.com/kubernetes/kops/tree/master/tests/e2e/kubetest2-kops/deployer +func (k *kops) updateCluster(cluster *unstructured.Unstructured) error { + tmpfile, err := ioutil.TempFile("", "cluster") + if err != nil { + log.Fatal(err) + } + err = unstructured.UnstructuredJSONScheme.Encode(cluster, tmpfile) + if err != nil { + log.Fatal(err) + } + + cmd := k.command( + "replace", + "-f", + tmpfile.Name(), + ) + err = cmd.Run() + if err != nil { + return err + } + + cmd = k.command( + "update", + "cluster", + "--yes", + ) + err = cmd.Run() + if err != nil { + return err + } + + cmd = k.command( + "rolling-update", + "cluster", + "--yes", + ) + err = cmd.Run() + if err != nil { + return err + } + + return nil +} + +func (k *kops) exportKubecfg(kubeconfig string) (*kubernetes.Clientset, error) { + cmd := k.command( + "export", + "kubecfg", + "--admin", + "--kubeconfig", + kubeconfig, + ) + err := cmd.Run() + if err != nil { + return nil, err + } + + config, err := clientcmd.BuildConfigFromFlags("", kubeconfig) + if err != nil { + return nil, err + } + + clientset, err := kubernetes.NewForConfig(config) + if err != nil { + return nil, err + } + + return clientset, nil +} + +func (k *kops) setFeatureGate(cluster *unstructured.Unstructured, component, featureGate string, on bool) (*unstructured.Unstructured, error) { + featureGates, found, err := unstructured.NestedMap(cluster.Object, "spec", component, "featureGates") + if err != nil { + return nil, err + } + if !found { + featureGates = make(map[string]interface{}) + } + + featureGates[featureGate] = strconv.FormatBool(on) + + err = unstructured.SetNestedMap(cluster.Object, featureGates, "spec", component, "featureGates") + if err != nil { + return nil, err + } + + return cluster, nil +} + +func (k *kops) toggleMigration(component string, on bool) error { + cluster, err := k.getCluster() + if err != nil { + return err + } + + cluster, err = k.setFeatureGate(cluster, component, "CSIMigration", on) + if err != nil { + return err + } + + cluster, err = k.setFeatureGate(cluster, component, "CSIMigrationAWS", on) + if err != nil { + return err + } + + err = k.updateCluster(cluster) + if err != nil { + return err + } + + return nil +} diff --git a/tests/e2e/pre_provsioning.go b/tests/e2e/pre_provsioning.go index ba23659f3b..9b8ed10e68 100644 --- a/tests/e2e/pre_provsioning.go +++ b/tests/e2e/pre_provsioning.go @@ -20,6 +20,7 @@ import ( "math/rand" "os" "strings" + "time" ebscsidriver "github.com/kubernetes-sigs/aws-ebs-csi-driver/pkg/driver" k8srestclient "k8s.io/client-go/rest" @@ -89,7 +90,8 @@ var _ = Describe("[ebs-csi-e2e] [single-az] Pre-Provisioned", func() { if err != nil { Fail(fmt.Sprintf("could not get NewCloud: %v", err)) } - disk, err := cloud.CreateDisk(context.Background(), "", diskOptions) + r1 := rand.New(rand.NewSource(time.Now().UnixNano())) + disk, err := cloud.CreateDisk(context.Background(), fmt.Sprintf("pvc-%d", r1.Uint64()), diskOptions) if err != nil { Fail(fmt.Sprintf("could not provision a volume: %v", err)) } diff --git a/tests/integration/setup_test.go b/tests/integration/setup_test.go index 10cec7b371..d1d3140ca3 100644 --- a/tests/integration/setup_test.go +++ b/tests/integration/setup_test.go @@ -32,6 +32,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" "google.golang.org/grpc" + "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/fake" ) @@ -110,7 +111,7 @@ func newMetadata() (cloud.MetadataService, error) { return nil, err } - return cloud.NewMetadataService(ec2metadata.New(s), fake.NewSimpleClientset()) + return cloud.NewMetadataService(func() (cloud.EC2Metadata, error) { return ec2metadata.New(s), nil }, func() (kubernetes.Interface, error) { return fake.NewSimpleClientset(), nil }) } func newEC2Client() (*ec2.EC2, error) { diff --git a/vendor/github.com/Microsoft/go-winio/go.mod b/vendor/github.com/Microsoft/go-winio/go.mod index 50b9d6e2ec..a2eb6496cf 100644 --- a/vendor/github.com/Microsoft/go-winio/go.mod +++ b/vendor/github.com/Microsoft/go-winio/go.mod @@ -3,7 +3,7 @@ module github.com/Microsoft/go-winio go 1.12 require ( - github.com/pkg/errors v0.8.1 + github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.4.1 golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 ) diff --git a/vendor/github.com/Microsoft/go-winio/go.sum b/vendor/github.com/Microsoft/go-winio/go.sum index 209aa8cf4d..6da76a492e 100644 --- a/vendor/github.com/Microsoft/go-winio/go.sum +++ b/vendor/github.com/Microsoft/go-winio/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/sirupsen/logrus v1.4.1 h1:GL2rEmy6nsikmW0r8opw9JIRScdMF5hA8cOYLH7In1k= @@ -12,7 +12,5 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/Microsoft/go-winio/pipe.go b/vendor/github.com/Microsoft/go-winio/pipe.go index ff96dff1c6..96700a73de 100644 --- a/vendor/github.com/Microsoft/go-winio/pipe.go +++ b/vendor/github.com/Microsoft/go-winio/pipe.go @@ -429,10 +429,10 @@ type PipeConfig struct { // when the pipe is in message mode. MessageMode bool - // InputBufferSize specifies the size the input buffer, in bytes. + // InputBufferSize specifies the size of the input buffer, in bytes. InputBufferSize int32 - // OutputBufferSize specifies the size the input buffer, in bytes. + // OutputBufferSize specifies the size of the output buffer, in bytes. OutputBufferSize int32 } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go index 03334d6920..74f35ccf0c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/client.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/client.go @@ -88,10 +88,6 @@ func (c *Client) NewRequest(operation *request.Operation, params interface{}, da // AddDebugHandlers injects debug logging handlers into the service to log request // debug information. func (c *Client) AddDebugHandlers() { - if !c.Config.LogLevel.AtLeast(aws.LogDebug) { - return - } - c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler) c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go index 8958c32d4e..1d774cfa25 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/client/logger.go @@ -53,6 +53,10 @@ var LogHTTPRequestHandler = request.NamedHandler{ } func logRequest(r *request.Request) { + if !r.Config.LogLevel.AtLeast(aws.LogDebug) { + return + } + logBody := r.Config.LogLevel.Matches(aws.LogDebugWithHTTPBody) bodySeekable := aws.IsReaderSeekable(r.Body) @@ -120,6 +124,10 @@ var LogHTTPResponseHandler = request.NamedHandler{ } func logResponse(r *request.Request) { + if !r.Config.LogLevel.AtLeast(aws.LogDebug) { + return + } + lw := &logWriter{r.Config.Logger, bytes.NewBuffer(nil)} if r.HTTPResponse == nil { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/config.go b/vendor/github.com/aws/aws-sdk-go/aws/config.go index 3b809e8478..39fa6d5fe7 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/config.go @@ -438,13 +438,6 @@ func (c *Config) WithDisableEndpointHostPrefix(t bool) *Config { return c } -// MergeIn merges the passed in configs into the existing config object. -func (c *Config) MergeIn(cfgs ...*Config) { - for _, other := range cfgs { - mergeInConfig(c, other) - } -} - // WithSTSRegionalEndpoint will set whether or not to use regional endpoint flag // when resolving the endpoint for a service func (c *Config) WithSTSRegionalEndpoint(sre endpoints.STSRegionalEndpoint) *Config { @@ -459,6 +452,27 @@ func (c *Config) WithS3UsEast1RegionalEndpoint(sre endpoints.S3UsEast1RegionalEn return c } +// WithLowerCaseHeaderMaps sets a config LowerCaseHeaderMaps value +// returning a Config pointer for chaining. +func (c *Config) WithLowerCaseHeaderMaps(t bool) *Config { + c.LowerCaseHeaderMaps = &t + return c +} + +// WithDisableRestProtocolURICleaning sets a config DisableRestProtocolURICleaning value +// returning a Config pointer for chaining. +func (c *Config) WithDisableRestProtocolURICleaning(t bool) *Config { + c.DisableRestProtocolURICleaning = &t + return c +} + +// MergeIn merges the passed in configs into the existing config object. +func (c *Config) MergeIn(cfgs ...*Config) { + for _, other := range cfgs { + mergeInConfig(c, other) + } +} + func mergeInConfig(dst *Config, other *Config) { if other == nil { return @@ -571,6 +585,10 @@ func mergeInConfig(dst *Config, other *Config) { if other.S3UsEast1RegionalEndpoint != endpoints.UnsetS3UsEast1Endpoint { dst.S3UsEast1RegionalEndpoint = other.S3UsEast1RegionalEndpoint } + + if other.LowerCaseHeaderMaps != nil { + dst.LowerCaseHeaderMaps = other.LowerCaseHeaderMaps + } } // Copy will return a shallow copy of the Config object. If any additional diff --git a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go index d95a5eb540..36a915efea 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/corehandlers/handlers.go @@ -178,7 +178,7 @@ func handleSendError(r *request.Request, err error) { var ValidateResponseHandler = request.NamedHandler{Name: "core.ValidateResponseHandler", Fn: func(r *request.Request) { if r.HTTPResponse.StatusCode == 0 || r.HTTPResponse.StatusCode >= 300 { // this may be replaced by an UnmarshalError handler - r.Error = awserr.New("UnknownError", "unknown error", nil) + r.Error = awserr.New("UnknownError", "unknown error", r.Error) } }} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go new file mode 100644 index 0000000000..18c940ab3c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/doc.go @@ -0,0 +1,60 @@ +// Package ssocreds provides a credential provider for retrieving temporary AWS credentials using an SSO access token. +// +// IMPORTANT: The provider in this package does not initiate or perform the AWS SSO login flow. The SDK provider +// expects that you have already performed the SSO login flow using AWS CLI using the "aws sso login" command, or by +// some other mechanism. The provider must find a valid non-expired access token for the AWS SSO user portal URL in +// ~/.aws/sso/cache. If a cached token is not found, it is expired, or the file is malformed an error will be returned. +// +// Loading AWS SSO credentials with the AWS shared configuration file +// +// You can use configure AWS SSO credentials from the AWS shared configuration file by +// providing the specifying the required keys in the profile: +// +// sso_account_id +// sso_region +// sso_role_name +// sso_start_url +// +// For example, the following defines a profile "devsso" and specifies the AWS SSO parameters that defines the target +// account, role, sign-on portal, and the region where the user portal is located. Note: all SSO arguments must be +// provided, or an error will be returned. +// +// [profile devsso] +// sso_start_url = https://my-sso-portal.awsapps.com/start +// sso_role_name = SSOReadOnlyRole +// sso_region = us-east-1 +// sso_account_id = 123456789012 +// +// Using the config module, you can load the AWS SDK shared configuration, and specify that this profile be used to +// retrieve credentials. For example: +// +// sess, err := session.NewSessionWithOptions(session.Options{ +// SharedConfigState: session.SharedConfigEnable, +// Profile: "devsso", +// }) +// if err != nil { +// return err +// } +// +// Programmatically loading AWS SSO credentials directly +// +// You can programmatically construct the AWS SSO Provider in your application, and provide the necessary information +// to load and retrieve temporary credentials using an access token from ~/.aws/sso/cache. +// +// svc := sso.New(sess, &aws.Config{ +// Region: aws.String("us-west-2"), // Client Region must correspond to the AWS SSO user portal region +// }) +// +// provider := ssocreds.NewCredentialsWithClient(svc, "123456789012", "SSOReadOnlyRole", "https://my-sso-portal.awsapps.com/start") +// +// credentials, err := provider.Get() +// if err != nil { +// return err +// } +// +// Additional Resources +// +// Configuring the AWS CLI to use AWS Single Sign-On: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html +// +// AWS Single Sign-On User Guide: https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html +package ssocreds diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go new file mode 100644 index 0000000000..ceca7dceec --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os.go @@ -0,0 +1,9 @@ +// +build !windows + +package ssocreds + +import "os" + +func getHomeDirectory() string { + return os.Getenv("HOME") +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go new file mode 100644 index 0000000000..eb48f61e5b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/os_windows.go @@ -0,0 +1,7 @@ +package ssocreds + +import "os" + +func getHomeDirectory() string { + return os.Getenv("USERPROFILE") +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go new file mode 100644 index 0000000000..6eda2a5557 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/ssocreds/provider.go @@ -0,0 +1,180 @@ +package ssocreds + +import ( + "crypto/sha1" + "encoding/hex" + "encoding/json" + "fmt" + "io/ioutil" + "path/filepath" + "strings" + "time" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/service/sso" + "github.com/aws/aws-sdk-go/service/sso/ssoiface" +) + +// ErrCodeSSOProviderInvalidToken is the code type that is returned if loaded token has expired or is otherwise invalid. +// To refresh the SSO session run aws sso login with the corresponding profile. +const ErrCodeSSOProviderInvalidToken = "SSOProviderInvalidToken" + +const invalidTokenMessage = "the SSO session has expired or is invalid" + +func init() { + nowTime = time.Now + defaultCacheLocation = defaultCacheLocationImpl +} + +var nowTime func() time.Time + +// ProviderName is the name of the provider used to specify the source of credentials. +const ProviderName = "SSOProvider" + +var defaultCacheLocation func() string + +func defaultCacheLocationImpl() string { + return filepath.Join(getHomeDirectory(), ".aws", "sso", "cache") +} + +// Provider is an AWS credential provider that retrieves temporary AWS credentials by exchanging an SSO login token. +type Provider struct { + credentials.Expiry + + // The Client which is configured for the AWS Region where the AWS SSO user portal is located. + Client ssoiface.SSOAPI + + // The AWS account that is assigned to the user. + AccountID string + + // The role name that is assigned to the user. + RoleName string + + // The URL that points to the organization's AWS Single Sign-On (AWS SSO) user portal. + StartURL string +} + +// NewCredentials returns a new AWS Single Sign-On (AWS SSO) credential provider. The ConfigProvider is expected to be configured +// for the AWS Region where the AWS SSO user portal is located. +func NewCredentials(configProvider client.ConfigProvider, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials { + return NewCredentialsWithClient(sso.New(configProvider), accountID, roleName, startURL, optFns...) +} + +// NewCredentialsWithClient returns a new AWS Single Sign-On (AWS SSO) credential provider. The provided client is expected to be configured +// for the AWS Region where the AWS SSO user portal is located. +func NewCredentialsWithClient(client ssoiface.SSOAPI, accountID, roleName, startURL string, optFns ...func(provider *Provider)) *credentials.Credentials { + p := &Provider{ + Client: client, + AccountID: accountID, + RoleName: roleName, + StartURL: startURL, + } + + for _, fn := range optFns { + fn(p) + } + + return credentials.NewCredentials(p) +} + +// Retrieve retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal +// by exchanging the accessToken present in ~/.aws/sso/cache. +func (p *Provider) Retrieve() (credentials.Value, error) { + return p.RetrieveWithContext(aws.BackgroundContext()) +} + +// RetrieveWithContext retrieves temporary AWS credentials from the configured Amazon Single Sign-On (AWS SSO) user portal +// by exchanging the accessToken present in ~/.aws/sso/cache. +func (p *Provider) RetrieveWithContext(ctx credentials.Context) (credentials.Value, error) { + tokenFile, err := loadTokenFile(p.StartURL) + if err != nil { + return credentials.Value{}, err + } + + output, err := p.Client.GetRoleCredentialsWithContext(ctx, &sso.GetRoleCredentialsInput{ + AccessToken: &tokenFile.AccessToken, + AccountId: &p.AccountID, + RoleName: &p.RoleName, + }) + if err != nil { + return credentials.Value{}, err + } + + expireTime := time.Unix(0, aws.Int64Value(output.RoleCredentials.Expiration)*int64(time.Millisecond)).UTC() + p.SetExpiration(expireTime, 0) + + return credentials.Value{ + AccessKeyID: aws.StringValue(output.RoleCredentials.AccessKeyId), + SecretAccessKey: aws.StringValue(output.RoleCredentials.SecretAccessKey), + SessionToken: aws.StringValue(output.RoleCredentials.SessionToken), + ProviderName: ProviderName, + }, nil +} + +func getCacheFileName(url string) (string, error) { + hash := sha1.New() + _, err := hash.Write([]byte(url)) + if err != nil { + return "", err + } + return strings.ToLower(hex.EncodeToString(hash.Sum(nil))) + ".json", nil +} + +type rfc3339 time.Time + +func (r *rfc3339) UnmarshalJSON(bytes []byte) error { + var value string + + if err := json.Unmarshal(bytes, &value); err != nil { + return err + } + + parse, err := time.Parse(time.RFC3339, value) + if err != nil { + return fmt.Errorf("expected RFC3339 timestamp: %v", err) + } + + *r = rfc3339(parse) + + return nil +} + +type token struct { + AccessToken string `json:"accessToken"` + ExpiresAt rfc3339 `json:"expiresAt"` + Region string `json:"region,omitempty"` + StartURL string `json:"startUrl,omitempty"` +} + +func (t token) Expired() bool { + return nowTime().Round(0).After(time.Time(t.ExpiresAt)) +} + +func loadTokenFile(startURL string) (t token, err error) { + key, err := getCacheFileName(startURL) + if err != nil { + return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) + } + + fileBytes, err := ioutil.ReadFile(filepath.Join(defaultCacheLocation(), key)) + if err != nil { + return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) + } + + if err := json.Unmarshal(fileBytes, &t); err != nil { + return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, err) + } + + if len(t.AccessToken) == 0 { + return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil) + } + + if t.Expired() { + return token{}, awserr.New(ErrCodeSSOProviderInvalidToken, invalidTokenMessage, nil) + } + + return t, nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go index 6846ef6f80..260a37cbba 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/credentials/stscreds/assume_role_provider.go @@ -95,7 +95,7 @@ import ( // StdinTokenProvider will prompt on stderr and read from stdin for a string value. // An error is returned if reading from stdin fails. // -// Use this function go read MFA tokens from stdin. The function makes no attempt +// Use this function to read MFA tokens from stdin. The function makes no attempt // to make atomic prompts from stdin across multiple gorouties. // // Using StdinTokenProvider with multiple AssumeRoleProviders, or Credentials will @@ -244,9 +244,11 @@ type AssumeRoleProvider struct { MaxJitterFrac float64 } -// NewCredentials returns a pointer to a new Credentials object wrapping the +// NewCredentials returns a pointer to a new Credentials value wrapping the // AssumeRoleProvider. The credentials will expire every 15 minutes and the -// role will be named after a nanosecond timestamp of this operation. +// role will be named after a nanosecond timestamp of this operation. The +// Credentials value will attempt to refresh the credentials using the provider +// when Credentials.Get is called, if the cached credentials are expiring. // // Takes a Config provider to create the STS client. The ConfigProvider is // satisfied by the session.Session type. @@ -268,9 +270,11 @@ func NewCredentials(c client.ConfigProvider, roleARN string, options ...func(*As return credentials.NewCredentials(p) } -// NewCredentialsWithClient returns a pointer to a new Credentials object wrapping the +// NewCredentialsWithClient returns a pointer to a new Credentials value wrapping the // AssumeRoleProvider. The credentials will expire every 15 minutes and the -// role will be named after a nanosecond timestamp of this operation. +// role will be named after a nanosecond timestamp of this operation. The +// Credentials value will attempt to refresh the credentials using the provider +// when Credentials.Get is called, if the cached credentials are expiring. // // Takes an AssumeRoler which can be satisfied by the STS client. // diff --git a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go index 8f35b3464b..df63bade10 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/ec2metadata/service.go @@ -13,7 +13,6 @@ package ec2metadata import ( "bytes" - "errors" "io" "net/http" "net/url" @@ -234,7 +233,8 @@ func unmarshalError(r *request.Request) { // Response body format is not consistent between metadata endpoints. // Grab the error message as a string and include that as the source error - r.Error = awserr.NewRequestFailure(awserr.New("EC2MetadataError", "failed to make EC2Metadata request", errors.New(b.String())), + r.Error = awserr.NewRequestFailure( + awserr.New("EC2MetadataError", "failed to make EC2Metadata request\n"+b.String(), nil), r.HTTPResponse.StatusCode, r.RequestID) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go index 654fb1ad52..b98ea86981 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/decode.go @@ -81,7 +81,6 @@ func decodeV3Endpoints(modelDef modelDefinition, opts DecodeModelOptions) (Resol // Customization for i := 0; i < len(ps); i++ { p := &ps[i] - custAddEC2Metadata(p) custAddS3DualStack(p) custRegionalS3(p) custRmIotDataService(p) @@ -140,19 +139,6 @@ func custAddDualstack(p *partition, svcName string) { p.Services[svcName] = s } -func custAddEC2Metadata(p *partition) { - p.Services["ec2metadata"] = service{ - IsRegionalized: boxedFalse, - PartitionEndpoint: "aws-global", - Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "169.254.169.254/latest", - Protocols: []string{"http"}, - }, - }, - } -} - func custRmIotDataService(p *partition) { delete(p.Services, "data.iot") } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index 76b2a401c2..bb7c47d5d3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -21,6 +21,7 @@ const ( ApEast1RegionID = "ap-east-1" // Asia Pacific (Hong Kong). ApNortheast1RegionID = "ap-northeast-1" // Asia Pacific (Tokyo). ApNortheast2RegionID = "ap-northeast-2" // Asia Pacific (Seoul). + ApNortheast3RegionID = "ap-northeast-3" // Asia Pacific (Osaka). ApSouth1RegionID = "ap-south-1" // Asia Pacific (Mumbai). ApSoutheast1RegionID = "ap-southeast-1" // Asia Pacific (Singapore). ApSoutheast2RegionID = "ap-southeast-2" // Asia Pacific (Sydney). @@ -121,6 +122,9 @@ var awsPartition = partition{ "ap-northeast-2": region{ Description: "Asia Pacific (Seoul)", }, + "ap-northeast-3": region{ + Description: "Asia Pacific (Osaka)", + }, "ap-south-1": region{ Description: "Asia Pacific (Mumbai)", }, @@ -184,6 +188,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -239,6 +244,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -296,6 +302,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -358,6 +365,23 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "amplifybackend": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "api.detective": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -380,9 +404,33 @@ var awsPartition = partition{ "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "api.detective-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-east-2": endpoint{}, + "us-east-2-fips": endpoint{ + Hostname: "api.detective-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "us-west-1": endpoint{}, + "us-west-1-fips": endpoint{ + Hostname: "api.detective-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "api.detective-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "api.ecr": service{ @@ -412,6 +460,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "ap-northeast-3": endpoint{ + Hostname: "api.ecr.ap-northeast-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "ap-south-1": endpoint{ Hostname: "api.ecr.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -581,6 +635,48 @@ var awsPartition = partition{ }, }, }, + "api.fleethub.iot": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "api.fleethub.iot-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "api.fleethub.iot-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "api.fleethub.iot-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "api.fleethub.iot-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "api.mediatailor": service{ Endpoints: endpoints{ @@ -660,6 +756,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -678,9 +775,23 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "app-integrations": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "appflow": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -707,6 +818,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -728,6 +840,7 @@ var awsPartition = partition{ "appmesh": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -749,6 +862,16 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "apprunner": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "appstream2": service{ Defaults: endpoint{ Protocols: []string{"https"}, @@ -764,6 +887,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, "fips": endpoint{ Hostname: "appstream2-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ @@ -780,6 +904,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -815,12 +940,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "athena-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "athena-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "athena-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "athena-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "autoscaling": service{ @@ -832,6 +981,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -859,6 +1009,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -884,6 +1035,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -905,9 +1057,11 @@ var awsPartition = partition{ "batch": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1037,6 +1191,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1210,7 +1365,10 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, @@ -1219,6 +1377,7 @@ var awsPartition = partition{ "codebuild": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -1270,6 +1429,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1301,6 +1461,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1343,9 +1504,25 @@ var awsPartition = partition{ }, }, }, + "codeguru-reviewer": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "codepipeline": service{ Endpoints: endpoints{ + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -1354,6 +1531,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -1465,11 +1643,12 @@ var awsPartition = partition{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "cognito-idp": service{ @@ -1498,17 +1677,24 @@ var awsPartition = partition{ Region: "us-east-2", }, }, + "fips-us-west-1": endpoint{ + Hostname: "cognito-idp-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, "fips-us-west-2": endpoint{ Hostname: "cognito-idp-fips.us-west-2.amazonaws.com", CredentialScope: credentialScope{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "cognito-sync": service{ @@ -1601,6 +1787,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1649,6 +1836,7 @@ var awsPartition = partition{ "ap-northeast-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, @@ -1658,7 +1846,11 @@ var awsPartition = partition{ "contact-lens": service{ Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-2": endpoint{}, "us-east-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -1795,6 +1987,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1856,6 +2049,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -1976,6 +2170,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2033,6 +2228,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2095,6 +2291,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2152,6 +2349,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2200,17 +2398,6 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, - "ec2metadata": service{ - PartitionEndpoint: "aws-global", - IsRegionalized: boxedFalse, - - Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "169.254.169.254/latest", - Protocols: []string{"http"}, - }, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -2218,6 +2405,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2269,6 +2457,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2318,6 +2507,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2349,6 +2539,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2398,6 +2589,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2432,6 +2624,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "fips-ap-northeast-3": endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "fips-ap-south-1": endpoint{ Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2545,6 +2743,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2597,6 +2796,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2673,6 +2873,27 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "emr-containers": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "entitlement.marketplace": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -2690,6 +2911,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2721,6 +2943,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2763,6 +2986,26 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "finspace": service{ + + Endpoints: endpoints{ + "ca-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, + "finspace-api": service{ + + Endpoints: endpoints{ + "ca-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "firehose": service{ Endpoints: endpoints{ @@ -2770,6 +3013,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2821,6 +3065,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -2831,6 +3076,18 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, + "fips-af-south-1": endpoint{ + Hostname: "fms-fips.af-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "af-south-1", + }, + }, + "fips-ap-east-1": endpoint{ + Hostname: "fms-fips.ap-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-east-1", + }, + }, "fips-ap-northeast-1": endpoint{ Hostname: "fms-fips.ap-northeast-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2873,7 +3130,13 @@ var awsPartition = partition{ Region: "eu-central-1", }, }, - "fips-eu-west-1": endpoint{ + "fips-eu-south-1": endpoint{ + Hostname: "fms-fips.eu-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-south-1", + }, + }, + "fips-eu-west-1": endpoint{ Hostname: "fms-fips.eu-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "eu-west-1", @@ -2891,6 +3154,12 @@ var awsPartition = partition{ Region: "eu-west-3", }, }, + "fips-me-south-1": endpoint{ + Hostname: "fms-fips.me-south-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "me-south-1", + }, + }, "fips-sa-east-1": endpoint{ Hostname: "fms-fips.sa-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -2939,9 +3208,27 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "forecast-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "forecast-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "forecast-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "forecastquery": service{ @@ -2954,14 +3241,33 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "forecastquery-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "forecastquery-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "forecastquery-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "fsx": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -2971,19 +3277,53 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-prod-ca-central-1": endpoint{ + Hostname: "fsx-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-prod-us-east-1": endpoint{ + Hostname: "fsx-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-prod-us-east-2": endpoint{ + Hostname: "fsx-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-prod-us-west-1": endpoint{ + Hostname: "fsx-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-prod-us-west-2": endpoint{ + Hostname: "fsx-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "gamelift": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -2991,8 +3331,12 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "me-south-1": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, "us-east-2": endpoint{}, @@ -3009,6 +3353,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3064,6 +3409,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3129,9 +3475,17 @@ var awsPartition = partition{ Endpoints: endpoints{ "af-south-1": endpoint{}, + "ap-northeast-2": endpoint{}, "ap-southeast-2": endpoint{}, + "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "groundstation-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, "fips-us-east-2": endpoint{ Hostname: "groundstation-fips.us-east-2.amazonaws.com", CredentialScope: credentialScope{ @@ -3145,6 +3499,7 @@ var awsPartition = partition{ }, }, "me-south-1": endpoint{}, + "us-east-1": endpoint{}, "us-east-2": endpoint{}, "us-west-2": endpoint{}, }, @@ -3159,6 +3514,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3212,6 +3568,16 @@ var awsPartition = partition{ }, }, }, + "healthlake": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "honeycode": service{ Endpoints: endpoints{ @@ -3468,6 +3834,41 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "iotwireless": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{ + Hostname: "api.iotwireless.ap-northeast-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-1", + }, + }, + "ap-southeast-2": endpoint{ + Hostname: "api.iotwireless.ap-southeast-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-southeast-2", + }, + }, + "eu-west-1": endpoint{ + Hostname: "api.iotwireless.eu-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-1", + }, + }, + "us-east-1": endpoint{ + Hostname: "api.iotwireless.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-west-2": endpoint{ + Hostname: "api.iotwireless.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + }, + }, "kafka": service{ Endpoints: endpoints{ @@ -3499,6 +3900,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3592,6 +3994,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3613,6 +4016,8 @@ var awsPartition = partition{ "lakeformation": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -3649,11 +4054,12 @@ var awsPartition = partition{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "lambda": service{ @@ -3663,6 +4069,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3712,6 +4119,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3764,6 +4172,7 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3779,6 +4188,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -3821,6 +4231,14 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "lookoutequipment": service{ + + Endpoints: endpoints{ + "ap-northeast-2": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + }, + }, "lookoutvision": service{ Endpoints: endpoints{ @@ -3862,15 +4280,18 @@ var awsPartition = partition{ "macie2": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -3898,11 +4319,12 @@ var awsPartition = partition{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "managedblockchain": service{ @@ -4046,6 +4468,7 @@ var awsPartition = partition{ "eu-west-3": endpoint{}, "sa-east-1": endpoint{}, "us-east-1": endpoint{}, + "us-east-2": endpoint{}, "us-west-1": endpoint{}, "us-west-2": endpoint{}, }, @@ -4075,6 +4498,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4125,7 +4549,19 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "models-fips.lex.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "models-fips.lex.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "monitoring": service{ @@ -4137,6 +4573,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4185,6 +4622,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4413,6 +4851,12 @@ var awsPartition = partition{ Region: "eu-west-2", }, }, + "eu-west-3": endpoint{ + Hostname: "oidc.eu-west-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "eu-west-3", + }, + }, "us-east-1": endpoint{ Hostname: "oidc.us-east-1.amazonaws.com", CredentialScope: credentialScope{ @@ -4493,6 +4937,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4541,6 +4986,22 @@ var awsPartition = partition{ "us-west-2": endpoint{}, }, }, + "personalize": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "pinpoint": service{ Defaults: endpoint{ CredentialScope: credentialScope{ @@ -4689,6 +5150,19 @@ var awsPartition = partition{ }, }, }, + "profile": service{ + + Endpoints: endpoints{ + "ap-northeast-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-west-2": endpoint{}, + "us-east-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "projects.iot1click": service{ Endpoints: endpoints{ @@ -4710,9 +5184,28 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "eu-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "qldb-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "qldb-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "qldb-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "ram": service{ @@ -4722,6 +5215,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4732,12 +5226,42 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "ram-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "ram-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "ram-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "ram-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "ram-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "rds": service{ @@ -4747,6 +5271,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4804,6 +5329,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4907,6 +5433,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -4995,6 +5522,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5027,7 +5555,19 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "us-east-1": endpoint{}, - "us-west-2": endpoint{}, + "us-east-1-fips": endpoint{ + Hostname: "runtime-fips.lex.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "us-west-2": endpoint{}, + "us-west-2-fips": endpoint{ + Hostname: "runtime-fips.lex.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, }, }, "runtime.sagemaker": service{ @@ -5090,6 +5630,90 @@ var awsPartition = partition{ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}", }, Endpoints: endpoints{ + "accesspoint-af-south-1": endpoint{ + Hostname: "s3-accesspoint.af-south-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-east-1": endpoint{ + Hostname: "s3-accesspoint.ap-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-northeast-1": endpoint{ + Hostname: "s3-accesspoint.ap-northeast-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-northeast-2": endpoint{ + Hostname: "s3-accesspoint.ap-northeast-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-northeast-3": endpoint{ + Hostname: "s3-accesspoint.ap-northeast-3.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-south-1": endpoint{ + Hostname: "s3-accesspoint.ap-south-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-southeast-1": endpoint{ + Hostname: "s3-accesspoint.ap-southeast-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ap-southeast-2": endpoint{ + Hostname: "s3-accesspoint.ap-southeast-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-ca-central-1": endpoint{ + Hostname: "s3-accesspoint.ca-central-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-eu-central-1": endpoint{ + Hostname: "s3-accesspoint.eu-central-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-eu-north-1": endpoint{ + Hostname: "s3-accesspoint.eu-north-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-eu-south-1": endpoint{ + Hostname: "s3-accesspoint.eu-south-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-eu-west-1": endpoint{ + Hostname: "s3-accesspoint.eu-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-eu-west-2": endpoint{ + Hostname: "s3-accesspoint.eu-west-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-eu-west-3": endpoint{ + Hostname: "s3-accesspoint.eu-west-3.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-me-south-1": endpoint{ + Hostname: "s3-accesspoint.me-south-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-sa-east-1": endpoint{ + Hostname: "s3-accesspoint.sa-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-us-east-1": endpoint{ + Hostname: "s3-accesspoint.us-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-us-east-2": endpoint{ + Hostname: "s3-accesspoint.us-east-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-us-west-1": endpoint{ + Hostname: "s3-accesspoint.us-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-us-west-2": endpoint{ + Hostname: "s3-accesspoint.us-west-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{ @@ -5097,6 +5721,7 @@ var awsPartition = partition{ SignatureVersions: []string{"s3", "s3v4"}, }, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{ Hostname: "s3.ap-southeast-1.amazonaws.com", @@ -5121,8 +5746,28 @@ var awsPartition = partition{ Hostname: "s3.eu-west-1.amazonaws.com", SignatureVersions: []string{"s3", "s3v4"}, }, - "eu-west-2": endpoint{}, - "eu-west-3": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-accesspoint-ca-central-1": endpoint{ + Hostname: "s3-accesspoint-fips.ca-central-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "fips-accesspoint-us-east-1": endpoint{ + Hostname: "s3-accesspoint-fips.us-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "fips-accesspoint-us-east-2": endpoint{ + Hostname: "s3-accesspoint-fips.us-east-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "fips-accesspoint-us-west-1": endpoint{ + Hostname: "s3-accesspoint-fips.us-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "fips-accesspoint-us-west-2": endpoint{ + Hostname: "s3-accesspoint-fips.us-west-2.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, "me-south-1": endpoint{}, "s3-external-1": endpoint{ Hostname: "s3-external-1.amazonaws.com", @@ -5173,6 +5818,13 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "ap-northeast-3": endpoint{ + Hostname: "s3-control.ap-northeast-3.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "ap-south-1": endpoint{ Hostname: "s3-control.ap-south-1.amazonaws.com", SignatureVersions: []string{"s3v4"}, @@ -5368,6 +6020,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5417,6 +6070,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5527,6 +6181,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5569,9 +6224,65 @@ var awsPartition = partition{ }, }, }, + "servicecatalog-appregistry": service{ + + Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, + "ap-northeast-1": endpoint{}, + "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, + "ap-southeast-1": endpoint{}, + "ap-southeast-2": endpoint{}, + "ca-central-1": endpoint{}, + "eu-central-1": endpoint{}, + "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, + "eu-west-1": endpoint{}, + "eu-west-2": endpoint{}, + "eu-west-3": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "servicecatalog-appregistry-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "servicecatalog-appregistry-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "servicecatalog-appregistry-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "servicecatalog-appregistry-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "servicecatalog-appregistry-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, + }, + }, "servicediscovery": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, @@ -5581,6 +6292,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -5607,6 +6319,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5634,9 +6347,28 @@ var awsPartition = partition{ "ap-southeast-2": endpoint{}, "eu-central-1": endpoint{}, "eu-west-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-2": endpoint{}, + "eu-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "session.qldb-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "session.qldb-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "session.qldb-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-2": endpoint{}, }, }, "shield": service{ @@ -5717,6 +6449,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5839,6 +6572,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5891,6 +6625,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5942,6 +6677,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -5997,6 +6733,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6046,6 +6783,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6142,6 +6880,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6209,6 +6948,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6258,6 +6998,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6343,6 +7084,8 @@ var awsPartition = partition{ "transfer": service{ Endpoints: endpoints{ + "af-south-1": endpoint{}, + "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, "ap-south-1": endpoint{}, @@ -6351,6 +7094,7 @@ var awsPartition = partition{ "ca-central-1": endpoint{}, "eu-central-1": endpoint{}, "eu-north-1": endpoint{}, + "eu-south-1": endpoint{}, "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, @@ -6384,11 +7128,12 @@ var awsPartition = partition{ Region: "us-west-2", }, }, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "translate": service{ @@ -6478,6 +7223,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "ap-northeast-3": endpoint{ + Hostname: "waf-regional.ap-northeast-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "ap-south-1": endpoint{ Hostname: "waf-regional.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -6562,6 +7313,12 @@ var awsPartition = partition{ Region: "ap-northeast-2", }, }, + "fips-ap-northeast-3": endpoint{ + Hostname: "waf-regional-fips.ap-northeast-3.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ap-northeast-3", + }, + }, "fips-ap-south-1": endpoint{ Hostname: "waf-regional-fips.ap-south-1.amazonaws.com", CredentialScope: credentialScope{ @@ -6734,6 +7491,7 @@ var awsPartition = partition{ Endpoints: endpoints{ "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, "ca-central-1": endpoint{}, @@ -6764,6 +7522,7 @@ var awsPartition = partition{ "ap-east-1": endpoint{}, "ap-northeast-1": endpoint{}, "ap-northeast-2": endpoint{}, + "ap-northeast-3": endpoint{}, "ap-south-1": endpoint{}, "ap-southeast-1": endpoint{}, "ap-southeast-2": endpoint{}, @@ -6774,12 +7533,36 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-us-east-1": endpoint{ + Hostname: "xray-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "xray-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "xray-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "xray-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, }, @@ -7071,17 +7854,6 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, - "ec2metadata": service{ - PartitionEndpoint: "aws-global", - IsRegionalized: boxedFalse, - - Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "169.254.169.254/latest", - Protocols: []string{"http"}, - }, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -7208,6 +7980,16 @@ var awscnPartition = partition{ "cn-north-1": endpoint{}, }, }, + "guardduty": service{ + IsRegionalized: boxedTrue, + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "health": service{ Endpoints: endpoints{ @@ -7300,7 +8082,8 @@ var awscnPartition = partition{ "lakeformation": service{ Endpoints: endpoints{ - "cn-north-1": endpoint{}, + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, }, }, "lambda": service{ @@ -7344,6 +8127,13 @@ var awscnPartition = partition{ "cn-northwest-1": endpoint{}, }, }, + "mq": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "neptune": service{ Endpoints: endpoints{ @@ -7368,6 +8158,12 @@ var awscnPartition = partition{ }, }, }, + "personalize": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + }, + }, "polly": service{ Endpoints: endpoints{ @@ -7415,6 +8211,15 @@ var awscnPartition = partition{ }, }, }, + "route53resolver": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "runtime.sagemaker": service{ Endpoints: endpoints{ @@ -7431,6 +8236,14 @@ var awscnPartition = partition{ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}", }, Endpoints: endpoints{ + "accesspoint-cn-north-1": endpoint{ + Hostname: "s3-accesspoint.cn-north-1.amazonaws.com.cn", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-cn-northwest-1": endpoint{ + Hostname: "s3-accesspoint.cn-northwest-1.amazonaws.com.cn", + SignatureVersions: []string{"s3v4"}, + }, "cn-north-1": endpoint{}, "cn-northwest-1": endpoint{}, }, @@ -7487,6 +8300,13 @@ var awscnPartition = partition{ }, }, }, + "servicecatalog": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, "servicediscovery": service{ Endpoints: endpoints{ @@ -7624,6 +8444,49 @@ var awscnPartition = partition{ }, }, }, + "transcribestreaming": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "transfer": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{}, + "cn-northwest-1": endpoint{}, + }, + }, + "waf-regional": service{ + + Endpoints: endpoints{ + "cn-north-1": endpoint{ + Hostname: "waf-regional.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + "cn-northwest-1": endpoint{ + Hostname: "waf-regional.cn-northwest-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, + "fips-cn-north-1": endpoint{ + Hostname: "waf-regional-fips.cn-north-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-north-1", + }, + }, + "fips-cn-northwest-1": endpoint{ + Hostname: "waf-regional-fips.cn-northwest-1.amazonaws.com.cn", + CredentialScope: credentialScope{ + Region: "cn-northwest-1", + }, + }, + }, + }, "workspaces": service{ Endpoints: endpoints{ @@ -7724,6 +8587,27 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "api.detective": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "us-gov-east-1": endpoint{}, + "us-gov-east-1-fips": endpoint{ + Hostname: "api.detective-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "api.detective-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "api.ecr": service{ Endpoints: endpoints{ @@ -8082,6 +8966,12 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "connect": service{ + + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + }, + }, "datasync": service{ Endpoints: endpoints{ @@ -8204,17 +9094,6 @@ var awsusgovPartition = partition{ }, }, }, - "ec2metadata": service{ - PartitionEndpoint: "aws-global", - IsRegionalized: boxedFalse, - - Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "169.254.169.254/latest", - Protocols: []string{"http"}, - }, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -8407,6 +9286,46 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "fms": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "fms-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "fms-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "fsx": service{ + + Endpoints: endpoints{ + "fips-prod-us-gov-east-1": endpoint{ + Hostname: "fsx-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-prod-us-gov-west-1": endpoint{ + Hostname: "fsx-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "glacier": service{ Endpoints: endpoints{ @@ -8468,7 +9387,12 @@ var awsusgovPartition = partition{ Region: "us-gov-east-1", }, }, - "us-gov-east-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "greengrass.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{ Hostname: "greengrass.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ @@ -8699,6 +9623,22 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "models.lex": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "lex", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "models-fips.lex.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "monitoring": service{ Endpoints: endpoints{ @@ -8718,6 +9658,25 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "mq": service{ + + Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "mq-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "mq-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "neptune": service{ Endpoints: endpoints{ @@ -8807,8 +9766,18 @@ var awsusgovPartition = partition{ "ram": service{ Endpoints: endpoints{ - "us-gov-east-1": endpoint{}, - "us-gov-west-1": endpoint{}, + "us-gov-east-1": endpoint{ + Hostname: "ram.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "us-gov-west-1": endpoint{ + Hostname: "ram.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "rds": service{ @@ -8904,10 +9873,32 @@ var awsusgovPartition = partition{ "us-gov-west-1": endpoint{}, }, }, + "runtime.lex": service{ + Defaults: endpoint{ + CredentialScope: credentialScope{ + Service: "lex", + }, + }, + Endpoints: endpoints{ + "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "runtime-fips.lex.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + }, + }, "runtime.sagemaker": service{ Endpoints: endpoints{ "us-gov-west-1": endpoint{}, + "us-gov-west-1-fips": endpoint{ + Hostname: "runtime.sagemaker.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, }, }, "s3": service{ @@ -8918,6 +9909,22 @@ var awsusgovPartition = partition{ DualStackHostname: "{service}.dualstack.{region}.{dnsSuffix}", }, Endpoints: endpoints{ + "accesspoint-us-gov-east-1": endpoint{ + Hostname: "s3-accesspoint.us-gov-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "accesspoint-us-gov-west-1": endpoint{ + Hostname: "s3-accesspoint.us-gov-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "fips-accesspoint-us-gov-east-1": endpoint{ + Hostname: "s3-accesspoint-fips.us-gov-east-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, + "fips-accesspoint-us-gov-west-1": endpoint{ + Hostname: "s3-accesspoint-fips.us-gov-west-1.amazonaws.com", + SignatureVersions: []string{"s3v4"}, + }, "fips-us-gov-west-1": endpoint{ Hostname: "s3-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ @@ -9051,6 +10058,46 @@ var awsusgovPartition = partition{ }, }, }, + "servicecatalog-appregistry": service{ + + Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "servicecatalog-appregistry.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "servicecatalog-appregistry.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, + "servicequotas": service{ + Defaults: endpoint{ + Protocols: []string{"https"}, + }, + Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "servicequotas.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "servicequotas.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, + "us-gov-east-1": endpoint{}, + "us-gov-west-1": endpoint{}, + }, + }, "sms": service{ Endpoints: endpoints{ @@ -9318,12 +10365,24 @@ var awsusgovPartition = partition{ "waf-regional": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "waf-regional-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "fips-us-gov-west-1": endpoint{ Hostname: "waf-regional-fips.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ Region: "us-gov-west-1", }, }, + "us-gov-east-1": endpoint{ + Hostname: "waf-regional.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, "us-gov-west-1": endpoint{ Hostname: "waf-regional.us-gov-west-1.amazonaws.com", CredentialScope: credentialScope{ @@ -9347,6 +10406,18 @@ var awsusgovPartition = partition{ "xray": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "xray-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "xray-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, @@ -9495,26 +10566,27 @@ var awsisoPartition = partition{ "us-iso-east-1": endpoint{}, }, }, - "ec2metadata": service{ - PartitionEndpoint: "aws-global", - IsRegionalized: boxedFalse, + "ecs": service{ Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "169.254.169.254/latest", - Protocols: []string{"http"}, - }, + "us-iso-east-1": endpoint{}, }, }, - "ecs": service{ + "elasticache": service{ Endpoints: endpoints{ "us-iso-east-1": endpoint{}, }, }, - "elasticache": service{ + "elasticfilesystem": service{ Endpoints: endpoints{ + "fips-us-iso-east-1": endpoint{ + Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + }, "us-iso-east-1": endpoint{}, }, }, @@ -9546,6 +10618,12 @@ var awsisoPartition = partition{ "us-iso-east-1": endpoint{}, }, }, + "firehose": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "glacier": service{ Endpoints: endpoints{ @@ -9603,12 +10681,36 @@ var awsisoPartition = partition{ "us-iso-east-1": endpoint{}, }, }, + "medialive": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "mediapackage": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "monitoring": service{ Endpoints: endpoints{ "us-iso-east-1": endpoint{}, }, }, + "outposts": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, + "ram": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "rds": service{ Endpoints: endpoints{ @@ -9651,6 +10753,12 @@ var awsisoPartition = partition{ }, }, }, + "secretsmanager": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "snowball": service{ Endpoints: endpoints{ @@ -9673,6 +10781,12 @@ var awsisoPartition = partition{ }, }, }, + "ssm": service{ + + Endpoints: endpoints{ + "us-iso-east-1": endpoint{}, + }, + }, "states": service{ Endpoints: endpoints{ @@ -9858,17 +10972,6 @@ var awsisobPartition = partition{ "us-isob-east-1": endpoint{}, }, }, - "ec2metadata": service{ - PartitionEndpoint: "aws-global", - IsRegionalized: boxedFalse, - - Endpoints: endpoints{ - "aws-global": endpoint{ - Hostname: "169.254.169.254/latest", - Protocols: []string{"http"}, - }, - }, - }, "ecs": service{ Endpoints: endpoints{ @@ -9986,6 +11089,19 @@ var awsisobPartition = partition{ "us-isob-east-1": endpoint{}, }, }, + "route53": service{ + PartitionEndpoint: "aws-iso-b-global", + IsRegionalized: boxedFalse, + + Endpoints: endpoints{ + "aws-iso-b-global": endpoint{ + Hostname: "route53.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + }, + }, + }, "s3": service{ Defaults: endpoint{ Protocols: []string{"http", "https"}, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go index ca956e5f12..8e8636f5f8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/endpoints.go @@ -48,6 +48,9 @@ type Options struct { // This option is ignored if StrictMatching is enabled. ResolveUnknownService bool + // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) + EC2MetadataEndpointMode EC2IMDSEndpointModeState + // STS Regional Endpoint flag helps with resolving the STS endpoint STSRegionalEndpoint STSRegionalEndpoint @@ -55,6 +58,33 @@ type Options struct { S3UsEast1RegionalEndpoint S3UsEast1RegionalEndpoint } +// EC2IMDSEndpointModeState is an enum configuration variable describing the client endpoint mode. +type EC2IMDSEndpointModeState uint + +// Enumeration values for EC2IMDSEndpointModeState +const ( + EC2IMDSEndpointModeStateUnset EC2IMDSEndpointModeState = iota + EC2IMDSEndpointModeStateIPv4 + EC2IMDSEndpointModeStateIPv6 +) + +// SetFromString sets the EC2IMDSEndpointModeState based on the provided string value. Unknown values will default to EC2IMDSEndpointModeStateUnset +func (e *EC2IMDSEndpointModeState) SetFromString(v string) error { + v = strings.TrimSpace(v) + + switch { + case len(v) == 0: + *e = EC2IMDSEndpointModeStateUnset + case strings.EqualFold(v, "IPv6"): + *e = EC2IMDSEndpointModeStateIPv6 + case strings.EqualFold(v, "IPv4"): + *e = EC2IMDSEndpointModeStateIPv4 + default: + return fmt.Errorf("unknown EC2 IMDS endpoint mode, must be either IPv6 or IPv4") + } + return nil +} + // STSRegionalEndpoint is an enum for the states of the STS Regional Endpoint // options. type STSRegionalEndpoint int @@ -247,7 +277,7 @@ func RegionsForService(ps []Partition, partitionID, serviceID string) (map[strin if p.ID() != partitionID { continue } - if _, ok := p.p.Services[serviceID]; !ok { + if _, ok := p.p.Services[serviceID]; !(ok || serviceID == Ec2metadataServiceID) { break } @@ -333,6 +363,7 @@ func (p Partition) Regions() map[string]Region { // enumerating over the services in a partition. func (p Partition) Services() map[string]Service { ss := make(map[string]Service, len(p.p.Services)) + for id := range p.p.Services { ss[id] = Service{ id: id, @@ -340,6 +371,15 @@ func (p Partition) Services() map[string]Service { } } + // Since we have removed the customization that injected this into the model + // we still need to pretend that this is a modeled service. + if _, ok := ss[Ec2metadataServiceID]; !ok { + ss[Ec2metadataServiceID] = Service{ + id: Ec2metadataServiceID, + p: p.p, + } + } + return ss } @@ -400,7 +440,18 @@ func (s Service) ResolveEndpoint(region string, opts ...func(*Options)) (Resolve // an URL that can be resolved to a instance of a service. func (s Service) Regions() map[string]Region { rs := map[string]Region{} - for id := range s.p.Services[s.id].Endpoints { + + service, ok := s.p.Services[s.id] + + // Since ec2metadata customization has been removed we need to check + // if it was defined in non-standard endpoints.json file. If it's not + // then we can return the empty map as there is no regional-endpoints for IMDS. + // Otherwise, we iterate need to iterate the non-standard model. + if s.id == Ec2metadataServiceID && !ok { + return rs + } + + for id := range service.Endpoints { if r, ok := s.p.Regions[id]; ok { rs[id] = Region{ id: id, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go index 773613722f..c6c6a03387 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/v3model.go @@ -7,6 +7,11 @@ import ( "strings" ) +const ( + ec2MetadataEndpointIPv6 = "http://[fd00:ec2::254]/latest" + ec2MetadataEndpointIPv4 = "http://169.254.169.254/latest" +) + var regionValidationRegex = regexp.MustCompile(`^[[:alnum:]]([[:alnum:]\-]*[[:alnum:]])?$`) type partitions []partition @@ -102,6 +107,12 @@ func (p partition) EndpointFor(service, region string, opts ...func(*Options)) ( opt.Set(opts...) s, hasService := p.Services[service] + + if service == Ec2metadataServiceID && !hasService { + endpoint := getEC2MetadataEndpoint(p.ID, service, opt.EC2MetadataEndpointMode) + return endpoint, nil + } + if len(service) == 0 || !(hasService || opt.ResolveUnknownService) { // Only return error if the resolver will not fallback to creating // endpoint based on service endpoint ID passed in. @@ -129,6 +140,31 @@ func (p partition) EndpointFor(service, region string, opts ...func(*Options)) ( return e.resolve(service, p.ID, region, p.DNSSuffix, defs, opt) } +func getEC2MetadataEndpoint(partitionID, service string, mode EC2IMDSEndpointModeState) ResolvedEndpoint { + switch mode { + case EC2IMDSEndpointModeStateIPv6: + return ResolvedEndpoint{ + URL: ec2MetadataEndpointIPv6, + PartitionID: partitionID, + SigningRegion: "aws-global", + SigningName: service, + SigningNameDerived: true, + SigningMethod: "v4", + } + case EC2IMDSEndpointModeStateIPv4: + fallthrough + default: + return ResolvedEndpoint{ + URL: ec2MetadataEndpointIPv4, + PartitionID: partitionID, + SigningRegion: "aws-global", + SigningName: service, + SigningNameDerived: true, + SigningMethod: "v4", + } + } +} + func serviceList(ss services) []string { list := make([]string, 0, len(ss)) for k := range ss { @@ -178,14 +214,14 @@ type service struct { } func (s *service) endpointForRegion(region string) (endpoint, bool) { - if s.IsRegionalized == boxedFalse { - return s.Endpoints[s.PartitionEndpoint], region == s.PartitionEndpoint - } - if e, ok := s.Endpoints[region]; ok { return e, true } + if s.IsRegionalized == boxedFalse { + return s.Endpoints[s.PartitionEndpoint], region == s.PartitionEndpoint + } + // Unable to find any matching endpoint, return // blank that will be used for generic endpoint creation. return endpoint{}, false diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go index d597c6ead5..fb0a68fce3 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/request/request.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/request/request.go @@ -129,12 +129,27 @@ func New(cfg aws.Config, clientInfo metadata.ClientInfo, handlers Handlers, httpReq, _ := http.NewRequest(method, "", nil) var err error - httpReq.URL, err = url.Parse(clientInfo.Endpoint + operation.HTTPPath) + httpReq.URL, err = url.Parse(clientInfo.Endpoint) if err != nil { httpReq.URL = &url.URL{} err = awserr.New("InvalidEndpointURL", "invalid endpoint uri", err) } + if len(operation.HTTPPath) != 0 { + opHTTPPath := operation.HTTPPath + var opQueryString string + if idx := strings.Index(opHTTPPath, "?"); idx >= 0 { + opQueryString = opHTTPPath[idx+1:] + opHTTPPath = opHTTPPath[:idx] + } + + if strings.HasSuffix(httpReq.URL.Path, "/") && strings.HasPrefix(opHTTPPath, "/") { + opHTTPPath = opHTTPPath[1:] + } + httpReq.URL.Path += opHTTPPath + httpReq.URL.RawQuery = opQueryString + } + r := &Request{ Config: cfg, ClientInfo: clientInfo, diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go index fe6dac1f47..3efdac29ff 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/credentials.go @@ -9,6 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/credentials/processcreds" + "github.com/aws/aws-sdk-go/aws/credentials/ssocreds" "github.com/aws/aws-sdk-go/aws/credentials/stscreds" "github.com/aws/aws-sdk-go/aws/defaults" "github.com/aws/aws-sdk-go/aws/request" @@ -100,10 +101,6 @@ func resolveCredsFromProfile(cfg *aws.Config, sharedCfg.Creds, ) - case len(sharedCfg.CredentialProcess) != 0: - // Get credentials from CredentialProcess - creds = processcreds.NewCredentials(sharedCfg.CredentialProcess) - case len(sharedCfg.CredentialSource) != 0: creds, err = resolveCredsFromSource(cfg, envCfg, sharedCfg, handlers, sessOpts, @@ -119,6 +116,13 @@ func resolveCredsFromProfile(cfg *aws.Config, sharedCfg.RoleSessionName, ) + case sharedCfg.hasSSOConfiguration(): + creds, err = resolveSSOCredentials(cfg, sharedCfg, handlers) + + case len(sharedCfg.CredentialProcess) != 0: + // Get credentials from CredentialProcess + creds = processcreds.NewCredentials(sharedCfg.CredentialProcess) + default: // Fallback to default credentials provider, include mock errors for // the credential chain so user can identify why credentials failed to @@ -151,6 +155,25 @@ func resolveCredsFromProfile(cfg *aws.Config, return creds, nil } +func resolveSSOCredentials(cfg *aws.Config, sharedCfg sharedConfig, handlers request.Handlers) (*credentials.Credentials, error) { + if err := sharedCfg.validateSSOConfiguration(); err != nil { + return nil, err + } + + cfgCopy := cfg.Copy() + cfgCopy.Region = &sharedCfg.SSORegion + + return ssocreds.NewCredentials( + &Session{ + Config: cfgCopy, + Handlers: handlers.Copy(), + }, + sharedCfg.SSOAccountID, + sharedCfg.SSORoleName, + sharedCfg.SSOStartURL, + ), nil +} + // valid credential source values const ( credSourceEc2Metadata = "Ec2InstanceMetadata" diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go new file mode 100644 index 0000000000..593aedc421 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport.go @@ -0,0 +1,27 @@ +// +build go1.13 + +package session + +import ( + "net" + "net/http" + "time" +) + +// Transport that should be used when a custom CA bundle is specified with the +// SDK. +func getCustomTransport() *http.Transport { + return &http.Transport{ + Proxy: http.ProxyFromEnvironment, + DialContext: (&net.Dialer{ + Timeout: 30 * time.Second, + KeepAlive: 30 * time.Second, + DualStack: true, + }).DialContext, + ForceAttemptHTTP2: true, + MaxIdleConns: 100, + IdleConnTimeout: 90 * time.Second, + TLSHandshakeTimeout: 10 * time.Second, + ExpectContinueTimeout: 1 * time.Second, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go similarity index 88% rename from vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport.go rename to vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go index ea9ebb6f6a..1bf31cf8e5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.12.go @@ -1,4 +1,4 @@ -// +build go1.7 +// +build !go1.13,go1.7 package session @@ -10,7 +10,7 @@ import ( // Transport that should be used when a custom CA bundle is specified with the // SDK. -func getCABundleTransport() *http.Transport { +func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, DialContext: (&net.Dialer{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport_1_5.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go similarity index 88% rename from vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport_1_5.go rename to vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go index fec39dfc12..253d7bc9d5 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport_1_5.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.5.go @@ -10,7 +10,7 @@ import ( // Transport that should be used when a custom CA bundle is specified with the // SDK. -func getCABundleTransport() *http.Transport { +func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, Dial: (&net.Dialer{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport_1_6.go b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go similarity index 90% rename from vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport_1_6.go rename to vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go index 1c5a5391e6..db24060544 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/cabundle_transport_1_6.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/custom_transport_go1.6.go @@ -10,7 +10,7 @@ import ( // Transport that should be used when a custom CA bundle is specified with the // SDK. -func getCABundleTransport() *http.Transport { +func getCustomTransport() *http.Transport { return &http.Transport{ Proxy: http.ProxyFromEnvironment, Dial: (&net.Dialer{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go index cc461bd323..43b56863e4 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/doc.go @@ -208,6 +208,8 @@ env values as well. AWS_SDK_LOAD_CONFIG=1 +Custom Shared Config and Credential Files + Shared credentials file path can be set to instruct the SDK to use an alternative file for the shared credentials. If not set the file will be loaded from $HOME/.aws/credentials on Linux/Unix based systems, and @@ -222,6 +224,8 @@ $HOME/.aws/config on Linux/Unix based systems, and AWS_CONFIG_FILE=$HOME/my_shared_config +Custom CA Bundle + Path to a custom Credentials Authority (CA) bundle PEM file that the SDK will use instead of the default system's root CA bundle. Use this only if you want to replace the CA bundle the SDK uses for TLS requests. @@ -242,6 +246,29 @@ Setting a custom HTTPClient in the aws.Config options will override this setting To use this option and custom HTTP client, the HTTP client needs to be provided when creating the session. Not the service client. +Custom Client TLS Certificate + +The SDK supports the environment and session option being configured with +Client TLS certificates that are sent as a part of the client's TLS handshake +for client authentication. If used, both Cert and Key values are required. If +one is missing, or either fail to load the contents of the file an error will +be returned. + +HTTP Client's Transport concrete implementation must be a http.Transport +or creating the session will fail. + + AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key + AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert + +This can also be configured via the session.Options ClientTLSCert and ClientTLSKey. + + sess, err := session.NewSessionWithOptions(session.Options{ + ClientTLSCert: myCertFile, + ClientTLSKey: myKeyFile, + }) + +Custom EC2 IMDS Endpoint + The endpoint of the EC2 IMDS client can be configured via the environment variable, AWS_EC2_METADATA_SERVICE_ENDPOINT when creating the client with a Session. See Options.EC2IMDSEndpoint for more details. @@ -256,7 +283,7 @@ component must be enclosed in square brackets. The custom EC2 IMDS endpoint can also be specified via the Session options. sess, err := session.NewSessionWithOptions(session.Options{ - EC2IMDSEndpoint: "http://[::1]", + EC2MetadataEndpoint: "http://[::1]", }) */ package session diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go index d67c261d74..fffe2f350c 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/env_config.go @@ -101,6 +101,18 @@ type envConfig struct { // AWS_CA_BUNDLE=$HOME/my_custom_ca_bundle CustomCABundle string + // Sets the TLC client certificate that should be used by the SDK's HTTP transport + // when making requests. The certificate must be paired with a TLS client key file. + // + // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert + ClientTLSCert string + + // Sets the TLC client key that should be used by the SDK's HTTP transport + // when making requests. The key must be paired with a TLS client certificate file. + // + // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key + ClientTLSKey string + csmEnabled string CSMEnabled *bool CSMPort string @@ -149,10 +161,15 @@ type envConfig struct { // AWS_S3_USE_ARN_REGION=true S3UseARNRegion bool - // Specifies the alternative endpoint to use for EC2 IMDS. + // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode. // // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1] EC2IMDSEndpoint string + + // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) + // + // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6 + EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState } var ( @@ -219,6 +236,18 @@ var ( ec2IMDSEndpointEnvKey = []string{ "AWS_EC2_METADATA_SERVICE_ENDPOINT", } + ec2IMDSEndpointModeEnvKey = []string{ + "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE", + } + useCABundleKey = []string{ + "AWS_CA_BUNDLE", + } + useClientTLSCert = []string{ + "AWS_SDK_GO_CLIENT_TLS_CERT", + } + useClientTLSKey = []string{ + "AWS_SDK_GO_CLIENT_TLS_KEY", + } ) // loadEnvConfig retrieves the SDK's environment configuration. @@ -302,7 +331,9 @@ func envConfigLoad(enableSharedConfig bool) (envConfig, error) { cfg.SharedConfigFile = defaults.SharedConfigFilename() } - cfg.CustomCABundle = os.Getenv("AWS_CA_BUNDLE") + setFromEnvVal(&cfg.CustomCABundle, useCABundleKey) + setFromEnvVal(&cfg.ClientTLSCert, useClientTLSCert) + setFromEnvVal(&cfg.ClientTLSKey, useClientTLSKey) var err error // STS Regional Endpoint variable @@ -341,6 +372,9 @@ func envConfigLoad(enableSharedConfig bool) (envConfig, error) { } setFromEnvVal(&cfg.EC2IMDSEndpoint, ec2IMDSEndpointEnvKey) + if err := setEC2IMDSEndpointMode(&cfg.EC2IMDSEndpointMode, ec2IMDSEndpointModeEnvKey); err != nil { + return envConfig{}, err + } return cfg, nil } @@ -353,3 +387,17 @@ func setFromEnvVal(dst *string, keys []string) { } } } + +func setEC2IMDSEndpointMode(mode *endpoints.EC2IMDSEndpointModeState, keys []string) error { + for _, k := range keys { + value := os.Getenv(k) + if len(value) == 0 { + continue + } + if err := mode.SetFromString(value); err != nil { + return fmt.Errorf("invalid value for environment variable, %s=%s, %v", k, value, err) + } + return nil + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go index 6430a7f152..4b2e057e93 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/session.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/session.go @@ -25,11 +25,18 @@ const ( // ErrCodeSharedConfig represents an error that occurs in the shared // configuration logic ErrCodeSharedConfig = "SharedConfigErr" + + // ErrCodeLoadCustomCABundle error code for unable to load custom CA bundle. + ErrCodeLoadCustomCABundle = "LoadCustomCABundleError" + + // ErrCodeLoadClientTLSCert error code for unable to load client TLS + // certificate or key + ErrCodeLoadClientTLSCert = "LoadClientTLSCertError" ) // ErrSharedConfigSourceCollision will be returned if a section contains both // source_profile and credential_source -var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only source profile or credential source can be specified, not both", nil) +var ErrSharedConfigSourceCollision = awserr.New(ErrCodeSharedConfig, "only one credential type may be specified per profile: source profile, credential source, credential process, web identity token, or sso", nil) // ErrSharedConfigECSContainerEnvVarEmpty will be returned if the environment // variables are empty and Environment was set as the credential source @@ -229,17 +236,46 @@ type Options struct { // the SDK will use instead of the default system's root CA bundle. Use this // only if you want to replace the CA bundle the SDK uses for TLS requests. // - // Enabling this option will attempt to merge the Transport into the SDK's HTTP - // client. If the client's Transport is not a http.Transport an error will be - // returned. If the Transport's TLS config is set this option will cause the SDK + // HTTP Client's Transport concrete implementation must be a http.Transport + // or creating the session will fail. + // + // If the Transport's TLS config is set this option will cause the SDK // to overwrite the Transport's TLS config's RootCAs value. If the CA // bundle reader contains multiple certificates all of them will be loaded. // - // The Session option CustomCABundle is also available when creating sessions - // to also enable this feature. CustomCABundle session option field has priority - // over the AWS_CA_BUNDLE environment variable, and will be used if both are set. + // Can also be specified via the environment variable: + // + // AWS_CA_BUNDLE=$HOME/ca_bundle + // + // Can also be specified via the shared config field: + // + // ca_bundle = $HOME/ca_bundle CustomCABundle io.Reader + // Reader for the TLC client certificate that should be used by the SDK's + // HTTP transport when making requests. The certificate must be paired with + // a TLS client key file. Will be ignored if both are not provided. + // + // HTTP Client's Transport concrete implementation must be a http.Transport + // or creating the session will fail. + // + // Can also be specified via the environment variable: + // + // AWS_SDK_GO_CLIENT_TLS_CERT=$HOME/my_client_cert + ClientTLSCert io.Reader + + // Reader for the TLC client key that should be used by the SDK's HTTP + // transport when making requests. The key must be paired with a TLS client + // certificate file. Will be ignored if both are not provided. + // + // HTTP Client's Transport concrete implementation must be a http.Transport + // or creating the session will fail. + // + // Can also be specified via the environment variable: + // + // AWS_SDK_GO_CLIENT_TLS_KEY=$HOME/my_client_key + ClientTLSKey io.Reader + // The handlers that the session and all API clients will be created with. // This must be a complete set of handlers. Use the defaults.Handlers() // function to initialize this value before changing the handlers to be @@ -247,8 +283,8 @@ type Options struct { Handlers request.Handlers // Allows specifying a custom endpoint to be used by the EC2 IMDS client - // when making requests to the EC2 IMDS API. The must endpoint value must - // include protocol prefix. + // when making requests to the EC2 IMDS API. The endpoint value should + // include the URI scheme. If the scheme is not present it will be defaulted to http. // // If unset, will the EC2 IMDS client will use its default endpoint. // @@ -262,6 +298,11 @@ type Options struct { // // AWS_EC2_METADATA_SERVICE_ENDPOINT=http://[::1] EC2IMDSEndpoint string + + // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) + // + // AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE=IPv6 + EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState } // NewSessionWithOptions returns a new Session created from SDK defaults, config files, @@ -319,17 +360,6 @@ func NewSessionWithOptions(opts Options) (*Session, error) { envCfg.EnableSharedConfig = true } - // Only use AWS_CA_BUNDLE if session option is not provided. - if len(envCfg.CustomCABundle) != 0 && opts.CustomCABundle == nil { - f, err := os.Open(envCfg.CustomCABundle) - if err != nil { - return nil, awserr.New("LoadCustomCABundleError", - "failed to open custom CA bundle PEM file", err) - } - defer f.Close() - opts.CustomCABundle = f - } - return newSession(opts, envCfg, &opts.Config) } @@ -350,19 +380,23 @@ func Must(sess *Session, err error) *Session { // Wraps the endpoint resolver with a resolver that will return a custom // endpoint for EC2 IMDS. -func wrapEC2IMDSEndpoint(resolver endpoints.Resolver, endpoint string) endpoints.Resolver { +func wrapEC2IMDSEndpoint(resolver endpoints.Resolver, endpoint string, mode endpoints.EC2IMDSEndpointModeState) endpoints.Resolver { return endpoints.ResolverFunc( func(service, region string, opts ...func(*endpoints.Options)) ( endpoints.ResolvedEndpoint, error, ) { - if service == ec2MetadataServiceID { + if service == ec2MetadataServiceID && len(endpoint) > 0 { return endpoints.ResolvedEndpoint{ URL: endpoint, SigningName: ec2MetadataServiceID, SigningRegion: region, }, nil + } else if service == ec2MetadataServiceID { + opts = append(opts, func(o *endpoints.Options) { + o.EC2MetadataEndpointMode = mode + }) } - return resolver.EndpointFor(service, region) + return resolver.EndpointFor(service, region, opts...) }) } @@ -379,8 +413,8 @@ func deprecatedNewSession(envCfg envConfig, cfgs ...*aws.Config) *Session { cfg.EndpointResolver = endpoints.DefaultResolver() } - if len(envCfg.EC2IMDSEndpoint) != 0 { - cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, envCfg.EC2IMDSEndpoint) + if !(len(envCfg.EC2IMDSEndpoint) == 0 && envCfg.EC2IMDSEndpointMode == endpoints.EC2IMDSEndpointModeStateUnset) { + cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, envCfg.EC2IMDSEndpoint, envCfg.EC2IMDSEndpointMode) } cfg.Credentials = defaults.CredChain(cfg, handlers) @@ -460,6 +494,10 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, return nil, err } + if err := setTLSOptions(&opts, cfg, envCfg, sharedCfg); err != nil { + return nil, err + } + s := &Session{ Config: cfg, Handlers: handlers, @@ -479,13 +517,6 @@ func newSession(opts Options, envCfg envConfig, cfgs ...*aws.Config) (*Session, } } - // Setup HTTP client with custom cert bundle if enabled - if opts.CustomCABundle != nil { - if err := loadCustomCABundle(s, opts.CustomCABundle); err != nil { - return nil, err - } - } - return s, nil } @@ -529,22 +560,83 @@ func loadCSMConfig(envCfg envConfig, cfgFiles []string) (csmConfig, error) { return csmConfig{}, nil } -func loadCustomCABundle(s *Session, bundle io.Reader) error { +func setTLSOptions(opts *Options, cfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig) error { + // CA Bundle can be specified in both environment variable shared config file. + var caBundleFilename = envCfg.CustomCABundle + if len(caBundleFilename) == 0 { + caBundleFilename = sharedCfg.CustomCABundle + } + + // Only use environment value if session option is not provided. + customTLSOptions := map[string]struct { + filename string + field *io.Reader + errCode string + }{ + "custom CA bundle PEM": {filename: caBundleFilename, field: &opts.CustomCABundle, errCode: ErrCodeLoadCustomCABundle}, + "custom client TLS cert": {filename: envCfg.ClientTLSCert, field: &opts.ClientTLSCert, errCode: ErrCodeLoadClientTLSCert}, + "custom client TLS key": {filename: envCfg.ClientTLSKey, field: &opts.ClientTLSKey, errCode: ErrCodeLoadClientTLSCert}, + } + for name, v := range customTLSOptions { + if len(v.filename) != 0 && *v.field == nil { + f, err := os.Open(v.filename) + if err != nil { + return awserr.New(v.errCode, fmt.Sprintf("failed to open %s file", name), err) + } + defer f.Close() + *v.field = f + } + } + + // Setup HTTP client with custom cert bundle if enabled + if opts.CustomCABundle != nil { + if err := loadCustomCABundle(cfg.HTTPClient, opts.CustomCABundle); err != nil { + return err + } + } + + // Setup HTTP client TLS certificate and key for client TLS authentication. + if opts.ClientTLSCert != nil && opts.ClientTLSKey != nil { + if err := loadClientTLSCert(cfg.HTTPClient, opts.ClientTLSCert, opts.ClientTLSKey); err != nil { + return err + } + } else if opts.ClientTLSCert == nil && opts.ClientTLSKey == nil { + // Do nothing if neither values are available. + + } else { + return awserr.New(ErrCodeLoadClientTLSCert, + fmt.Sprintf("client TLS cert(%t) and key(%t) must both be provided", + opts.ClientTLSCert != nil, opts.ClientTLSKey != nil), nil) + } + + return nil +} + +func getHTTPTransport(client *http.Client) (*http.Transport, error) { var t *http.Transport - switch v := s.Config.HTTPClient.Transport.(type) { + switch v := client.Transport.(type) { case *http.Transport: t = v default: - if s.Config.HTTPClient.Transport != nil { - return awserr.New("LoadCustomCABundleError", - "unable to load custom CA bundle, HTTPClient's transport unsupported type", nil) + if client.Transport != nil { + return nil, fmt.Errorf("unsupported transport, %T", client.Transport) } } if t == nil { // Nil transport implies `http.DefaultTransport` should be used. Since // the SDK cannot modify, nor copy the `DefaultTransport` specifying // the values the next closest behavior. - t = getCABundleTransport() + t = getCustomTransport() + } + + return t, nil +} + +func loadCustomCABundle(client *http.Client, bundle io.Reader) error { + t, err := getHTTPTransport(client) + if err != nil { + return awserr.New(ErrCodeLoadCustomCABundle, + "unable to load custom CA bundle, HTTPClient's transport unsupported type", err) } p, err := loadCertPool(bundle) @@ -556,7 +648,7 @@ func loadCustomCABundle(s *Session, bundle io.Reader) error { } t.TLSClientConfig.RootCAs = p - s.Config.HTTPClient.Transport = t + client.Transport = t return nil } @@ -564,19 +656,57 @@ func loadCustomCABundle(s *Session, bundle io.Reader) error { func loadCertPool(r io.Reader) (*x509.CertPool, error) { b, err := ioutil.ReadAll(r) if err != nil { - return nil, awserr.New("LoadCustomCABundleError", + return nil, awserr.New(ErrCodeLoadCustomCABundle, "failed to read custom CA bundle PEM file", err) } p := x509.NewCertPool() if !p.AppendCertsFromPEM(b) { - return nil, awserr.New("LoadCustomCABundleError", + return nil, awserr.New(ErrCodeLoadCustomCABundle, "failed to load custom CA bundle PEM file", err) } return p, nil } +func loadClientTLSCert(client *http.Client, certFile, keyFile io.Reader) error { + t, err := getHTTPTransport(client) + if err != nil { + return awserr.New(ErrCodeLoadClientTLSCert, + "unable to get usable HTTP transport from client", err) + } + + cert, err := ioutil.ReadAll(certFile) + if err != nil { + return awserr.New(ErrCodeLoadClientTLSCert, + "unable to get read client TLS cert file", err) + } + + key, err := ioutil.ReadAll(keyFile) + if err != nil { + return awserr.New(ErrCodeLoadClientTLSCert, + "unable to get read client TLS key file", err) + } + + clientCert, err := tls.X509KeyPair(cert, key) + if err != nil { + return awserr.New(ErrCodeLoadClientTLSCert, + "unable to load x509 key pair from client cert", err) + } + + tlsCfg := t.TLSClientConfig + if tlsCfg == nil { + tlsCfg = &tls.Config{} + } + + tlsCfg.Certificates = append(tlsCfg.Certificates, clientCert) + + t.TLSClientConfig = tlsCfg + client.Transport = t + + return nil +} + func mergeConfigSrcs(cfg, userCfg *aws.Config, envCfg envConfig, sharedCfg sharedConfig, handlers request.Handlers, @@ -616,12 +746,32 @@ func mergeConfigSrcs(cfg, userCfg *aws.Config, endpoints.LegacyS3UsEast1Endpoint, }) - ec2IMDSEndpoint := sessOpts.EC2IMDSEndpoint - if len(ec2IMDSEndpoint) == 0 { - ec2IMDSEndpoint = envCfg.EC2IMDSEndpoint + var ec2IMDSEndpoint string + for _, v := range []string{ + sessOpts.EC2IMDSEndpoint, + envCfg.EC2IMDSEndpoint, + sharedCfg.EC2IMDSEndpoint, + } { + if len(v) != 0 { + ec2IMDSEndpoint = v + break + } } - if len(ec2IMDSEndpoint) != 0 { - cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, ec2IMDSEndpoint) + + var endpointMode endpoints.EC2IMDSEndpointModeState + for _, v := range []endpoints.EC2IMDSEndpointModeState{ + sessOpts.EC2IMDSEndpointMode, + envCfg.EC2IMDSEndpointMode, + sharedCfg.EC2IMDSEndpointMode, + } { + if v != endpoints.EC2IMDSEndpointModeStateUnset { + endpointMode = v + break + } + } + + if len(ec2IMDSEndpoint) != 0 || endpointMode != endpoints.EC2IMDSEndpointModeStateUnset { + cfg.EndpointResolver = wrapEC2IMDSEndpoint(cfg.EndpointResolver, ec2IMDSEndpoint, endpointMode) } // Configure credentials if not already set by the user when creating the diff --git a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go index 680805a38a..6830ece70f 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/session/shared_config.go @@ -2,6 +2,7 @@ package session import ( "fmt" + "strings" "time" "github.com/aws/aws-sdk-go/aws/awserr" @@ -25,6 +26,12 @@ const ( roleSessionNameKey = `role_session_name` // optional roleDurationSecondsKey = "duration_seconds" // optional + // AWS Single Sign-On (AWS SSO) group + ssoAccountIDKey = "sso_account_id" + ssoRegionKey = "sso_region" + ssoRoleNameKey = "sso_role_name" + ssoStartURL = "sso_start_url" + // CSM options csmEnabledKey = `csm_enabled` csmHostKey = `csm_host` @@ -34,6 +41,9 @@ const ( // Additional Config fields regionKey = `region` + // custom CA Bundle filename + customCABundleKey = `ca_bundle` + // endpoint discovery group enableEndpointDiscoveryKey = `endpoint_discovery_enabled` // optional @@ -56,10 +66,18 @@ const ( // S3 ARN Region Usage s3UseARNRegionKey = "s3_use_arn_region" + + // EC2 IMDS Endpoint Mode + ec2MetadataServiceEndpointModeKey = "ec2_metadata_service_endpoint_mode" + + // EC2 IMDS Endpoint + ec2MetadataServiceEndpointKey = "ec2_metadata_service_endpoint" ) // sharedConfig represents the configuration fields of the SDK config files. type sharedConfig struct { + Profile string + // Credentials values from the config file. Both aws_access_key_id and // aws_secret_access_key must be provided together in the same file to be // considered valid. The values will be ignored if not a complete group. @@ -75,6 +93,11 @@ type sharedConfig struct { CredentialProcess string WebIdentityTokenFile string + SSOAccountID string + SSORegion string + SSORoleName string + SSOStartURL string + RoleARN string RoleSessionName string ExternalID string @@ -90,6 +113,15 @@ type sharedConfig struct { // region Region string + // CustomCABundle is the file path to a PEM file the SDK will read and + // use to configure the HTTP transport with additional CA certs that are + // not present in the platforms default CA store. + // + // This value will be ignored if the file does not exist. + // + // ca_bundle + CustomCABundle string + // EnableEndpointDiscovery can be enabled in the shared config by setting // endpoint_discovery_enabled to true // @@ -119,6 +151,16 @@ type sharedConfig struct { // // s3_use_arn_region=true S3UseARNRegion bool + + // Specifies the EC2 Instance Metadata Service default endpoint selection mode (IPv4 or IPv6) + // + // ec2_metadata_service_endpoint_mode=IPv6 + EC2IMDSEndpointMode endpoints.EC2IMDSEndpointModeState + + // Specifies the EC2 Instance Metadata Service endpoint to use. If specified it overrides EC2IMDSEndpointMode. + // + // ec2_metadata_service_endpoint=http://fd00:ec2::254 + EC2IMDSEndpoint string } type sharedConfigFile struct { @@ -177,6 +219,8 @@ func loadSharedConfigIniFiles(filenames []string) ([]sharedConfigFile, error) { } func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile string, files []sharedConfigFile, exOpts bool) error { + cfg.Profile = profile + // Trim files from the list that don't exist. var skippedFiles int var profileNotFoundErr error @@ -205,9 +249,9 @@ func (cfg *sharedConfig) setFromIniFiles(profiles map[string]struct{}, profile s cfg.clearAssumeRoleOptions() } else { // First time a profile has been seen, It must either be a assume role - // or credentials. Assert if the credential type requires a role ARN, - // the ARN is also set. - if err := cfg.validateCredentialsRequireARN(profile); err != nil { + // credentials, or SSO. Assert if the credential type requires a role ARN, + // the ARN is also set, or validate that the SSO configuration is complete. + if err := cfg.validateCredentialsConfig(profile); err != nil { return err } } @@ -276,6 +320,7 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e updateString(&cfg.SourceProfileName, section, sourceProfileKey) updateString(&cfg.CredentialSource, section, credentialSourceKey) updateString(&cfg.Region, section, regionKey) + updateString(&cfg.CustomCABundle, section, customCABundleKey) if section.Has(roleDurationSecondsKey) { d := time.Duration(section.Int(roleDurationSecondsKey)) * time.Second @@ -299,6 +344,18 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e } cfg.S3UsEast1RegionalEndpoint = sre } + + // AWS Single Sign-On (AWS SSO) + updateString(&cfg.SSOAccountID, section, ssoAccountIDKey) + updateString(&cfg.SSORegion, section, ssoRegionKey) + updateString(&cfg.SSORoleName, section, ssoRoleNameKey) + updateString(&cfg.SSOStartURL, section, ssoStartURL) + + if err := updateEC2MetadataServiceEndpointMode(&cfg.EC2IMDSEndpointMode, section, ec2MetadataServiceEndpointModeKey); err != nil { + return fmt.Errorf("failed to load %s from shared config, %s, %v", + ec2MetadataServiceEndpointModeKey, file.Filename, err) + } + updateString(&cfg.EC2IMDSEndpoint, section, ec2MetadataServiceEndpointKey) } updateString(&cfg.CredentialProcess, section, credentialProcessKey) @@ -329,6 +386,22 @@ func (cfg *sharedConfig) setFromIniFile(profile string, file sharedConfigFile, e return nil } +func updateEC2MetadataServiceEndpointMode(endpointMode *endpoints.EC2IMDSEndpointModeState, section ini.Section, key string) error { + if !section.Has(key) { + return nil + } + value := section.String(key) + return endpointMode.SetFromString(value) +} + +func (cfg *sharedConfig) validateCredentialsConfig(profile string) error { + if err := cfg.validateCredentialsRequireARN(profile); err != nil { + return err + } + + return nil +} + func (cfg *sharedConfig) validateCredentialsRequireARN(profile string) error { var credSource string @@ -365,12 +438,43 @@ func (cfg *sharedConfig) validateCredentialType() error { return nil } +func (cfg *sharedConfig) validateSSOConfiguration() error { + if !cfg.hasSSOConfiguration() { + return nil + } + + var missing []string + if len(cfg.SSOAccountID) == 0 { + missing = append(missing, ssoAccountIDKey) + } + + if len(cfg.SSORegion) == 0 { + missing = append(missing, ssoRegionKey) + } + + if len(cfg.SSORoleName) == 0 { + missing = append(missing, ssoRoleNameKey) + } + + if len(cfg.SSOStartURL) == 0 { + missing = append(missing, ssoStartURL) + } + + if len(missing) > 0 { + return fmt.Errorf("profile %q is configured to use SSO but is missing required configuration: %s", + cfg.Profile, strings.Join(missing, ", ")) + } + + return nil +} + func (cfg *sharedConfig) hasCredentials() bool { switch { case len(cfg.SourceProfileName) != 0: case len(cfg.CredentialSource) != 0: case len(cfg.CredentialProcess) != 0: case len(cfg.WebIdentityTokenFile) != 0: + case cfg.hasSSOConfiguration(): case cfg.Creds.HasKeys(): default: return false @@ -384,6 +488,10 @@ func (cfg *sharedConfig) clearCredentialOptions() { cfg.CredentialProcess = "" cfg.WebIdentityTokenFile = "" cfg.Creds = credentials.Value{} + cfg.SSOAccountID = "" + cfg.SSORegion = "" + cfg.SSORoleName = "" + cfg.SSOStartURL = "" } func (cfg *sharedConfig) clearAssumeRoleOptions() { @@ -394,6 +502,18 @@ func (cfg *sharedConfig) clearAssumeRoleOptions() { cfg.SourceProfileName = "" } +func (cfg *sharedConfig) hasSSOConfiguration() bool { + switch { + case len(cfg.SSOAccountID) != 0: + case len(cfg.SSORegion) != 0: + case len(cfg.SSORoleName) != 0: + case len(cfg.SSOStartURL) != 0: + default: + return false + } + return true +} + func oneOrNone(bs ...bool) bool { var count int diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go index 07ea799fbd..9937538317 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/header_rules.go @@ -34,23 +34,23 @@ func (m mapRule) IsValid(value string) bool { return ok } -// whitelist is a generic rule for whitelisting -type whitelist struct { +// allowList is a generic rule for allow listing +type allowList struct { rule } -// IsValid for whitelist checks if the value is within the whitelist -func (w whitelist) IsValid(value string) bool { +// IsValid for allow list checks if the value is within the allow list +func (w allowList) IsValid(value string) bool { return w.rule.IsValid(value) } -// blacklist is a generic rule for blacklisting -type blacklist struct { +// excludeList is a generic rule for exclude listing +type excludeList struct { rule } -// IsValid for whitelist checks if the value is within the whitelist -func (b blacklist) IsValid(value string) bool { +// IsValid for exclude list checks if the value is within the exclude list +func (b excludeList) IsValid(value string) bool { return !b.rule.IsValid(value) } diff --git a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go index d71f7b3f4f..d4653031f1 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/signer/v4/v4.go @@ -90,7 +90,7 @@ const ( ) var ignoredHeaders = rules{ - blacklist{ + excludeList{ mapRule{ authorizationHeader: struct{}{}, "User-Agent": struct{}{}, @@ -99,9 +99,9 @@ var ignoredHeaders = rules{ }, } -// requiredSignedHeaders is a whitelist for build canonical headers. +// requiredSignedHeaders is a allow list for build canonical headers. var requiredSignedHeaders = rules{ - whitelist{ + allowList{ mapRule{ "Cache-Control": struct{}{}, "Content-Disposition": struct{}{}, @@ -145,12 +145,13 @@ var requiredSignedHeaders = rules{ }, }, patterns{"X-Amz-Meta-"}, + patterns{"X-Amz-Object-Lock-"}, } -// allowedHoisting is a whitelist for build query headers. The boolean value +// allowedHoisting is a allow list for build query headers. The boolean value // represents whether or not it is a pattern. var allowedQueryHoisting = inclusiveRules{ - blacklist{requiredSignedHeaders}, + excludeList{requiredSignedHeaders}, patterns{"X-Amz-"}, } @@ -417,7 +418,7 @@ var SignRequestHandler = request.NamedHandler{ // request handler should only be used with the SDK's built in service client's // API operation requests. // -// This function should not be used on its on its own, but in conjunction with +// This function should not be used on its own, but in conjunction with // an AWS service client's API operation call. To sign a standalone request // not created by a service client's API operation method use the "Sign" or // "Presign" functions of the "Signer" type. @@ -689,9 +690,12 @@ func (ctx *signingCtx) buildBodyDigest() error { if hash == "" { includeSHA256Header := ctx.unsignedPayload || ctx.ServiceName == "s3" || + ctx.ServiceName == "s3-object-lambda" || ctx.ServiceName == "glacier" - s3Presign := ctx.isPresign && ctx.ServiceName == "s3" + s3Presign := ctx.isPresign && + (ctx.ServiceName == "s3" || + ctx.ServiceName == "s3-object-lambda") if ctx.unsignedPayload || s3Presign { hash = "UNSIGNED-PAYLOAD" diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index e9dacac7ce..36faa11913 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.35.37" +const SDKVersion = "1.40.4" diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go index 25ce0fe134..1e55bbd07b 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/doc.go @@ -13,17 +13,30 @@ // } // // Below is the BNF that describes this parser -// Grammar: -// stmt -> value stmt' -// stmt' -> epsilon | op stmt -// value -> number | string | boolean | quoted_string +// Grammar: +// stmt -> section | stmt' +// stmt' -> epsilon | expr +// expr -> value (stmt)* | equal_expr (stmt)* +// equal_expr -> value ( ':' | '=' ) equal_expr' +// equal_expr' -> number | string | quoted_string +// quoted_string -> " quoted_string' +// quoted_string' -> string quoted_string_end +// quoted_string_end -> " // -// section -> [ section' -// section' -> value section_close -// section_close -> ] +// section -> [ section' +// section' -> section_value section_close +// section_value -> number | string_subset | boolean | quoted_string_subset +// quoted_string_subset -> " quoted_string_subset' +// quoted_string_subset' -> string_subset quoted_string_end +// quoted_string_subset -> " +// section_close -> ] // -// SkipState will skip (NL WS)+ +// value -> number | string_subset | boolean +// string -> ? UTF-8 Code-Points except '\n' (U+000A) and '\r\n' (U+000D U+000A) ? +// string_subset -> ? Code-points excepted by grammar except ':' (U+003A), '=' (U+003D), '[' (U+005B), and ']' (U+005D) ? // -// comment -> # comment' | ; comment' -// comment' -> epsilon | value +// SkipState will skip (NL WS)+ +// +// comment -> # comment' | ; comment' +// comment' -> epsilon | value package ini diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go index 55fa73ebcf..0ba319491c 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/ini_parser.go @@ -5,9 +5,12 @@ import ( "io" ) +// ParseState represents the current state of the parser. +type ParseState uint + // State enums for the parse table const ( - InvalidState = iota + InvalidState ParseState = iota // stmt -> value stmt' StatementState // stmt' -> MarkComplete | op stmt @@ -36,8 +39,8 @@ const ( ) // parseTable is a state machine to dictate the grammar above. -var parseTable = map[ASTKind]map[TokenType]int{ - ASTKindStart: map[TokenType]int{ +var parseTable = map[ASTKind]map[TokenType]ParseState{ + ASTKindStart: { TokenLit: StatementState, TokenSep: OpenScopeState, TokenWS: SkipTokenState, @@ -45,7 +48,7 @@ var parseTable = map[ASTKind]map[TokenType]int{ TokenComment: CommentState, TokenNone: TerminalState, }, - ASTKindCommentStatement: map[TokenType]int{ + ASTKindCommentStatement: { TokenLit: StatementState, TokenSep: OpenScopeState, TokenWS: SkipTokenState, @@ -53,7 +56,7 @@ var parseTable = map[ASTKind]map[TokenType]int{ TokenComment: CommentState, TokenNone: MarkCompleteState, }, - ASTKindExpr: map[TokenType]int{ + ASTKindExpr: { TokenOp: StatementPrimeState, TokenLit: ValueState, TokenSep: OpenScopeState, @@ -62,13 +65,15 @@ var parseTable = map[ASTKind]map[TokenType]int{ TokenComment: CommentState, TokenNone: MarkCompleteState, }, - ASTKindEqualExpr: map[TokenType]int{ - TokenLit: ValueState, - TokenWS: SkipTokenState, - TokenNL: SkipState, - TokenNone: SkipState, + ASTKindEqualExpr: { + TokenLit: ValueState, + TokenSep: ValueState, + TokenOp: ValueState, + TokenWS: SkipTokenState, + TokenNL: SkipState, + TokenNone: SkipState, }, - ASTKindStatement: map[TokenType]int{ + ASTKindStatement: { TokenLit: SectionState, TokenSep: CloseScopeState, TokenWS: SkipTokenState, @@ -76,9 +81,9 @@ var parseTable = map[ASTKind]map[TokenType]int{ TokenComment: CommentState, TokenNone: MarkCompleteState, }, - ASTKindExprStatement: map[TokenType]int{ + ASTKindExprStatement: { TokenLit: ValueState, - TokenSep: OpenScopeState, + TokenSep: ValueState, TokenOp: ValueState, TokenWS: ValueState, TokenNL: MarkCompleteState, @@ -86,14 +91,14 @@ var parseTable = map[ASTKind]map[TokenType]int{ TokenNone: TerminalState, TokenComma: SkipState, }, - ASTKindSectionStatement: map[TokenType]int{ + ASTKindSectionStatement: { TokenLit: SectionState, TokenOp: SectionState, TokenSep: CloseScopeState, TokenWS: SectionState, TokenNL: SkipTokenState, }, - ASTKindCompletedSectionStatement: map[TokenType]int{ + ASTKindCompletedSectionStatement: { TokenWS: SkipTokenState, TokenNL: SkipTokenState, TokenLit: StatementState, @@ -101,7 +106,7 @@ var parseTable = map[ASTKind]map[TokenType]int{ TokenComment: CommentState, TokenNone: MarkCompleteState, }, - ASTKindSkipStatement: map[TokenType]int{ + ASTKindSkipStatement: { TokenLit: StatementState, TokenSep: OpenScopeState, TokenWS: SkipTokenState, @@ -205,18 +210,6 @@ loop: case ValueState: // ValueState requires the previous state to either be an equal expression // or an expression statement. - // - // This grammar occurs when the RHS is a number, word, or quoted string. - // equal_expr -> lit op equal_expr' - // equal_expr' -> number | string | quoted_string - // quoted_string -> " quoted_string' - // quoted_string' -> string quoted_string_end - // quoted_string_end -> " - // - // otherwise - // expr_stmt -> equal_expr (expr_stmt')* - // expr_stmt' -> ws S | op S | MarkComplete - // S -> equal_expr' expr_stmt' switch k.Kind { case ASTKindEqualExpr: // assigning a value to some key @@ -243,7 +236,7 @@ loop: } children[len(children)-1] = rhs - k.SetChildren(children) + root.SetChildren(children) stack.Push(k) } diff --git a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go b/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go index 94841c3244..081cf43342 100644 --- a/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go +++ b/vendor/github.com/aws/aws-sdk-go/internal/ini/visitor.go @@ -50,7 +50,10 @@ func (v *DefaultVisitor) VisitExpr(expr AST) error { rhs := children[1] - if rhs.Root.Type() != TokenLit { + // The right-hand value side the equality expression is allowed to contain '[', ']', ':', '=' in the values. + // If the token is not either a literal or one of the token types that identifies those four additional + // tokens then error. + if !(rhs.Root.Type() == TokenLit || rhs.Root.Type() == TokenOp || rhs.Root.Type() == TokenSep) { return NewParseError("unexpected token type") } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go index d7d42db0a6..1f1d27aea4 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/host.go @@ -1,9 +1,10 @@ package protocol import ( - "strings" - "github.com/aws/aws-sdk-go/aws/request" + "net" + "strconv" + "strings" ) // ValidateEndpointHostHandler is a request handler that will validate the @@ -22,8 +23,26 @@ var ValidateEndpointHostHandler = request.NamedHandler{ // 3986 host. Returns error if the host is not valid. func ValidateEndpointHost(opName, host string) error { paramErrs := request.ErrInvalidParams{Context: opName} - labels := strings.Split(host, ".") + var hostname string + var port string + var err error + + if strings.Contains(host, ":") { + hostname, port, err = net.SplitHostPort(host) + + if err != nil { + paramErrs.Add(request.NewErrParamFormat("endpoint", err.Error(), host)) + } + + if !ValidPortNumber(port) { + paramErrs.Add(request.NewErrParamFormat("endpoint port number", "[0-65535]", port)) + } + } else { + hostname = host + } + + labels := strings.Split(hostname, ".") for i, label := range labels { if i == len(labels)-1 && len(label) == 0 { // Allow trailing dot for FQDN hosts. @@ -36,7 +55,11 @@ func ValidateEndpointHost(opName, host string) error { } } - if len(host) > 255 { + if len(hostname) == 0 { + paramErrs.Add(request.NewErrParamMinLen("endpoint host", 1)) + } + + if len(hostname) > 255 { paramErrs.Add(request.NewErrParamMaxLen( "endpoint host", 255, host, )) @@ -66,3 +89,16 @@ func ValidHostLabel(label string) bool { return true } + +// ValidPortNumber return if the port is valid RFC 3986 port +func ValidPortNumber(port string) bool { + i, err := strconv.Atoi(port) + if err != nil { + return false + } + + if i < 0 || i > 65535 { + return false + } + return true +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go index 1301b149d3..fb35fee5fe 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/rest/build.go @@ -98,7 +98,7 @@ func buildLocationElements(r *request.Request, v reflect.Value, buildGETQuery bo // Support the ability to customize values to be marshaled as a // blob even though they were modeled as a string. Required for S3 - // API operations like SSECustomerKey is modeled as stirng but + // API operations like SSECustomerKey is modeled as string but // required to be base64 encoded in request. if field.Tag.Get("marshal-as") == "blob" { m = m.Convert(byteSliceType) diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go new file mode 100644 index 0000000000..2e0e205af3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/restjson.go @@ -0,0 +1,59 @@ +// Package restjson provides RESTful JSON serialization of AWS +// requests and responses. +package restjson + +//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/input/rest-json.json build_test.go +//go:generate go run -tags codegen ../../../private/model/cli/gen-protocol-tests ../../../models/protocol_tests/output/rest-json.json unmarshal_test.go + +import ( + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" + "github.com/aws/aws-sdk-go/private/protocol/rest" +) + +// BuildHandler is a named request handler for building restjson protocol +// requests +var BuildHandler = request.NamedHandler{ + Name: "awssdk.restjson.Build", + Fn: Build, +} + +// UnmarshalHandler is a named request handler for unmarshaling restjson +// protocol requests +var UnmarshalHandler = request.NamedHandler{ + Name: "awssdk.restjson.Unmarshal", + Fn: Unmarshal, +} + +// UnmarshalMetaHandler is a named request handler for unmarshaling restjson +// protocol request metadata +var UnmarshalMetaHandler = request.NamedHandler{ + Name: "awssdk.restjson.UnmarshalMeta", + Fn: UnmarshalMeta, +} + +// Build builds a request for the REST JSON protocol. +func Build(r *request.Request) { + rest.Build(r) + + if t := rest.PayloadType(r.Params); t == "structure" || t == "" { + if v := r.HTTPRequest.Header.Get("Content-Type"); len(v) == 0 { + r.HTTPRequest.Header.Set("Content-Type", "application/json") + } + jsonrpc.Build(r) + } +} + +// Unmarshal unmarshals a response body for the REST JSON protocol. +func Unmarshal(r *request.Request) { + if t := rest.PayloadType(r.Data); t == "structure" || t == "" { + jsonrpc.Unmarshal(r) + } else { + rest.Unmarshal(r) + } +} + +// UnmarshalMeta unmarshals response headers for the REST JSON protocol. +func UnmarshalMeta(r *request.Request) { + rest.UnmarshalMeta(r) +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go new file mode 100644 index 0000000000..d756d8cc52 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/restjson/unmarshal_error.go @@ -0,0 +1,134 @@ +package restjson + +import ( + "bytes" + "io" + "io/ioutil" + "net/http" + "strings" + + "github.com/aws/aws-sdk-go/aws/awserr" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/json/jsonutil" + "github.com/aws/aws-sdk-go/private/protocol/rest" +) + +const ( + errorTypeHeader = "X-Amzn-Errortype" + errorMessageHeader = "X-Amzn-Errormessage" +) + +// UnmarshalTypedError provides unmarshaling errors API response errors +// for both typed and untyped errors. +type UnmarshalTypedError struct { + exceptions map[string]func(protocol.ResponseMetadata) error +} + +// NewUnmarshalTypedError returns an UnmarshalTypedError initialized for the +// set of exception names to the error unmarshalers +func NewUnmarshalTypedError(exceptions map[string]func(protocol.ResponseMetadata) error) *UnmarshalTypedError { + return &UnmarshalTypedError{ + exceptions: exceptions, + } +} + +// UnmarshalError attempts to unmarshal the HTTP response error as a known +// error type. If unable to unmarshal the error type, the generic SDK error +// type will be used. +func (u *UnmarshalTypedError) UnmarshalError( + resp *http.Response, + respMeta protocol.ResponseMetadata, +) (error, error) { + + code := resp.Header.Get(errorTypeHeader) + msg := resp.Header.Get(errorMessageHeader) + + body := resp.Body + if len(code) == 0 { + // If unable to get code from HTTP headers have to parse JSON message + // to determine what kind of exception this will be. + var buf bytes.Buffer + var jsonErr jsonErrorResponse + teeReader := io.TeeReader(resp.Body, &buf) + err := jsonutil.UnmarshalJSONError(&jsonErr, teeReader) + if err != nil { + return nil, err + } + + body = ioutil.NopCloser(&buf) + code = jsonErr.Code + msg = jsonErr.Message + } + + // If code has colon separators remove them so can compare against modeled + // exception names. + code = strings.SplitN(code, ":", 2)[0] + + if fn, ok := u.exceptions[code]; ok { + // If exception code is know, use associated constructor to get a value + // for the exception that the JSON body can be unmarshaled into. + v := fn(respMeta) + if err := jsonutil.UnmarshalJSONCaseInsensitive(v, body); err != nil { + return nil, err + } + + if err := rest.UnmarshalResponse(resp, v, true); err != nil { + return nil, err + } + + return v, nil + } + + // fallback to unmodeled generic exceptions + return awserr.NewRequestFailure( + awserr.New(code, msg, nil), + respMeta.StatusCode, + respMeta.RequestID, + ), nil +} + +// UnmarshalErrorHandler is a named request handler for unmarshaling restjson +// protocol request errors +var UnmarshalErrorHandler = request.NamedHandler{ + Name: "awssdk.restjson.UnmarshalError", + Fn: UnmarshalError, +} + +// UnmarshalError unmarshals a response error for the REST JSON protocol. +func UnmarshalError(r *request.Request) { + defer r.HTTPResponse.Body.Close() + + var jsonErr jsonErrorResponse + err := jsonutil.UnmarshalJSONError(&jsonErr, r.HTTPResponse.Body) + if err != nil { + r.Error = awserr.NewRequestFailure( + awserr.New(request.ErrCodeSerialization, + "failed to unmarshal response error", err), + r.HTTPResponse.StatusCode, + r.RequestID, + ) + return + } + + code := r.HTTPResponse.Header.Get(errorTypeHeader) + if code == "" { + code = jsonErr.Code + } + msg := r.HTTPResponse.Header.Get(errorMessageHeader) + if msg == "" { + msg = jsonErr.Message + } + + code = strings.SplitN(code, ":", 2)[0] + r.Error = awserr.NewRequestFailure( + awserr.New(code, jsonErr.Message, nil), + r.HTTPResponse.StatusCode, + r.RequestID, + ) +} + +type jsonErrorResponse struct { + Code string `json:"code"` + Message string `json:"message"` +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go index 98f4caed91..d486a4c2a0 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/timestamp.go @@ -1,6 +1,8 @@ package protocol import ( + "bytes" + "fmt" "math" "strconv" "time" @@ -19,7 +21,9 @@ const ( // Output time is intended to not contain decimals const ( // RFC 7231#section-7.1.1.1 timetamp format. e.g Tue, 29 Apr 2014 18:30:38 GMT - RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT" + RFC822TimeFormat = "Mon, 2 Jan 2006 15:04:05 GMT" + rfc822TimeFormatSingleDigitDay = "Mon, _2 Jan 2006 15:04:05 GMT" + rfc822TimeFormatSingleDigitDayTwoDigitYear = "Mon, _2 Jan 06 15:04:05 GMT" // This format is used for output time without seconds precision RFC822OutputTimeFormat = "Mon, 02 Jan 2006 15:04:05 GMT" @@ -67,10 +71,20 @@ func FormatTime(name string, t time.Time) string { // the time if it was able to be parsed, and fails otherwise. func ParseTime(formatName, value string) (time.Time, error) { switch formatName { - case RFC822TimeFormatName: - return time.Parse(RFC822TimeFormat, value) - case ISO8601TimeFormatName: - return time.Parse(ISO8601TimeFormat, value) + case RFC822TimeFormatName: // Smithy HTTPDate format + return tryParse(value, + RFC822TimeFormat, + rfc822TimeFormatSingleDigitDay, + rfc822TimeFormatSingleDigitDayTwoDigitYear, + time.RFC850, + time.ANSIC, + ) + case ISO8601TimeFormatName: // Smithy DateTime format + return tryParse(value, + ISO8601TimeFormat, + time.RFC3339Nano, + time.RFC3339, + ) case UnixTimeFormatName: v, err := strconv.ParseFloat(value, 64) _, dec := math.Modf(v) @@ -83,3 +97,36 @@ func ParseTime(formatName, value string) (time.Time, error) { panic("unknown timestamp format name, " + formatName) } } + +func tryParse(v string, formats ...string) (time.Time, error) { + var errs parseErrors + for _, f := range formats { + t, err := time.Parse(f, v) + if err != nil { + errs = append(errs, parseError{ + Format: f, + Err: err, + }) + continue + } + return t, nil + } + + return time.Time{}, fmt.Errorf("unable to parse time string, %v", errs) +} + +type parseErrors []parseError + +func (es parseErrors) Error() string { + var s bytes.Buffer + for _, e := range es { + fmt.Fprintf(&s, "\n * %q: %v", e.Format, e.Err) + } + + return "parse errors:" + s.String() +} + +type parseError struct { + Format string + Err error +} diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go index 09ad951595..2fbb93ae76 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/build.go @@ -308,6 +308,8 @@ func (b *xmlBuilder) buildScalar(value reflect.Value, current *XMLNode, tag refl if tag.Get("xmlAttribute") != "" { // put into current node's attribute list attr := xml.Attr{Name: xname, Value: str} current.Attr = append(current.Attr, attr) + } else if len(xname.Local) == 0 { + current.Text = str } else { // regular text node current.AddChild(&XMLNode{Name: xname, Text: str}) } diff --git a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go index 42f71648ee..c85b79fddd 100644 --- a/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go +++ b/vendor/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil/xml_to_struct.go @@ -18,6 +18,14 @@ type XMLNode struct { parent *XMLNode } +// textEncoder is a string type alias that implemnts the TextMarshaler interface. +// This alias type is used to ensure that the line feed (\n) (U+000A) is escaped. +type textEncoder string + +func (t textEncoder) MarshalText() ([]byte, error) { + return []byte(t), nil +} + // NewXMLElement returns a pointer to a new XMLNode initialized to default values. func NewXMLElement(name xml.Name) *XMLNode { return &XMLNode{ @@ -130,11 +138,16 @@ func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error { attrs = sortedAttrs } - e.EncodeToken(xml.StartElement{Name: node.Name, Attr: attrs}) + startElement := xml.StartElement{Name: node.Name, Attr: attrs} if node.Text != "" { - e.EncodeToken(xml.CharData([]byte(node.Text))) - } else if sorted { + e.EncodeElement(textEncoder(node.Text), startElement) + return e.Flush() + } + + e.EncodeToken(startElement) + + if sorted { sortedNames := []string{} for k := range node.Children { sortedNames = append(sortedNames, k) @@ -154,6 +167,7 @@ func StructToXML(e *xml.Encoder, node *XMLNode, sorted bool) error { } } - e.EncodeToken(xml.EndElement{Name: node.Name}) + e.EncodeToken(startElement.End()) + return e.Flush() } diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go index b9257cfcc2..10a4a166f0 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/api.go @@ -436,8 +436,7 @@ func (c *AutoScaling) BatchPutScheduledUpdateGroupActionRequest(input *BatchPutS // BatchPutScheduledUpdateGroupAction API operation for Auto Scaling. // // Creates or updates one or more scheduled scaling actions for an Auto Scaling -// group. If you leave a parameter unspecified when updating a scheduled scaling -// action, the corresponding value remains unchanged. +// group. // // 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 @@ -531,8 +530,9 @@ func (c *AutoScaling) CancelInstanceRefreshRequest(input *CancelInstanceRefreshI // roll back any replacements that have already been completed, but it prevents // new replacements from being started. // -// For more information, see Replacing Auto Scaling Instances Based on an Instance -// Refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html). +// This operation is part of the instance refresh feature (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) +// in Amazon EC2 Auto Scaling, which helps you update instances in your Auto +// Scaling group after you make configuration changes. // // 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 @@ -727,6 +727,9 @@ func (c *AutoScaling) CreateAutoScalingGroupRequest(input *CreateAutoScalingGrou // CreateAutoScalingGroup API operation for Auto Scaling. // +// We strongly recommend using a launch template when calling this operation +// to ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2. +// // Creates an Auto Scaling group with the specified name and attributes. // // If you exceed your maximum limit of Auto Scaling groups, the call fails. @@ -1605,6 +1608,103 @@ func (c *AutoScaling) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsIn return out, req.Send() } +const opDeleteWarmPool = "DeleteWarmPool" + +// DeleteWarmPoolRequest generates a "aws/request.Request" representing the +// client's request for the DeleteWarmPool 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 DeleteWarmPool for more information on using the DeleteWarmPool +// 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 DeleteWarmPoolRequest method. +// req, resp := client.DeleteWarmPoolRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteWarmPool +func (c *AutoScaling) DeleteWarmPoolRequest(input *DeleteWarmPoolInput) (req *request.Request, output *DeleteWarmPoolOutput) { + op := &request.Operation{ + Name: opDeleteWarmPool, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteWarmPoolInput{} + } + + output = &DeleteWarmPoolOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// DeleteWarmPool API operation for Auto Scaling. +// +// Deletes the warm pool for the specified Auto Scaling group. +// +// For more information, see Warm pools for Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) +// in the Amazon EC2 Auto Scaling 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 +// the error. +// +// See the AWS API reference guide for Auto Scaling's +// API operation DeleteWarmPool for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededFault "LimitExceeded" +// You have already reached a limit for your Amazon EC2 Auto Scaling resources +// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). +// For more information, see DescribeAccountLimits (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html) +// in the Amazon EC2 Auto Scaling API Reference. +// +// * ErrCodeResourceContentionFault "ResourceContention" +// You already have a pending update to an Amazon EC2 Auto Scaling resource +// (for example, an Auto Scaling group, instance, or load balancer). +// +// * ErrCodeScalingActivityInProgressFault "ScalingActivityInProgress" +// The operation can't be performed because there are scaling activities in +// progress. +// +// * ErrCodeResourceInUseFault "ResourceInUse" +// The operation can't be performed because the resource is in use. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DeleteWarmPool +func (c *AutoScaling) DeleteWarmPool(input *DeleteWarmPoolInput) (*DeleteWarmPoolOutput, error) { + req, out := c.DeleteWarmPoolRequest(input) + return out, req.Send() +} + +// DeleteWarmPoolWithContext is the same as DeleteWarmPool with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteWarmPool 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 *AutoScaling) DeleteWarmPoolWithContext(ctx aws.Context, input *DeleteWarmPoolInput, opts ...request.Option) (*DeleteWarmPoolOutput, error) { + req, out := c.DeleteWarmPoolRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeAccountLimits = "DescribeAccountLimits" // DescribeAccountLimitsRequest generates a "aws/request.Request" representing the @@ -1649,11 +1749,12 @@ func (c *AutoScaling) DescribeAccountLimitsRequest(input *DescribeAccountLimitsI // DescribeAccountLimits API operation for Auto Scaling. // -// Describes the current Amazon EC2 Auto Scaling resource quotas for your AWS -// account. +// Describes the current Amazon EC2 Auto Scaling resource quotas for your account. // -// For information about requesting an increase, see Amazon EC2 Auto Scaling -// service quotas (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) +// When you establish an account, the account has initial quotas on the maximum +// number of Auto Scaling groups and launch configurations that you can create +// in a given Region. For more information, see Amazon EC2 Auto Scaling service +// quotas (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-account-limits.html) // in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -1734,9 +1835,8 @@ func (c *AutoScaling) DescribeAdjustmentTypesRequest(input *DescribeAdjustmentTy // DescribeAdjustmentTypes API operation for Auto Scaling. // -// Describes the available adjustment types for Amazon EC2 Auto Scaling scaling -// policies. These settings apply to step scaling policies and simple scaling -// policies; they do not apply to target tracking scaling policies. +// Describes the available adjustment types for step scaling and simple scaling +// policies. // // The following adjustment types are supported: // @@ -1830,7 +1930,11 @@ func (c *AutoScaling) DescribeAutoScalingGroupsRequest(input *DescribeAutoScalin // DescribeAutoScalingGroups API operation for Auto Scaling. // -// Describes one or more Auto Scaling groups. +// Gets information about the Auto Scaling groups in the account and Region. +// +// This operation returns information about instances in Auto Scaling groups. +// To retrieve information about the instances in a warm pool, you must call +// the DescribeWarmPool API. // // 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 @@ -1971,7 +2075,7 @@ func (c *AutoScaling) DescribeAutoScalingInstancesRequest(input *DescribeAutoSca // DescribeAutoScalingInstances API operation for Auto Scaling. // -// Describes one or more Auto Scaling instances. +// Gets information about the Auto Scaling instances in the account and Region. // // 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 @@ -2186,9 +2290,19 @@ func (c *AutoScaling) DescribeInstanceRefreshesRequest(input *DescribeInstanceRe // DescribeInstanceRefreshes API operation for Auto Scaling. // -// Describes one or more instance refreshes. +// Gets information about the instance refreshes for the specified Auto Scaling +// group. +// +// This operation is part of the instance refresh feature (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) +// in Amazon EC2 Auto Scaling, which helps you update instances in your Auto +// Scaling group after you make configuration changes. +// +// To help you determine the status of an instance refresh, this operation returns +// information about the instance refreshes you previously initiated, including +// their status, end time, the percentage of the instance refresh that is complete, +// and the number of instances remaining to update before the instance refresh +// is complete. // -// You can determine the status of a request by looking at the Status parameter. // The following are the possible statuses: // // * Pending - The request was created, but the operation has not started. @@ -2206,9 +2320,6 @@ func (c *AutoScaling) DescribeInstanceRefreshesRequest(input *DescribeInstanceRe // // * Cancelled - The operation is cancelled. // -// For more information, see Replacing Auto Scaling Instances Based on an Instance -// Refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html). -// // 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. @@ -2296,7 +2407,7 @@ func (c *AutoScaling) DescribeLaunchConfigurationsRequest(input *DescribeLaunchC // DescribeLaunchConfigurations API operation for Auto Scaling. // -// Describes one or more launch configurations. +// Gets information about the launch configurations in the account and Region. // // 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 @@ -2517,7 +2628,8 @@ func (c *AutoScaling) DescribeLifecycleHooksRequest(input *DescribeLifecycleHook // DescribeLifecycleHooks API operation for Auto Scaling. // -// Describes the lifecycle hooks for the specified Auto Scaling group. +// Gets information about the lifecycle hooks for the specified Auto Scaling +// group. // // 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 @@ -2597,7 +2709,30 @@ func (c *AutoScaling) DescribeLoadBalancerTargetGroupsRequest(input *DescribeLoa // DescribeLoadBalancerTargetGroups API operation for Auto Scaling. // -// Describes the target groups for the specified Auto Scaling group. +// Gets information about the load balancer target groups for the specified +// Auto Scaling group. +// +// To determine the availability of registered instances, use the State element +// in the response. When you attach a target group to an Auto Scaling group, +// the initial State value is Adding. The state transitions to Added after all +// Auto Scaling instances are registered with the target group. If Elastic Load +// Balancing health checks are enabled for the Auto Scaling group, the state +// transitions to InService after at least one Auto Scaling instance passes +// the health check. When the target group is in the InService state, Amazon +// EC2 Auto Scaling can terminate and replace any instances that are reported +// as unhealthy. If no registered instances pass the health checks, the target +// group doesn't enter the InService state. +// +// Target groups also have an InService state if you attach them in the CreateAutoScalingGroup +// API call. If your target group state is InService, but it is not working +// properly, check the scaling activities by calling DescribeScalingActivities +// and take any corrective actions necessary. +// +// For help with failed health checks, see Troubleshooting Amazon EC2 Auto Scaling: +// Health checks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ts-as-healthchecks.html) +// in the Amazon EC2 Auto Scaling User Guide. For more information, see Elastic +// Load Balancing and Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) +// in the Amazon EC2 Auto Scaling 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 @@ -2677,12 +2812,35 @@ func (c *AutoScaling) DescribeLoadBalancersRequest(input *DescribeLoadBalancersI // DescribeLoadBalancers API operation for Auto Scaling. // -// Describes the load balancers for the specified Auto Scaling group. +// Gets information about the load balancers for the specified Auto Scaling +// group. // // This operation describes only Classic Load Balancers. If you have Application // Load Balancers, Network Load Balancers, or Gateway Load Balancers, use the // DescribeLoadBalancerTargetGroups API instead. // +// To determine the availability of registered instances, use the State element +// in the response. When you attach a load balancer to an Auto Scaling group, +// the initial State value is Adding. The state transitions to Added after all +// Auto Scaling instances are registered with the load balancer. If Elastic +// Load Balancing health checks are enabled for the Auto Scaling group, the +// state transitions to InService after at least one Auto Scaling instance passes +// the health check. When the load balancer is in the InService state, Amazon +// EC2 Auto Scaling can terminate and replace any instances that are reported +// as unhealthy. If no registered instances pass the health checks, the load +// balancer doesn't enter the InService state. +// +// Load balancers also have an InService state if you attach them in the CreateAutoScalingGroup +// API call. If your load balancer state is InService, but it is not working +// properly, check the scaling activities by calling DescribeScalingActivities +// and take any corrective actions necessary. +// +// For help with failed health checks, see Troubleshooting Amazon EC2 Auto Scaling: +// Health checks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ts-as-healthchecks.html) +// in the Amazon EC2 Auto Scaling User Guide. For more information, see Elastic +// Load Balancing and Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-load-balancer.html) +// in the Amazon EC2 Auto Scaling 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 // the error. @@ -2850,8 +3008,8 @@ func (c *AutoScaling) DescribeNotificationConfigurationsRequest(input *DescribeN // DescribeNotificationConfigurations API operation for Auto Scaling. // -// Describes the notification actions associated with the specified Auto Scaling -// group. +// Gets information about the Amazon SNS notifications that are configured for +// one or more Auto Scaling groups. // // 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 @@ -2992,7 +3150,7 @@ func (c *AutoScaling) DescribePoliciesRequest(input *DescribePoliciesInput) (req // DescribePolicies API operation for Auto Scaling. // -// Describes the policies for the specified Auto Scaling group. +// Gets information about the scaling policies in the account and Region. // // 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 @@ -3136,7 +3294,19 @@ func (c *AutoScaling) DescribeScalingActivitiesRequest(input *DescribeScalingAct // DescribeScalingActivities API operation for Auto Scaling. // -// Describes one or more scaling activities for the specified Auto Scaling group. +// Gets information about the scaling activities in the account and Region. +// +// When scaling events occur, you see a record of the scaling activity in the +// scaling activities. For more information, see Verifying a scaling activity +// for an Auto Scaling group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) +// in the Amazon EC2 Auto Scaling User Guide. +// +// If the scaling event succeeds, the value of the StatusCode element in the +// response is Successful. If an attempt to launch instances failed, the StatusCode +// value is Failed or Cancelled and the StatusMessage element in the response +// indicates the cause of the failure. For help interpreting the StatusMessage, +// see Troubleshooting Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/CHAP_Troubleshooting.html) +// in the Amazon EC2 Auto Scaling 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 @@ -3358,9 +3528,11 @@ func (c *AutoScaling) DescribeScheduledActionsRequest(input *DescribeScheduledAc // DescribeScheduledActions API operation for Auto Scaling. // -// Describes the actions scheduled for your Auto Scaling group that haven't -// run or that have not reached their end time. To describe the actions that -// have already run, call the DescribeScalingActivities API. +// Gets information about the scheduled actions that haven't run or that have +// not reached their end time. +// +// To describe the scaling activities for scheduled actions that have already +// run, call the DescribeScalingActivities API. // // 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 @@ -3688,6 +3860,98 @@ func (c *AutoScaling) DescribeTerminationPolicyTypesWithContext(ctx aws.Context, return out, req.Send() } +const opDescribeWarmPool = "DescribeWarmPool" + +// DescribeWarmPoolRequest generates a "aws/request.Request" representing the +// client's request for the DescribeWarmPool 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 DescribeWarmPool for more information on using the DescribeWarmPool +// 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 DescribeWarmPoolRequest method. +// req, resp := client.DescribeWarmPoolRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeWarmPool +func (c *AutoScaling) DescribeWarmPoolRequest(input *DescribeWarmPoolInput) (req *request.Request, output *DescribeWarmPoolOutput) { + op := &request.Operation{ + Name: opDescribeWarmPool, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeWarmPoolInput{} + } + + output = &DescribeWarmPoolOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeWarmPool API operation for Auto Scaling. +// +// Gets information about a warm pool and its instances. +// +// For more information, see Warm pools for Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) +// in the Amazon EC2 Auto Scaling 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 +// the error. +// +// See the AWS API reference guide for Auto Scaling's +// API operation DescribeWarmPool for usage and error information. +// +// Returned Error Codes: +// * ErrCodeInvalidNextToken "InvalidNextToken" +// The NextToken value is not valid. +// +// * ErrCodeLimitExceededFault "LimitExceeded" +// You have already reached a limit for your Amazon EC2 Auto Scaling resources +// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). +// For more information, see DescribeAccountLimits (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html) +// in the Amazon EC2 Auto Scaling API Reference. +// +// * ErrCodeResourceContentionFault "ResourceContention" +// You already have a pending update to an Amazon EC2 Auto Scaling resource +// (for example, an Auto Scaling group, instance, or load balancer). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/DescribeWarmPool +func (c *AutoScaling) DescribeWarmPool(input *DescribeWarmPoolInput) (*DescribeWarmPoolOutput, error) { + req, out := c.DescribeWarmPoolRequest(input) + return out, req.Send() +} + +// DescribeWarmPoolWithContext is the same as DescribeWarmPool with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeWarmPool 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 *AutoScaling) DescribeWarmPoolWithContext(ctx aws.Context, input *DescribeWarmPoolInput, opts ...request.Option) (*DescribeWarmPoolOutput, error) { + req, out := c.DescribeWarmPoolRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDetachInstances = "DetachInstances" // DetachInstancesRequest generates a "aws/request.Request" representing the @@ -4385,6 +4649,99 @@ func (c *AutoScaling) ExitStandbyWithContext(ctx aws.Context, input *ExitStandby return out, req.Send() } +const opGetPredictiveScalingForecast = "GetPredictiveScalingForecast" + +// GetPredictiveScalingForecastRequest generates a "aws/request.Request" representing the +// client's request for the GetPredictiveScalingForecast 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 GetPredictiveScalingForecast for more information on using the GetPredictiveScalingForecast +// 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 GetPredictiveScalingForecastRequest method. +// req, resp := client.GetPredictiveScalingForecastRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/GetPredictiveScalingForecast +func (c *AutoScaling) GetPredictiveScalingForecastRequest(input *GetPredictiveScalingForecastInput) (req *request.Request, output *GetPredictiveScalingForecastOutput) { + op := &request.Operation{ + Name: opGetPredictiveScalingForecast, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetPredictiveScalingForecastInput{} + } + + output = &GetPredictiveScalingForecastOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetPredictiveScalingForecast API operation for Auto Scaling. +// +// Retrieves the forecast data for a predictive scaling policy. +// +// Load forecasts are predictions of the hourly load values using historical +// load data from CloudWatch and an analysis of historical trends. Capacity +// forecasts are represented as predicted values for the minimum capacity that +// is needed on an hourly basis, based on the hourly load forecast. +// +// A minimum of 24 hours of data is required to create the initial forecasts. +// However, having a full 14 days of historical data results in more accurate +// forecasts. +// +// For more information, see Predictive scaling for Amazon EC2 Auto Scaling +// (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-predictive-scaling.html) +// in the Amazon EC2 Auto Scaling 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 +// the error. +// +// See the AWS API reference guide for Auto Scaling's +// API operation GetPredictiveScalingForecast for usage and error information. +// +// Returned Error Codes: +// * ErrCodeResourceContentionFault "ResourceContention" +// You already have a pending update to an Amazon EC2 Auto Scaling resource +// (for example, an Auto Scaling group, instance, or load balancer). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/GetPredictiveScalingForecast +func (c *AutoScaling) GetPredictiveScalingForecast(input *GetPredictiveScalingForecastInput) (*GetPredictiveScalingForecastOutput, error) { + req, out := c.GetPredictiveScalingForecastRequest(input) + return out, req.Send() +} + +// GetPredictiveScalingForecastWithContext is the same as GetPredictiveScalingForecast with the addition of +// the ability to pass a context and additional request options. +// +// See GetPredictiveScalingForecast 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 *AutoScaling) GetPredictiveScalingForecastWithContext(ctx aws.Context, input *GetPredictiveScalingForecastInput, opts ...request.Option) (*GetPredictiveScalingForecastOutput, error) { + req, out := c.GetPredictiveScalingForecastRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutLifecycleHook = "PutLifecycleHook" // PutLifecycleHookRequest generates a "aws/request.Request" representing the @@ -4652,13 +5009,24 @@ func (c *AutoScaling) PutScalingPolicyRequest(input *PutScalingPolicyInput) (req // PutScalingPolicy API operation for Auto Scaling. // -// Creates or updates a scaling policy for an Auto Scaling group. +// Creates or updates a scaling policy for an Auto Scaling group. Scaling policies +// are used to scale an Auto Scaling group based on configurable metrics. If +// no policies are defined, the dynamic scaling and predictive scaling features +// are not used. // -// For more information about using scaling policies to scale your Auto Scaling -// group, see Target tracking scaling policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html) +// For more information about using dynamic scaling, see Target tracking scaling +// policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html) // and Step and simple scaling policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html) // in the Amazon EC2 Auto Scaling User Guide. // +// For more information about using predictive scaling, see Predictive scaling +// for Amazon EC2 Auto Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-predictive-scaling.html) +// in the Amazon EC2 Auto Scaling User Guide. +// +// You can view the scaling policies for an Auto Scaling group using the DescribePolicies +// API call. If you are no longer using a scaling policy, you can delete it +// by calling the DeletePolicy API. +// // 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. @@ -4748,12 +5116,14 @@ func (c *AutoScaling) PutScheduledUpdateGroupActionRequest(input *PutScheduledUp // PutScheduledUpdateGroupAction API operation for Auto Scaling. // // Creates or updates a scheduled scaling action for an Auto Scaling group. -// If you leave a parameter unspecified when updating a scheduled scaling action, -// the corresponding value remains unchanged. // // For more information, see Scheduled scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/schedule_time.html) // in the Amazon EC2 Auto Scaling User Guide. // +// You can view the scheduled actions for an Auto Scaling group using the DescribeScheduledActions +// API call. If you are no longer using a scheduled action, you can delete it +// by calling the DeleteScheduledAction API. +// // 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. @@ -4798,65 +5168,167 @@ func (c *AutoScaling) PutScheduledUpdateGroupActionWithContext(ctx aws.Context, return out, req.Send() } -const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat" +const opPutWarmPool = "PutWarmPool" -// RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the -// client's request for the RecordLifecycleActionHeartbeat operation. The "output" return +// PutWarmPoolRequest generates a "aws/request.Request" representing the +// client's request for the PutWarmPool 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 RecordLifecycleActionHeartbeat for more information on using the RecordLifecycleActionHeartbeat +// See PutWarmPool for more information on using the PutWarmPool // 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 RecordLifecycleActionHeartbeatRequest method. -// req, resp := client.RecordLifecycleActionHeartbeatRequest(params) +// // Example sending a request using the PutWarmPoolRequest method. +// req, resp := client.PutWarmPoolRequest(params) // // err := req.Send() // if err == nil { // resp is now filled // fmt.Println(resp) // } // -// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat -func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) { +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutWarmPool +func (c *AutoScaling) PutWarmPoolRequest(input *PutWarmPoolInput) (req *request.Request, output *PutWarmPoolOutput) { op := &request.Operation{ - Name: opRecordLifecycleActionHeartbeat, + Name: opPutWarmPool, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { - input = &RecordLifecycleActionHeartbeatInput{} + input = &PutWarmPoolInput{} } - output = &RecordLifecycleActionHeartbeatOutput{} + output = &PutWarmPoolOutput{} req = c.newRequest(op, input, output) req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } -// RecordLifecycleActionHeartbeat API operation for Auto Scaling. +// PutWarmPool API operation for Auto Scaling. // -// Records a heartbeat for the lifecycle action associated with the specified -// token or instance. This extends the timeout by the length of time defined -// using the PutLifecycleHook API call. +// Creates or updates a warm pool for the specified Auto Scaling group. A warm +// pool is a pool of pre-initialized EC2 instances that sits alongside the Auto +// Scaling group. Whenever your application needs to scale out, the Auto Scaling +// group can draw on the warm pool to meet its new desired capacity. For more +// information and example configurations, see Warm pools for Amazon EC2 Auto +// Scaling (https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) +// in the Amazon EC2 Auto Scaling User Guide. // -// This step is a part of the procedure for adding a lifecycle hook to an Auto -// Scaling group: +// This operation must be called from the Region in which the Auto Scaling group +// was created. This operation cannot be called on an Auto Scaling group that +// has a mixed instances policy or a launch template or launch configuration +// that requests Spot Instances. // -// (Optional) Create a Lambda function and a rule that allows CloudWatch Events -// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates -// instances. +// You can view the instances in the warm pool using the DescribeWarmPool API +// call. If you are no longer using a warm pool, you can delete it by calling +// the DeleteWarmPool API. // -// (Optional) Create a notification target and an IAM role. The target can be -// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon -// EC2 Auto Scaling to publish lifecycle notifications to the target. +// 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 Auto Scaling's +// API operation PutWarmPool for usage and error information. +// +// Returned Error Codes: +// * ErrCodeLimitExceededFault "LimitExceeded" +// You have already reached a limit for your Amazon EC2 Auto Scaling resources +// (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). +// For more information, see DescribeAccountLimits (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_DescribeAccountLimits.html) +// in the Amazon EC2 Auto Scaling API Reference. +// +// * ErrCodeResourceContentionFault "ResourceContention" +// You already have a pending update to an Amazon EC2 Auto Scaling resource +// (for example, an Auto Scaling group, instance, or load balancer). +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/PutWarmPool +func (c *AutoScaling) PutWarmPool(input *PutWarmPoolInput) (*PutWarmPoolOutput, error) { + req, out := c.PutWarmPoolRequest(input) + return out, req.Send() +} + +// PutWarmPoolWithContext is the same as PutWarmPool with the addition of +// the ability to pass a context and additional request options. +// +// See PutWarmPool 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 *AutoScaling) PutWarmPoolWithContext(ctx aws.Context, input *PutWarmPoolInput, opts ...request.Option) (*PutWarmPoolOutput, error) { + req, out := c.PutWarmPoolRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opRecordLifecycleActionHeartbeat = "RecordLifecycleActionHeartbeat" + +// RecordLifecycleActionHeartbeatRequest generates a "aws/request.Request" representing the +// client's request for the RecordLifecycleActionHeartbeat 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 RecordLifecycleActionHeartbeat for more information on using the RecordLifecycleActionHeartbeat +// 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 RecordLifecycleActionHeartbeatRequest method. +// req, resp := client.RecordLifecycleActionHeartbeatRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01/RecordLifecycleActionHeartbeat +func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecycleActionHeartbeatInput) (req *request.Request, output *RecordLifecycleActionHeartbeatOutput) { + op := &request.Operation{ + Name: opRecordLifecycleActionHeartbeat, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RecordLifecycleActionHeartbeatInput{} + } + + output = &RecordLifecycleActionHeartbeatOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RecordLifecycleActionHeartbeat API operation for Auto Scaling. +// +// Records a heartbeat for the lifecycle action associated with the specified +// token or instance. This extends the timeout by the length of time defined +// using the PutLifecycleHook API call. +// +// This step is a part of the procedure for adding a lifecycle hook to an Auto +// Scaling group: +// +// (Optional) Create a Lambda function and a rule that allows CloudWatch Events +// to invoke your Lambda function when Amazon EC2 Auto Scaling launches or terminates +// instances. +// +// (Optional) Create a notification target and an IAM role. The target can be +// either an Amazon SQS queue or an Amazon SNS topic. The role allows Amazon +// EC2 Auto Scaling to publish lifecycle notifications to the target. // // Create the lifecycle hook. Specify whether the hook is used when the instances // launch or terminate. @@ -4866,7 +5338,7 @@ func (c *AutoScaling) RecordLifecycleActionHeartbeatRequest(input *RecordLifecyc // // If you finish before the timeout period ends, complete the lifecycle action. // -// For more information, see Auto Scaling lifecycle (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) +// For more information, see Amazon EC2 Auto Scaling lifecycle hooks (https://docs.aws.amazon.com/autoscaling/ec2/userguide/lifecycle-hooks.html) // in the Amazon EC2 Auto Scaling User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5212,7 +5684,8 @@ func (c *AutoScaling) SetInstanceProtectionRequest(input *SetInstanceProtectionI // SetInstanceProtection API operation for Auto Scaling. // -// Updates the instance protection settings of the specified instances. +// Updates the instance protection settings of the specified instances. This +// operation cannot be called on instances in a warm pool. // // For more information about preventing instances that are part of an Auto // Scaling group from terminating on scale in, see Instance scale-in protection @@ -5307,18 +5780,19 @@ func (c *AutoScaling) StartInstanceRefreshRequest(input *StartInstanceRefreshInp // StartInstanceRefresh API operation for Auto Scaling. // // Starts a new instance refresh operation, which triggers a rolling replacement -// of all previously launched instances in the Auto Scaling group with a new -// group of instances. +// of previously launched instances in the Auto Scaling group with a new group +// of instances. // -// If successful, this call creates a new instance refresh request with a unique +// This operation is part of the instance refresh feature (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) +// in Amazon EC2 Auto Scaling, which helps you update instances in your Auto +// Scaling group after you make configuration changes. +// +// If the call succeeds, it creates a new instance refresh request with a unique // ID that you can use to track its progress. To query its status, call the // DescribeInstanceRefreshes API. To describe the instance refreshes that have // already run, call the DescribeInstanceRefreshes API. To cancel an instance // refresh operation in progress, use the CancelInstanceRefresh API. // -// For more information, see Replacing Auto Scaling Instances Based on an Instance -// Refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html). -// // 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. @@ -5500,7 +5974,7 @@ func (c *AutoScaling) TerminateInstanceInAutoScalingGroupRequest(input *Terminat // TerminateInstanceInAutoScalingGroup API operation for Auto Scaling. // // Terminates the specified instance and optionally adjusts the desired group -// size. +// size. This operation cannot be called on instances in a warm pool. // // This call simply makes a termination request. The instance is not terminated // immediately. When an instance is terminated, the instance status changes @@ -5600,6 +6074,9 @@ func (c *AutoScaling) UpdateAutoScalingGroupRequest(input *UpdateAutoScalingGrou // UpdateAutoScalingGroup API operation for Auto Scaling. // +// We strongly recommend that all Auto Scaling groups use launch templates to +// ensure full functionality for Amazon EC2 Auto Scaling and Amazon EC2. +// // Updates the configuration for the specified Auto Scaling group. // // To update an Auto Scaling group, specify the name of the group and the parameter @@ -5692,11 +6169,17 @@ type Activity struct { // ActivityId is a required field ActivityId *string `type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the Auto Scaling group. + AutoScalingGroupARN *string `min:"1" type:"string"` + // The name of the Auto Scaling group. // // AutoScalingGroupName is a required field AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + // The state of the Auto Scaling group, which is either InService or Deleted. + AutoScalingGroupState *string `min:"1" type:"string"` + // The reason the activity began. // // Cause is a required field @@ -5744,12 +6227,24 @@ func (s *Activity) SetActivityId(v string) *Activity { return s } +// SetAutoScalingGroupARN sets the AutoScalingGroupARN field's value. +func (s *Activity) SetAutoScalingGroupARN(v string) *Activity { + s.AutoScalingGroupARN = &v + return s +} + // SetAutoScalingGroupName sets the AutoScalingGroupName field's value. func (s *Activity) SetAutoScalingGroupName(v string) *Activity { s.AutoScalingGroupName = &v return s } +// SetAutoScalingGroupState sets the AutoScalingGroupState field's value. +func (s *Activity) SetAutoScalingGroupState(v string) *Activity { + s.AutoScalingGroupState = &v + return s +} + // SetCause sets the Cause field's value. func (s *Activity) SetCause(v string) *Activity { s.Cause = &v @@ -6383,6 +6878,45 @@ func (s *CancelInstanceRefreshOutput) SetInstanceRefreshId(v string) *CancelInst return s } +// A GetPredictiveScalingForecast call returns the capacity forecast for a predictive +// scaling policy. This structure includes the data points for that capacity +// forecast, along with the timestamps of those data points. +type CapacityForecast struct { + _ struct{} `type:"structure"` + + // The time stamps for the data points, in UTC format. + // + // Timestamps is a required field + Timestamps []*time.Time `type:"list" required:"true"` + + // The values of the data points. + // + // Values is a required field + Values []*float64 `type:"list" required:"true"` +} + +// String returns the string representation +func (s CapacityForecast) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CapacityForecast) GoString() string { + return s.String() +} + +// SetTimestamps sets the Timestamps field's value. +func (s *CapacityForecast) SetTimestamps(v []*time.Time) *CapacityForecast { + s.Timestamps = v + return s +} + +// SetValues sets the Values field's value. +func (s *CapacityForecast) SetValues(v []*float64) *CapacityForecast { + s.Values = v + return s +} + type CompleteLifecycleActionInput struct { _ struct{} `type:"structure"` @@ -6511,7 +7045,7 @@ type CreateAutoScalingGroupInput struct { // // Conditional: If your account supports EC2-Classic and VPC, this parameter // is required to launch instances into EC2-Classic. - AvailabilityZones []*string `min:"1" type:"list"` + AvailabilityZones []*string `type:"list"` // Indicates whether Capacity Rebalancing is enabled. Otherwise, Capacity Rebalancing // is disabled. When you turn on Capacity Rebalancing, Amazon EC2 Auto Scaling @@ -6522,6 +7056,9 @@ type CreateAutoScalingGroupInput struct { // in the Amazon EC2 Auto Scaling User Guide. CapacityRebalance *bool `type:"boolean"` + // Reserved. + Context *string `type:"string"` + // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. The default value is 300. This setting // applies when using simple scaling policies, but not when using other scaling @@ -6572,8 +7109,8 @@ type CreateAutoScalingGroupInput struct { // or InstanceId). LaunchConfigurationName *string `min:"1" type:"string"` - // Parameters used to specify the launch template (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html) - // and version to use to launch instances. + // Parameters used to specify the launch template and version to use to launch + // instances. // // Conditional: You must specify either a launch template (LaunchTemplate or // MixedInstancesPolicy) or a launch configuration (LaunchConfigurationName @@ -6618,13 +7155,13 @@ type CreateAutoScalingGroupInput struct { MinSize *int64 `type:"integer" required:"true"` // An embedded object that specifies a mixed instances policy. The required - // parameters must be specified. If optional parameters are unspecified, their + // properties must be specified. If optional properties are unspecified, their // default values are used. // - // The policy includes parameters that not only define the distribution of On-Demand + // The policy includes properties that not only define the distribution of On-Demand // Instances and Spot Instances, the maximum price to pay for Spot Instances, // and how the Auto Scaling group allocates instance types to fulfill On-Demand - // and Spot capacities, but also the parameters that specify the instance configuration + // and Spot capacities, but also the properties that specify the instance configuration // information—the launch template and instance types. The policy can also // include a weight for each instance type and different launch templates for // individual instance types. For more information, see Auto Scaling groups @@ -6647,8 +7184,8 @@ type CreateAutoScalingGroupInput struct { PlacementGroup *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. By default, Amazon - // EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, + // group uses to call other Amazon Web Services on your behalf. By default, + // Amazon EC2 Auto Scaling uses a service-linked role named AWSServiceRoleForAutoScaling, // which it creates if it does not exist. For more information, see Service-linked // roles (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html) // in the Amazon EC2 Auto Scaling User Guide. @@ -6707,9 +7244,6 @@ func (s *CreateAutoScalingGroupInput) Validate() error { if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) } - if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1)) - } if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 { invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1)) } @@ -6789,6 +7323,12 @@ func (s *CreateAutoScalingGroupInput) SetCapacityRebalance(v bool) *CreateAutoSc return s } +// SetContext sets the Context field's value. +func (s *CreateAutoScalingGroupInput) SetContext(v string) *CreateAutoScalingGroupInput { + s.Context = &v + return s +} + // SetDefaultCooldown sets the DefaultCooldown field's value. func (s *CreateAutoScalingGroupInput) SetDefaultCooldown(v int64) *CreateAutoScalingGroupInput { s.DefaultCooldown = &v @@ -7092,9 +7632,12 @@ type CreateLaunchConfigurationInput struct { // running instances is higher than the current Spot price. SpotPrice *string `min:"1" type:"string"` - // The Base64-encoded user data to make available to the launched EC2 instances. - // For more information, see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // in the Amazon EC2 User Guide for Linux Instances. + // The user data to make available to the launched EC2 instances. For more information, + // see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) + // (Linux) and Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html) + // (Windows). If you are using a command line tool, base64-encoding is performed + // for you, and you can load the text from a file. Otherwise, you must provide + // base64-encoded text. User data is limited to 16 KB. UserData *string `type:"string"` } @@ -7483,7 +8026,8 @@ type DeleteAutoScalingGroupInput struct { // Specifies that the group is to be deleted along with all instances associated // with the group, without waiting for all instances to be terminated. This - // parameter also deletes any lifecycle actions associated with the group. + // parameter also deletes any outstanding lifecycle actions associated with + // the group. ForceDelete *bool `type:"boolean"` } @@ -7940,6 +8484,73 @@ func (s DeleteTagsOutput) GoString() string { return s.String() } +type DeleteWarmPoolInput struct { + _ struct{} `type:"structure"` + + // The name of the Auto Scaling group. + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // Specifies that the warm pool is to be deleted along with all of its associated + // instances, without waiting for all instances to be terminated. This parameter + // also deletes any outstanding lifecycle actions associated with the warm pool + // instances. + ForceDelete *bool `type:"boolean"` +} + +// String returns the string representation +func (s DeleteWarmPoolInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWarmPoolInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteWarmPoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteWarmPoolInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. +func (s *DeleteWarmPoolInput) SetAutoScalingGroupName(v string) *DeleteWarmPoolInput { + s.AutoScalingGroupName = &v + return s +} + +// SetForceDelete sets the ForceDelete field's value. +func (s *DeleteWarmPoolInput) SetForceDelete(v bool) *DeleteWarmPoolInput { + s.ForceDelete = &v + return s +} + +type DeleteWarmPoolOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s DeleteWarmPoolOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteWarmPoolOutput) GoString() string { + return s.String() +} + type DescribeAccountLimitsInput struct { _ struct{} `type:"structure"` } @@ -7957,18 +8568,18 @@ func (s DescribeAccountLimitsInput) GoString() string { type DescribeAccountLimitsOutput struct { _ struct{} `type:"structure"` - // The maximum number of groups allowed for your AWS account. The default is - // 200 groups per AWS Region. + // The maximum number of groups allowed for your account. The default is 200 + // groups per Region. MaxNumberOfAutoScalingGroups *int64 `type:"integer"` - // The maximum number of launch configurations allowed for your AWS account. - // The default is 200 launch configurations per AWS Region. + // The maximum number of launch configurations allowed for your account. The + // default is 200 launch configurations per Region. MaxNumberOfLaunchConfigurations *int64 `type:"integer"` - // The current number of groups for your AWS account. + // The current number of groups for your account. NumberOfAutoScalingGroups *int64 `type:"integer"` - // The current number of launch configurations for your AWS account. + // The current number of launch configurations for your account. NumberOfLaunchConfigurations *int64 `type:"integer"` } @@ -8130,9 +8741,11 @@ func (s *DescribeAutoScalingGroupsOutput) SetNextToken(v string) *DescribeAutoSc type DescribeAutoScalingInstancesInput struct { _ struct{} `type:"structure"` - // The IDs of the instances. You can specify up to MaxRecords IDs. If you omit - // this parameter, all Auto Scaling instances are described. If you specify - // an ID that does not exist, it is ignored with no error. + // The IDs of the instances. If you omit this parameter, all Auto Scaling instances + // are described. If you specify an ID that does not exist, it is ignored with + // no error. + // + // Array Members: Maximum number of 50 items. InstanceIds []*string `type:"list"` // The maximum number of items to return with this call. The default value is @@ -8354,6 +8967,8 @@ type DescribeLaunchConfigurationsInput struct { // The launch configuration names. If you omit this parameter, all launch configurations // are described. + // + // Array Members: Maximum number of 50 items. LaunchConfigurationNames []*string `type:"list"` // The maximum number of items to return with this call. The default value is @@ -8875,12 +9490,13 @@ type DescribePoliciesInput struct { // The names of one or more policies. If you omit this parameter, all policies // are described. If a group name is provided, the results are limited to that - // group. This list is limited to 50 items. If you specify an unknown policy - // name, it is ignored with no error. + // group. If you specify an unknown policy name, it is ignored with no error. + // + // Array Members: Maximum number of 50 items. PolicyNames []*string `type:"list"` // One or more policy types. The valid values are SimpleScaling, StepScaling, - // and TargetTrackingScaling. + // TargetTrackingScaling, and PredictiveScaling. PolicyTypes []*string `type:"list"` } @@ -8975,16 +9591,20 @@ func (s *DescribePoliciesOutput) SetScalingPolicies(v []*ScalingPolicy) *Describ type DescribeScalingActivitiesInput struct { _ struct{} `type:"structure"` - // The activity IDs of the desired scaling activities. You can specify up to - // 50 IDs. If you omit this parameter, all activities for the past six weeks - // are described. If unknown activities are requested, they are ignored with - // no error. If you specify an Auto Scaling group, the results are limited to - // that group. + // The activity IDs of the desired scaling activities. If you omit this parameter, + // all activities for the past six weeks are described. If unknown activities + // are requested, they are ignored with no error. If you specify an Auto Scaling + // group, the results are limited to that group. + // + // Array Members: Maximum number of 50 IDs. ActivityIds []*string `type:"list"` // The name of the Auto Scaling group. AutoScalingGroupName *string `min:"1" type:"string"` + // Indicates whether to include scaling activity from deleted Auto Scaling groups. + IncludeDeletedGroups *bool `type:"boolean"` + // The maximum number of items to return with this call. The default value is // 100 and the maximum value is 100. MaxRecords *int64 `type:"integer"` @@ -9029,6 +9649,12 @@ func (s *DescribeScalingActivitiesInput) SetAutoScalingGroupName(v string) *Desc return s } +// SetIncludeDeletedGroups sets the IncludeDeletedGroups field's value. +func (s *DescribeScalingActivitiesInput) SetIncludeDeletedGroups(v bool) *DescribeScalingActivitiesInput { + s.IncludeDeletedGroups = &v + return s +} + // SetMaxRecords sets the MaxRecords field's value. func (s *DescribeScalingActivitiesInput) SetMaxRecords(v int64) *DescribeScalingActivitiesInput { s.MaxRecords = &v @@ -9134,9 +9760,11 @@ type DescribeScheduledActionsInput struct { // a previous call.) NextToken *string `type:"string"` - // The names of one or more scheduled actions. You can specify up to 50 actions. - // If you omit this parameter, all scheduled actions are described. If you specify - // an unknown scheduled action, it is ignored with no error. + // The names of one or more scheduled actions. If you omit this parameter, all + // scheduled actions are described. If you specify an unknown scheduled action, + // it is ignored with no error. + // + // Array Members: Maximum number of 50 actions. ScheduledActionNames []*string `type:"list"` // The earliest scheduled start time to return. If scheduled action names are @@ -9356,7 +9984,7 @@ func (s *DescribeTerminationPolicyTypesOutput) SetTerminationPolicyTypes(v []*st return s } -type DetachInstancesInput struct { +type DescribeWarmPoolInput struct { _ struct{} `type:"structure"` // The name of the Auto Scaling group. @@ -9364,38 +9992,34 @@ type DetachInstancesInput struct { // AutoScalingGroupName is a required field AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // The IDs of the instances. You can specify up to 20 instances. - InstanceIds []*string `type:"list"` + // The maximum number of instances to return with this call. The maximum value + // is 50. + MaxRecords *int64 `type:"integer"` - // Indicates whether the Auto Scaling group decrements the desired capacity - // value by the number of instances detached. - // - // ShouldDecrementDesiredCapacity is a required field - ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"` + // The token for the next set of instances to return. (You received this token + // from a previous call.) + NextToken *string `type:"string"` } // String returns the string representation -func (s DetachInstancesInput) String() string { +func (s DescribeWarmPoolInput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInstancesInput) GoString() string { +func (s DescribeWarmPoolInput) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *DetachInstancesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"} +func (s *DescribeWarmPoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeWarmPoolInput"} if s.AutoScalingGroupName == nil { invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) } if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) } - if s.ShouldDecrementDesiredCapacity == nil { - invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) - } if invalidParams.Len() > 0 { return invalidParams @@ -9404,47 +10028,66 @@ func (s *DetachInstancesInput) Validate() error { } // SetAutoScalingGroupName sets the AutoScalingGroupName field's value. -func (s *DetachInstancesInput) SetAutoScalingGroupName(v string) *DetachInstancesInput { +func (s *DescribeWarmPoolInput) SetAutoScalingGroupName(v string) *DescribeWarmPoolInput { s.AutoScalingGroupName = &v return s } -// SetInstanceIds sets the InstanceIds field's value. -func (s *DetachInstancesInput) SetInstanceIds(v []*string) *DetachInstancesInput { - s.InstanceIds = v +// SetMaxRecords sets the MaxRecords field's value. +func (s *DescribeWarmPoolInput) SetMaxRecords(v int64) *DescribeWarmPoolInput { + s.MaxRecords = &v return s } -// SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value. -func (s *DetachInstancesInput) SetShouldDecrementDesiredCapacity(v bool) *DetachInstancesInput { - s.ShouldDecrementDesiredCapacity = &v +// SetNextToken sets the NextToken field's value. +func (s *DescribeWarmPoolInput) SetNextToken(v string) *DescribeWarmPoolInput { + s.NextToken = &v return s } -type DetachInstancesOutput struct { +type DescribeWarmPoolOutput struct { _ struct{} `type:"structure"` - // The activities related to detaching the instances from the Auto Scaling group. - Activities []*Activity `type:"list"` + // The instances that are currently in the warm pool. + Instances []*Instance `type:"list"` + + // The token for the next set of items to return. (You received this token from + // a previous call.) + NextToken *string `type:"string"` + + // The warm pool configuration details. + WarmPoolConfiguration *WarmPoolConfiguration `type:"structure"` } // String returns the string representation -func (s DetachInstancesOutput) String() string { +func (s DescribeWarmPoolOutput) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s DetachInstancesOutput) GoString() string { +func (s DescribeWarmPoolOutput) GoString() string { return s.String() } -// SetActivities sets the Activities field's value. -func (s *DetachInstancesOutput) SetActivities(v []*Activity) *DetachInstancesOutput { - s.Activities = v +// SetInstances sets the Instances field's value. +func (s *DescribeWarmPoolOutput) SetInstances(v []*Instance) *DescribeWarmPoolOutput { + s.Instances = v return s } -type DetachLoadBalancerTargetGroupsInput struct { +// SetNextToken sets the NextToken field's value. +func (s *DescribeWarmPoolOutput) SetNextToken(v string) *DescribeWarmPoolOutput { + s.NextToken = &v + return s +} + +// SetWarmPoolConfiguration sets the WarmPoolConfiguration field's value. +func (s *DescribeWarmPoolOutput) SetWarmPoolConfiguration(v *WarmPoolConfiguration) *DescribeWarmPoolOutput { + s.WarmPoolConfiguration = v + return s +} + +type DetachInstancesInput struct { _ struct{} `type:"structure"` // The name of the Auto Scaling group. @@ -9452,9 +10095,97 @@ type DetachLoadBalancerTargetGroupsInput struct { // AutoScalingGroupName is a required field AutoScalingGroupName *string `min:"1" type:"string" required:"true"` - // The Amazon Resource Names (ARN) of the target groups. You can specify up - // to 10 target groups. - // + // The IDs of the instances. You can specify up to 20 instances. + InstanceIds []*string `type:"list"` + + // Indicates whether the Auto Scaling group decrements the desired capacity + // value by the number of instances detached. + // + // ShouldDecrementDesiredCapacity is a required field + ShouldDecrementDesiredCapacity *bool `type:"boolean" required:"true"` +} + +// String returns the string representation +func (s DetachInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInstancesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DetachInstancesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DetachInstancesInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.ShouldDecrementDesiredCapacity == nil { + invalidParams.Add(request.NewErrParamRequired("ShouldDecrementDesiredCapacity")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. +func (s *DetachInstancesInput) SetAutoScalingGroupName(v string) *DetachInstancesInput { + s.AutoScalingGroupName = &v + return s +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *DetachInstancesInput) SetInstanceIds(v []*string) *DetachInstancesInput { + s.InstanceIds = v + return s +} + +// SetShouldDecrementDesiredCapacity sets the ShouldDecrementDesiredCapacity field's value. +func (s *DetachInstancesInput) SetShouldDecrementDesiredCapacity(v bool) *DetachInstancesInput { + s.ShouldDecrementDesiredCapacity = &v + return s +} + +type DetachInstancesOutput struct { + _ struct{} `type:"structure"` + + // The activities related to detaching the instances from the Auto Scaling group. + Activities []*Activity `type:"list"` +} + +// String returns the string representation +func (s DetachInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DetachInstancesOutput) GoString() string { + return s.String() +} + +// SetActivities sets the Activities field's value. +func (s *DetachInstancesOutput) SetActivities(v []*Activity) *DetachInstancesOutput { + s.Activities = v + return s +} + +type DetachLoadBalancerTargetGroupsInput struct { + _ struct{} `type:"structure"` + + // The name of the Auto Scaling group. + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // The Amazon Resource Names (ARN) of the target groups. You can specify up + // to 10 target groups. + // // TargetGroupARNs is a required field TargetGroupARNs []*string `type:"list" required:"true"` } @@ -9619,6 +10350,20 @@ type DisableMetricsCollectionInput struct { // // * GroupTotalCapacity // + // * WarmPoolDesiredCapacity + // + // * WarmPoolWarmedCapacity + // + // * WarmPoolPendingCapacity + // + // * WarmPoolTerminatingCapacity + // + // * WarmPoolTotalCapacity + // + // * GroupAndWarmPoolDesiredCapacity + // + // * GroupAndWarmPoolTotalCapacity + // // If you omit this parameter, all metrics are disabled. Metrics []*string `type:"list"` } @@ -9693,15 +10438,16 @@ type Ebs struct { // If you are creating a volume from a snapshot, you cannot specify an encryption // value. Volumes that are created from encrypted snapshots are automatically // encrypted, and volumes that are created from unencrypted snapshots are automatically - // unencrypted. By default, encrypted snapshots use the AWS managed CMK that - // is used for EBS encryption, but you can specify a custom CMK when you create - // the snapshot. The ability to encrypt a snapshot during copying also allows - // you to apply a new CMK to an already-encrypted snapshot. Volumes restored - // from the resulting copy are only accessible using the new CMK. + // unencrypted. By default, encrypted snapshots use the Amazon Web Services + // managed CMK that is used for EBS encryption, but you can specify a custom + // CMK when you create the snapshot. The ability to encrypt a snapshot during + // copying also allows you to apply a new CMK to an already-encrypted snapshot. + // Volumes restored from the resulting copy are only accessible using the new + // CMK. // // Enabling encryption by default (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-by-default) - // results in all EBS volumes being encrypted with the AWS managed CMK or a - // customer managed CMK, whether or not the snapshot was encrypted. + // results in all EBS volumes being encrypted with the Amazon Web Services managed + // CMK or a customer managed CMK, whether or not the snapshot was encrypted. // // For more information, see Using Encryption with EBS-Backed AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html) // in the Amazon EC2 User Guide for Linux Instances and Required CMK key policy @@ -9709,13 +10455,24 @@ type Ebs struct { // in the Amazon EC2 Auto Scaling User Guide. Encrypted *bool `type:"boolean"` - // The number of I/O operations per second (IOPS) to provision for the volume. - // The maximum ratio of IOPS to volume size (in GiB) is 50:1. For more information, - // see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon EC2 User Guide for Linux Instances. + // The number of input/output (I/O) operations per second (IOPS) to provision + // for the volume. For gp3 and io1 volumes, this represents the number of IOPS + // that are provisioned for the volume. For gp2 volumes, this represents the + // baseline performance of the volume and the rate at which the volume accumulates + // I/O credits for bursting. + // + // The following are the supported values for each volume type: // - // Required when the volume type is io1. (Not used with standard, gp2, st1, - // or sc1 volumes.) + // * gp3: 3,000-16,000 IOPS + // + // * io1: 100-64,000 IOPS + // + // For io1 volumes, we guarantee 64,000 IOPS only for Instances built on the + // Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). + // Other instance families guarantee performance up to 32,000 IOPS. + // + // Iops is supported when the volume type is gp3 or io1 and required only when + // the volume type is io1. (Not used with standard, gp2, st1, or sc1 volumes.) Iops *int64 `min:"100" type:"integer"` // The snapshot ID of the volume to use. @@ -9723,26 +10480,29 @@ type Ebs struct { // You must specify either a VolumeSize or a SnapshotId. SnapshotId *string `min:"1" type:"string"` - // The volume size, in Gibibytes (GiB). + // The throughput (MiBps) to provision for a gp3 volume. + Throughput *int64 `min:"125" type:"integer"` + + // The volume size, in GiBs. The following are the supported volumes sizes for + // each volume type: // - // This can be a number from 1-1,024 for standard, 4-16,384 for io1, 1-16,384 - // for gp2, and 500-16,384 for st1 and sc1. If you specify a snapshot, the volume - // size must be equal to or larger than the snapshot size. + // * gp2 and gp3: 1-16,384 // - // Default: If you create a volume from a snapshot and you don't specify a volume - // size, the default is the snapshot size. + // * io1: 4-16,384 // - // You must specify either a VolumeSize or a SnapshotId. If you specify both + // * st1 and sc1: 125-16,384 + // + // * standard: 1-1,024 + // + // You must specify either a SnapshotId or a VolumeSize. If you specify both // SnapshotId and VolumeSize, the volume size must be equal or greater than // the size of the snapshot. VolumeSize *int64 `min:"1" type:"integer"` - // The volume type, which can be standard for Magnetic, io1 for Provisioned - // IOPS SSD, gp2 for General Purpose SSD, st1 for Throughput Optimized HDD, - // or sc1 for Cold HDD. For more information, see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // The volume type. For more information, see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon EC2 User Guide for Linux Instances. // - // Valid Values: standard | io1 | gp2 | st1 | sc1 + // Valid Values: standard | io1 | gp2 | st1 | sc1 | gp3 VolumeType *string `min:"1" type:"string"` } @@ -9765,6 +10525,9 @@ func (s *Ebs) Validate() error { if s.SnapshotId != nil && len(*s.SnapshotId) < 1 { invalidParams.Add(request.NewErrParamMinLen("SnapshotId", 1)) } + if s.Throughput != nil && *s.Throughput < 125 { + invalidParams.Add(request.NewErrParamMinValue("Throughput", 125)) + } if s.VolumeSize != nil && *s.VolumeSize < 1 { invalidParams.Add(request.NewErrParamMinValue("VolumeSize", 1)) } @@ -9802,6 +10565,12 @@ func (s *Ebs) SetSnapshotId(v string) *Ebs { return s } +// SetThroughput sets the Throughput field's value. +func (s *Ebs) SetThroughput(v int64) *Ebs { + s.Throughput = &v + return s +} + // SetVolumeSize sets the VolumeSize field's value. func (s *Ebs) SetVolumeSize(v int64) *Ebs { s.VolumeSize = &v @@ -9859,6 +10628,22 @@ type EnableMetricsCollectionInput struct { // // * GroupTotalCapacity // + // The warm pools feature supports the following additional metrics: + // + // * WarmPoolDesiredCapacity + // + // * WarmPoolWarmedCapacity + // + // * WarmPoolPendingCapacity + // + // * WarmPoolTerminatingCapacity + // + // * WarmPoolTotalCapacity + // + // * GroupAndWarmPoolDesiredCapacity + // + // * GroupAndWarmPoolTotalCapacity + // // If you omit this parameter, all metrics are enabled. Metrics []*string `type:"list"` } @@ -9961,6 +10746,20 @@ type EnabledMetric struct { // * GroupTerminatingCapacity // // * GroupTotalCapacity + // + // * WarmPoolDesiredCapacity + // + // * WarmPoolWarmedCapacity + // + // * WarmPoolPendingCapacity + // + // * WarmPoolTerminatingCapacity + // + // * WarmPoolTotalCapacity + // + // * GroupAndWarmPoolDesiredCapacity + // + // * GroupAndWarmPoolTotalCapacity Metric *string `min:"1" type:"string"` } @@ -10339,6 +11138,145 @@ func (s *Filter) SetValues(v []*string) *Filter { return s } +type GetPredictiveScalingForecastInput struct { + _ struct{} `type:"structure"` + + // The name of the Auto Scaling group. + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // The exclusive end time of the time range for the forecast data to get. The + // maximum time duration between the start and end time is 30 days. + // + // Although this parameter can accept a date and time that is more than two + // days in the future, the availability of forecast data has limits. Amazon + // EC2 Auto Scaling only issues forecasts for periods of two days in advance. + // + // EndTime is a required field + EndTime *time.Time `type:"timestamp" required:"true"` + + // The name of the policy. + // + // PolicyName is a required field + PolicyName *string `min:"1" type:"string" required:"true"` + + // The inclusive start time of the time range for the forecast data to get. + // At most, the date and time can be one year before the current date and time. + // + // StartTime is a required field + StartTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s GetPredictiveScalingForecastInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPredictiveScalingForecastInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetPredictiveScalingForecastInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetPredictiveScalingForecastInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.EndTime == nil { + invalidParams.Add(request.NewErrParamRequired("EndTime")) + } + if s.PolicyName == nil { + invalidParams.Add(request.NewErrParamRequired("PolicyName")) + } + if s.PolicyName != nil && len(*s.PolicyName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1)) + } + if s.StartTime == nil { + invalidParams.Add(request.NewErrParamRequired("StartTime")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. +func (s *GetPredictiveScalingForecastInput) SetAutoScalingGroupName(v string) *GetPredictiveScalingForecastInput { + s.AutoScalingGroupName = &v + return s +} + +// SetEndTime sets the EndTime field's value. +func (s *GetPredictiveScalingForecastInput) SetEndTime(v time.Time) *GetPredictiveScalingForecastInput { + s.EndTime = &v + return s +} + +// SetPolicyName sets the PolicyName field's value. +func (s *GetPredictiveScalingForecastInput) SetPolicyName(v string) *GetPredictiveScalingForecastInput { + s.PolicyName = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *GetPredictiveScalingForecastInput) SetStartTime(v time.Time) *GetPredictiveScalingForecastInput { + s.StartTime = &v + return s +} + +type GetPredictiveScalingForecastOutput struct { + _ struct{} `type:"structure"` + + // The capacity forecast. + // + // CapacityForecast is a required field + CapacityForecast *CapacityForecast `type:"structure" required:"true"` + + // The load forecast. + // + // LoadForecast is a required field + LoadForecast []*LoadForecast `type:"list" required:"true"` + + // The time the forecast was made. + // + // UpdateTime is a required field + UpdateTime *time.Time `type:"timestamp" required:"true"` +} + +// String returns the string representation +func (s GetPredictiveScalingForecastOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetPredictiveScalingForecastOutput) GoString() string { + return s.String() +} + +// SetCapacityForecast sets the CapacityForecast field's value. +func (s *GetPredictiveScalingForecastOutput) SetCapacityForecast(v *CapacityForecast) *GetPredictiveScalingForecastOutput { + s.CapacityForecast = v + return s +} + +// SetLoadForecast sets the LoadForecast field's value. +func (s *GetPredictiveScalingForecastOutput) SetLoadForecast(v []*LoadForecast) *GetPredictiveScalingForecastOutput { + s.LoadForecast = v + return s +} + +// SetUpdateTime sets the UpdateTime field's value. +func (s *GetPredictiveScalingForecastOutput) SetUpdateTime(v time.Time) *GetPredictiveScalingForecastOutput { + s.UpdateTime = &v + return s +} + // Describes an Auto Scaling group. type Group struct { _ struct{} `type:"structure"` @@ -10354,11 +11292,14 @@ type Group struct { // One or more Availability Zones for the group. // // AvailabilityZones is a required field - AvailabilityZones []*string `min:"1" type:"list" required:"true"` + AvailabilityZones []*string `type:"list" required:"true"` // Indicates whether Capacity Rebalancing is enabled. CapacityRebalance *bool `type:"boolean"` + // Reserved. + Context *string `type:"string"` + // The date and time the group was created. // // CreatedTime is a required field @@ -10426,8 +11367,11 @@ type Group struct { // The name of the placement group into which to launch your instances, if any. PlacementGroup *string `min:"1" type:"string"` + // The predicted capacity of the group when it has a predictive scaling policy. + PredictedCapacity *int64 `type:"integer"` + // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. + // group uses to call other Amazon Web Services on your behalf. ServiceLinkedRoleARN *string `min:"1" type:"string"` // The current state of the group when the DeleteAutoScalingGroup operation @@ -10448,6 +11392,12 @@ type Group struct { // One or more subnet IDs, if applicable, separated by commas. VPCZoneIdentifier *string `min:"1" type:"string"` + + // The warm pool for the group. + WarmPoolConfiguration *WarmPoolConfiguration `type:"structure"` + + // The current size of the warm pool. + WarmPoolSize *int64 `type:"integer"` } // String returns the string representation @@ -10484,6 +11434,12 @@ func (s *Group) SetCapacityRebalance(v bool) *Group { return s } +// SetContext sets the Context field's value. +func (s *Group) SetContext(v string) *Group { + s.Context = &v + return s +} + // SetCreatedTime sets the CreatedTime field's value. func (s *Group) SetCreatedTime(v time.Time) *Group { s.CreatedTime = &v @@ -10580,6 +11536,12 @@ func (s *Group) SetPlacementGroup(v string) *Group { return s } +// SetPredictedCapacity sets the PredictedCapacity field's value. +func (s *Group) SetPredictedCapacity(v int64) *Group { + s.PredictedCapacity = &v + return s +} + // SetServiceLinkedRoleARN sets the ServiceLinkedRoleARN field's value. func (s *Group) SetServiceLinkedRoleARN(v string) *Group { s.ServiceLinkedRoleARN = &v @@ -10622,6 +11584,18 @@ func (s *Group) SetVPCZoneIdentifier(v string) *Group { return s } +// SetWarmPoolConfiguration sets the WarmPoolConfiguration field's value. +func (s *Group) SetWarmPoolConfiguration(v *WarmPoolConfiguration) *Group { + s.WarmPoolConfiguration = v + return s +} + +// SetWarmPoolSize sets the WarmPoolSize field's value. +func (s *Group) SetWarmPoolSize(v int64) *Group { + s.WarmPoolSize = &v + return s +} + // Describes an EC2 instance. type Instance struct { _ struct{} `type:"structure"` @@ -10654,7 +11628,8 @@ type Instance struct { LaunchTemplate *LaunchTemplateSpecification `type:"structure"` // A description of the current lifecycle state. The Quarantined state is not - // used. + // used. For information about lifecycle states, see Instance lifecycle (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) + // in the Amazon EC2 Auto Scaling User Guide. // // LifecycleState is a required field LifecycleState *string `type:"string" required:"true" enum:"LifecycleState"` @@ -10773,7 +11748,15 @@ type InstanceDetails struct { // The launch template for the instance. LaunchTemplate *LaunchTemplateSpecification `type:"structure"` - // The lifecycle state for the instance. + // The lifecycle state for the instance. The Quarantined state is not used. + // For information about lifecycle states, see Instance lifecycle (https://docs.aws.amazon.com/autoscaling/ec2/userguide/AutoScalingGroupLifecycle.html) + // in the Amazon EC2 Auto Scaling User Guide. + // + // Valid Values: Pending | Pending:Wait | Pending:Proceed | Quarantined | InService + // | Terminating | Terminating:Wait | Terminating:Proceed | Terminated | Detaching + // | Detached | EnteringStandby | Standby | Warmed:Pending | Warmed:Pending:Wait + // | Warmed:Pending:Proceed | Warmed:Terminating | Warmed:Terminating:Wait | + // Warmed:Terminating:Proceed | Warmed:Terminated | Warmed:Stopped | Warmed:Running // // LifecycleState is a required field LifecycleState *string `min:"1" type:"string" required:"true"` @@ -10878,8 +11861,6 @@ type InstanceMetadataOptions struct { // larger the number, the further instance metadata requests can travel. // // Default: 1 - // - // Possible values: Integers from 1 to 64 HttpPutResponseHopLimit *int64 `min:"1" type:"integer"` // The state of token usage for your instance metadata requests. If the parameter @@ -10984,9 +11965,12 @@ type InstanceRefresh struct { // replacement, Amazon EC2 Auto Scaling tracks the instance's health status // and warm-up time. When the instance's health status changes to healthy and // the specified warm-up time passes, the instance is considered updated and - // added to the percentage complete. + // is added to the percentage complete. PercentageComplete *int64 `type:"integer"` + // Additional progress details for an Auto Scaling group that has a warm pool. + ProgressDetails *InstanceRefreshProgressDetails `type:"structure"` + // The date and time at which the instance refresh began. StartTime *time.Time `type:"timestamp"` @@ -11052,6 +12036,12 @@ func (s *InstanceRefresh) SetPercentageComplete(v int64) *InstanceRefresh { return s } +// SetProgressDetails sets the ProgressDetails field's value. +func (s *InstanceRefresh) SetProgressDetails(v *InstanceRefreshProgressDetails) *InstanceRefresh { + s.ProgressDetails = v + return s +} + // SetStartTime sets the StartTime field's value. func (s *InstanceRefresh) SetStartTime(v time.Time) *InstanceRefresh { s.StartTime = &v @@ -11070,17 +12060,130 @@ func (s *InstanceRefresh) SetStatusReason(v string) *InstanceRefresh { return s } -// Describes an instances distribution for an Auto Scaling group with a MixedInstancesPolicy. -// -// The instances distribution specifies the distribution of On-Demand Instances -// and Spot Instances, the maximum price to pay for Spot Instances, and how -// the Auto Scaling group allocates instance types to fulfill On-Demand and -// Spot capacities. -// -// When you update SpotAllocationStrategy, SpotInstancePools, or SpotMaxPrice, -// this update action does not deploy any changes across the running Amazon -// EC2 instances in the group. Your existing Spot Instances continue to run -// as long as the maximum price for those instances is higher than the current +// Reports the progress of an instance refresh on instances that are in the +// Auto Scaling group. +type InstanceRefreshLivePoolProgress struct { + _ struct{} `type:"structure"` + + // The number of instances remaining to update. + InstancesToUpdate *int64 `type:"integer"` + + // The percentage of instances in the Auto Scaling group that have been replaced. + // For each instance replacement, Amazon EC2 Auto Scaling tracks the instance's + // health status and warm-up time. When the instance's health status changes + // to healthy and the specified warm-up time passes, the instance is considered + // updated and is added to the percentage complete. + PercentageComplete *int64 `type:"integer"` +} + +// String returns the string representation +func (s InstanceRefreshLivePoolProgress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceRefreshLivePoolProgress) GoString() string { + return s.String() +} + +// SetInstancesToUpdate sets the InstancesToUpdate field's value. +func (s *InstanceRefreshLivePoolProgress) SetInstancesToUpdate(v int64) *InstanceRefreshLivePoolProgress { + s.InstancesToUpdate = &v + return s +} + +// SetPercentageComplete sets the PercentageComplete field's value. +func (s *InstanceRefreshLivePoolProgress) SetPercentageComplete(v int64) *InstanceRefreshLivePoolProgress { + s.PercentageComplete = &v + return s +} + +// Reports the progress of an instance refresh on an Auto Scaling group that +// has a warm pool. This includes separate details for instances in the warm +// pool and instances in the Auto Scaling group (the live pool). +type InstanceRefreshProgressDetails struct { + _ struct{} `type:"structure"` + + // Indicates the progress of an instance refresh on instances that are in the + // Auto Scaling group. + LivePoolProgress *InstanceRefreshLivePoolProgress `type:"structure"` + + // Indicates the progress of an instance refresh on instances that are in the + // warm pool. + WarmPoolProgress *InstanceRefreshWarmPoolProgress `type:"structure"` +} + +// String returns the string representation +func (s InstanceRefreshProgressDetails) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceRefreshProgressDetails) GoString() string { + return s.String() +} + +// SetLivePoolProgress sets the LivePoolProgress field's value. +func (s *InstanceRefreshProgressDetails) SetLivePoolProgress(v *InstanceRefreshLivePoolProgress) *InstanceRefreshProgressDetails { + s.LivePoolProgress = v + return s +} + +// SetWarmPoolProgress sets the WarmPoolProgress field's value. +func (s *InstanceRefreshProgressDetails) SetWarmPoolProgress(v *InstanceRefreshWarmPoolProgress) *InstanceRefreshProgressDetails { + s.WarmPoolProgress = v + return s +} + +// Reports the progress of an instance refresh on instances that are in the +// warm pool. +type InstanceRefreshWarmPoolProgress struct { + _ struct{} `type:"structure"` + + // The number of instances remaining to update. + InstancesToUpdate *int64 `type:"integer"` + + // The percentage of instances in the warm pool that have been replaced. For + // each instance replacement, Amazon EC2 Auto Scaling tracks the instance's + // health status and warm-up time. When the instance's health status changes + // to healthy and the specified warm-up time passes, the instance is considered + // updated and is added to the percentage complete. + PercentageComplete *int64 `type:"integer"` +} + +// String returns the string representation +func (s InstanceRefreshWarmPoolProgress) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceRefreshWarmPoolProgress) GoString() string { + return s.String() +} + +// SetInstancesToUpdate sets the InstancesToUpdate field's value. +func (s *InstanceRefreshWarmPoolProgress) SetInstancesToUpdate(v int64) *InstanceRefreshWarmPoolProgress { + s.InstancesToUpdate = &v + return s +} + +// SetPercentageComplete sets the PercentageComplete field's value. +func (s *InstanceRefreshWarmPoolProgress) SetPercentageComplete(v int64) *InstanceRefreshWarmPoolProgress { + s.PercentageComplete = &v + return s +} + +// Describes an instances distribution for an Auto Scaling group with a MixedInstancesPolicy. +// +// The instances distribution specifies the distribution of On-Demand Instances +// and Spot Instances, the maximum price to pay for Spot Instances, and how +// the Auto Scaling group allocates instance types to fulfill On-Demand and +// Spot capacities. +// +// When you update SpotAllocationStrategy, SpotInstancePools, or SpotMaxPrice, +// this update action does not deploy any changes across the running Amazon +// EC2 instances in the group. Your existing Spot Instances continue to run +// as long as the maximum price for those instances is higher than the current // Spot price. When scale out occurs, Amazon EC2 Auto Scaling launches instances // based on the new settings. When scale in occurs, Amazon EC2 Auto Scaling // terminates instances according to the group's termination policies. @@ -11089,11 +12192,12 @@ type InstancesDistribution struct { // Indicates how to allocate instance types to fulfill On-Demand capacity. The // only valid value is prioritized, which is also the default value. This strategy - // uses the order of instance types in the overrides to define the launch priority - // of each instance type. The first instance type in the array is prioritized - // higher than the last. If all your On-Demand capacity cannot be fulfilled - // using your highest priority instance, then the Auto Scaling groups launches - // the remaining capacity using the second priority instance type, and so on. + // uses the order of instance types in the LaunchTemplateOverrides to define + // the launch priority of each instance type. The first instance type in the + // array is prioritized higher than the last. If all your On-Demand capacity + // cannot be fulfilled using your highest priority instance, then the Auto Scaling + // groups launches the remaining capacity using the second priority instance + // type, and so on. OnDemandAllocationStrategy *string `type:"string"` // The minimum amount of the Auto Scaling group's capacity that must be fulfilled @@ -11109,13 +12213,20 @@ type InstancesDistribution struct { // to 100 if not specified. If set to 100, only On-Demand Instances are provisioned. OnDemandPercentageAboveBaseCapacity *int64 `type:"integer"` - // Indicates how to allocate instances across Spot Instance pools. If the allocation - // strategy is capacity-optimized (recommended), the Auto Scaling group launches - // instances using Spot pools that are optimally chosen based on the available - // Spot capacity. If the allocation strategy is lowest-price, the Auto Scaling - // group launches instances using the Spot pools with the lowest price, and - // evenly allocates your instances across the number of Spot pools that you - // specify. Defaults to lowest-price if not specified. + // Indicates how to allocate instances across Spot Instance pools. + // + // If the allocation strategy is lowest-price, the Auto Scaling group launches + // instances using the Spot pools with the lowest price, and evenly allocates + // your instances across the number of Spot pools that you specify. Defaults + // to lowest-price if not specified. + // + // If the allocation strategy is capacity-optimized (recommended), the Auto + // Scaling group launches instances using Spot pools that are optimally chosen + // based on the available Spot capacity. Alternatively, you can use capacity-optimized-prioritized + // and set the order of instance types in the list of launch template overrides + // from highest to lowest priority (from first to last in the list). Amazon + // EC2 Auto Scaling honors the instance type priorities on a best-effort basis + // but optimizes for capacity first. SpotAllocationStrategy *string `type:"string"` // The number of Spot Instance pools across which to allocate your Spot Instances. @@ -11297,9 +12408,12 @@ type LaunchConfiguration struct { // in the Amazon EC2 Auto Scaling User Guide. SpotPrice *string `min:"1" type:"string"` - // The Base64-encoded user data to make available to the launched EC2 instances. - // For more information, see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) - // in the Amazon EC2 User Guide for Linux Instances. + // The user data to make available to the launched EC2 instances. For more information, + // see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) + // (Linux) and Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html) + // (Windows). If you are using a command line tool, base64-encoding is performed + // for you, and you can load the text from a file. Otherwise, you must provide + // base64-encoded text. User data is limited to 16 KB. UserData *string `type:"string"` } @@ -11435,7 +12549,7 @@ func (s *LaunchConfiguration) SetUserData(v string) *LaunchConfiguration { // Describes a launch template and overrides. // -// You specify these parameters as part of a mixed instances policy. +// You specify these properties as part of a mixed instances policy. // // When you update the launch template or overrides, existing Amazon EC2 instances // continue to run. When scale out occurs, Amazon EC2 Auto Scaling launches @@ -11447,7 +12561,7 @@ type LaunchTemplate struct { // The launch template to use. LaunchTemplateSpecification *LaunchTemplateSpecification `type:"structure"` - // Any parameters that you specify override the same parameters in the launch + // Any properties that you specify override the same properties in the launch // template. If not provided, Amazon EC2 Auto Scaling uses the instance type // specified in the launch template when it launches an instance. Overrides []*LaunchTemplateOverrides `type:"list"` @@ -11501,8 +12615,10 @@ func (s *LaunchTemplate) SetOverrides(v []*LaunchTemplateOverrides) *LaunchTempl } // Describes an override for a launch template. The maximum number of instance -// types that can be associated with an Auto Scaling group is 20. For more information, -// see Configuring overrides (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-override-options.html) +// types that can be associated with an Auto Scaling group is 40. The maximum +// number of distinct launch templates you can define for an Auto Scaling group +// is 20. For more information about configuring overrides, see Configuring +// overrides (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-override-options.html) // in the Amazon EC2 Auto Scaling User Guide. type LaunchTemplateOverrides struct { _ struct{} `type:"structure"` @@ -11712,7 +12828,7 @@ type LifecycleHook struct { // The ARN of the target that Amazon EC2 Auto Scaling sends notifications to // when an instance is in the transition state for the lifecycle hook. The notification // target can be either an SQS queue or an SNS topic. - NotificationTargetARN *string `min:"1" type:"string"` + NotificationTargetARN *string `type:"string"` // The ARN of the IAM role that allows the Auto Scaling group to publish to // the specified notification target. @@ -11935,17 +13051,6 @@ func (s *LifecycleHookSpecification) SetRoleARN(v string) *LifecycleHookSpecific } // Describes the state of a Classic Load Balancer. -// -// If you specify a load balancer when creating the Auto Scaling group, the -// state of the load balancer is InService. -// -// If you attach a load balancer to an existing Auto Scaling group, the initial -// state is Adding. The state transitions to Added after all instances in the -// group are registered with the load balancer. If Elastic Load Balancing health -// checks are enabled for the load balancer, the state transitions to InService -// after at least one instance in the group passes the health check. If EC2 -// health checks are enabled instead, the load balancer remains in the Added -// state. type LoadBalancerState struct { _ struct{} `type:"structure"` @@ -11954,19 +13059,19 @@ type LoadBalancerState struct { // One of the following load balancer states: // - // * Adding - The instances in the group are being registered with the load + // * Adding - The Auto Scaling instances are being registered with the load // balancer. // - // * Added - All instances in the group are registered with the load balancer. + // * Added - All Auto Scaling instances are registered with the load balancer. // - // * InService - At least one instance in the group passed an ELB health + // * InService - At least one Auto Scaling instance passed an ELB health // check. // - // * Removing - The instances in the group are being deregistered from the + // * Removing - The Auto Scaling instances are being deregistered from the // load balancer. If connection draining is enabled, Elastic Load Balancing // waits for in-flight requests to complete before deregistering the instances. // - // * Removed - All instances in the group are deregistered from the load + // * Removed - All Auto Scaling instances are deregistered from the load // balancer. State *string `min:"1" type:"string"` } @@ -11994,13 +13099,6 @@ func (s *LoadBalancerState) SetState(v string) *LoadBalancerState { } // Describes the state of a target group. -// -// If you attach a target group to an existing Auto Scaling group, the initial -// state is Adding. The state transitions to Added after all Auto Scaling instances -// are registered with the target group. If Elastic Load Balancing health checks -// are enabled, the state transitions to InService after at least one Auto Scaling -// instance passes the health check. If EC2 health checks are enabled instead, -// the target group remains in the Added state. type LoadBalancerTargetGroupState struct { _ struct{} `type:"structure"` @@ -12048,6 +13146,56 @@ func (s *LoadBalancerTargetGroupState) SetState(v string) *LoadBalancerTargetGro return s } +// A GetPredictiveScalingForecast call returns the load forecast for a predictive +// scaling policy. This structure includes the data points for that load forecast, +// along with the timestamps of those data points and the metric specification. +type LoadForecast struct { + _ struct{} `type:"structure"` + + // The metric specification for the load forecast. + // + // MetricSpecification is a required field + MetricSpecification *PredictiveScalingMetricSpecification `type:"structure" required:"true"` + + // The time stamps for the data points, in UTC format. + // + // Timestamps is a required field + Timestamps []*time.Time `type:"list" required:"true"` + + // The values of the data points. + // + // Values is a required field + Values []*float64 `type:"list" required:"true"` +} + +// String returns the string representation +func (s LoadForecast) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LoadForecast) GoString() string { + return s.String() +} + +// SetMetricSpecification sets the MetricSpecification field's value. +func (s *LoadForecast) SetMetricSpecification(v *PredictiveScalingMetricSpecification) *LoadForecast { + s.MetricSpecification = v + return s +} + +// SetTimestamps sets the Timestamps field's value. +func (s *LoadForecast) SetTimestamps(v []*time.Time) *LoadForecast { + s.Timestamps = v + return s +} + +// SetValues sets the Values field's value. +func (s *LoadForecast) SetValues(v []*float64) *LoadForecast { + s.Values = v + return s +} + // Describes a metric. type MetricCollectionType struct { _ struct{} `type:"structure"` @@ -12079,6 +13227,20 @@ type MetricCollectionType struct { // * GroupTerminatingCapacity // // * GroupTotalCapacity + // + // * WarmPoolDesiredCapacity + // + // * WarmPoolWarmedCapacity + // + // * WarmPoolPendingCapacity + // + // * WarmPoolTerminatingCapacity + // + // * WarmPoolTotalCapacity + // + // * GroupAndWarmPoolDesiredCapacity + // + // * GroupAndWarmPoolTotalCapacity Metric *string `min:"1" type:"string"` } @@ -12184,13 +13346,13 @@ func (s *MetricGranularityType) SetGranularity(v string) *MetricGranularityType // // You can create a mixed instances policy for a new Auto Scaling group, or // you can create it for an existing group by updating the group to specify -// MixedInstancesPolicy as the top-level parameter instead of a launch configuration +// MixedInstancesPolicy as the top-level property instead of a launch configuration // or launch template. type MixedInstancesPolicy struct { _ struct{} `type:"structure"` // Specifies the instances distribution. If not provided, the value for each - // parameter in InstancesDistribution uses a default value. + // property in InstancesDistribution uses a default value. InstancesDistribution *InstancesDistribution `type:"structure"` // Specifies the launch template to use and optionally the instance types (overrides) @@ -12277,48 +13439,530 @@ func (s *NotificationConfiguration) SetAutoScalingGroupName(v string) *Notificat return s } -// SetNotificationType sets the NotificationType field's value. -func (s *NotificationConfiguration) SetNotificationType(v string) *NotificationConfiguration { - s.NotificationType = &v +// SetNotificationType sets the NotificationType field's value. +func (s *NotificationConfiguration) SetNotificationType(v string) *NotificationConfiguration { + s.NotificationType = &v + return s +} + +// SetTopicARN sets the TopicARN field's value. +func (s *NotificationConfiguration) SetTopicARN(v string) *NotificationConfiguration { + s.TopicARN = &v + return s +} + +// Represents a predefined metric for a target tracking scaling policy to use +// with Amazon EC2 Auto Scaling. +type PredefinedMetricSpecification struct { + _ struct{} `type:"structure"` + + // The metric type. The following predefined metrics are available: + // + // * ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling + // group. + // + // * ASGAverageNetworkIn - Average number of bytes received on all network + // interfaces by the Auto Scaling group. + // + // * ASGAverageNetworkOut - Average number of bytes sent out on all network + // interfaces by the Auto Scaling group. + // + // * ALBRequestCountPerTarget - Number of requests completed per target in + // an Application Load Balancer target group. + // + // PredefinedMetricType is a required field + PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"` + + // A label that uniquely identifies a specific Application Load Balancer target + // group from which to determine the average request count served by your Auto + // Scaling group. You can't specify a resource label unless the target group + // is attached to the Auto Scaling group. + // + // You create the resource label by appending the final portion of the load + // balancer ARN and the final portion of the target group ARN into a single + // value, separated by a forward slash (/). The format of the resource label + // is: + // + // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff. + // + // Where: + // + // * app// is the final portion of + // the load balancer ARN + // + // * targetgroup// is the final portion + // of the target group ARN. + // + // To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers + // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // API operation. To find the ARN for the target group, use the DescribeTargetGroups + // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html) + // API operation. + ResourceLabel *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PredefinedMetricSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PredefinedMetricSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PredefinedMetricSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"} + if s.PredefinedMetricType == nil { + invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType")) + } + if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPredefinedMetricType sets the PredefinedMetricType field's value. +func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification { + s.PredefinedMetricType = &v + return s +} + +// SetResourceLabel sets the ResourceLabel field's value. +func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification { + s.ResourceLabel = &v + return s +} + +// Represents a predictive scaling policy configuration to use with Amazon EC2 +// Auto Scaling. +type PredictiveScalingConfiguration struct { + _ struct{} `type:"structure"` + + // Defines the behavior that should be applied if the forecast capacity approaches + // or exceeds the maximum capacity of the Auto Scaling group. Defaults to HonorMaxCapacity + // if not specified. + // + // The following are possible values: + // + // * HonorMaxCapacity - Amazon EC2 Auto Scaling cannot scale out capacity + // higher than the maximum capacity. The maximum capacity is enforced as + // a hard limit. + // + // * IncreaseMaxCapacity - Amazon EC2 Auto Scaling can scale out capacity + // higher than the maximum capacity when the forecast capacity is close to + // or exceeds the maximum capacity. The upper limit is determined by the + // forecasted capacity and the value for MaxCapacityBuffer. + MaxCapacityBreachBehavior *string `type:"string" enum:"PredictiveScalingMaxCapacityBreachBehavior"` + + // The size of the capacity buffer to use when the forecast capacity is close + // to or exceeds the maximum capacity. The value is specified as a percentage + // relative to the forecast capacity. For example, if the buffer is 10, this + // means a 10 percent buffer, such that if the forecast capacity is 50, and + // the maximum capacity is 40, then the effective maximum capacity is 55. + // + // If set to 0, Amazon EC2 Auto Scaling may scale capacity higher than the maximum + // capacity to equal but not exceed forecast capacity. + // + // Required if the MaxCapacityBreachBehavior property is set to IncreaseMaxCapacity, + // and cannot be used otherwise. + MaxCapacityBuffer *int64 `type:"integer"` + + // This structure includes the metrics and target utilization to use for predictive + // scaling. + // + // This is an array, but we currently only support a single metric specification. + // That is, you can specify a target value and a single metric pair, or a target + // value and one scaling metric and one load metric. + // + // MetricSpecifications is a required field + MetricSpecifications []*PredictiveScalingMetricSpecification `type:"list" required:"true"` + + // The predictive scaling mode. Defaults to ForecastOnly if not specified. + Mode *string `type:"string" enum:"PredictiveScalingMode"` + + // The amount of time, in seconds, by which the instance launch time can be + // advanced. For example, the forecast says to add capacity at 10:00 AM, and + // you choose to pre-launch instances by 5 minutes. In that case, the instances + // will be launched at 9:55 AM. The intention is to give resources time to be + // provisioned. It can take a few minutes to launch an EC2 instance. The actual + // amount of time required depends on several factors, such as the size of the + // instance and whether there are startup scripts to complete. + // + // The value must be less than the forecast interval duration of 3600 seconds + // (60 minutes). Defaults to 300 seconds if not specified. + SchedulingBufferTime *int64 `type:"integer"` +} + +// String returns the string representation +func (s PredictiveScalingConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PredictiveScalingConfiguration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PredictiveScalingConfiguration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PredictiveScalingConfiguration"} + if s.MetricSpecifications == nil { + invalidParams.Add(request.NewErrParamRequired("MetricSpecifications")) + } + if s.MetricSpecifications != nil { + for i, v := range s.MetricSpecifications { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricSpecifications", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetMaxCapacityBreachBehavior sets the MaxCapacityBreachBehavior field's value. +func (s *PredictiveScalingConfiguration) SetMaxCapacityBreachBehavior(v string) *PredictiveScalingConfiguration { + s.MaxCapacityBreachBehavior = &v + return s +} + +// SetMaxCapacityBuffer sets the MaxCapacityBuffer field's value. +func (s *PredictiveScalingConfiguration) SetMaxCapacityBuffer(v int64) *PredictiveScalingConfiguration { + s.MaxCapacityBuffer = &v + return s +} + +// SetMetricSpecifications sets the MetricSpecifications field's value. +func (s *PredictiveScalingConfiguration) SetMetricSpecifications(v []*PredictiveScalingMetricSpecification) *PredictiveScalingConfiguration { + s.MetricSpecifications = v + return s +} + +// SetMode sets the Mode field's value. +func (s *PredictiveScalingConfiguration) SetMode(v string) *PredictiveScalingConfiguration { + s.Mode = &v + return s +} + +// SetSchedulingBufferTime sets the SchedulingBufferTime field's value. +func (s *PredictiveScalingConfiguration) SetSchedulingBufferTime(v int64) *PredictiveScalingConfiguration { + s.SchedulingBufferTime = &v + return s +} + +// This structure specifies the metrics and target utilization settings for +// a predictive scaling policy. +// +// You must specify either a metric pair, or a load metric and a scaling metric +// individually. Specifying a metric pair instead of individual metrics provides +// a simpler way to configure metrics for a scaling policy. You choose the metric +// pair, and the policy automatically knows the correct sum and average statistics +// to use for the load metric and the scaling metric. +// +// Example +// +// * You create a predictive scaling policy and specify ALBRequestCount as +// the value for the metric pair and 1000.0 as the target value. For this +// type of metric, you must provide the metric dimension for the corresponding +// target group, so you also provide a resource label for the Application +// Load Balancer target group that is attached to your Auto Scaling group. +// +// * The number of requests the target group receives per minute provides +// the load metric, and the request count averaged between the members of +// the target group provides the scaling metric. In CloudWatch, this refers +// to the RequestCount and RequestCountPerTarget metrics, respectively. +// +// * For optimal use of predictive scaling, you adhere to the best practice +// of using a dynamic scaling policy to automatically scale between the minimum +// capacity and maximum capacity in response to real-time changes in resource +// utilization. +// +// * Amazon EC2 Auto Scaling consumes data points for the load metric over +// the last 14 days and creates an hourly load forecast for predictive scaling. +// (A minimum of 24 hours of data is required.) +// +// * After creating the load forecast, Amazon EC2 Auto Scaling determines +// when to reduce or increase the capacity of your Auto Scaling group in +// each hour of the forecast period so that the average number of requests +// received by each instance is as close to 1000 requests per minute as possible +// at all times. +type PredictiveScalingMetricSpecification struct { + _ struct{} `type:"structure"` + + // The load metric specification. + PredefinedLoadMetricSpecification *PredictiveScalingPredefinedLoadMetric `type:"structure"` + + // The metric pair specification from which Amazon EC2 Auto Scaling determines + // the appropriate scaling metric and load metric to use. + PredefinedMetricPairSpecification *PredictiveScalingPredefinedMetricPair `type:"structure"` + + // The scaling metric specification. + PredefinedScalingMetricSpecification *PredictiveScalingPredefinedScalingMetric `type:"structure"` + + // Specifies the target utilization. + // + // TargetValue is a required field + TargetValue *float64 `type:"double" required:"true"` +} + +// String returns the string representation +func (s PredictiveScalingMetricSpecification) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PredictiveScalingMetricSpecification) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PredictiveScalingMetricSpecification) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PredictiveScalingMetricSpecification"} + if s.TargetValue == nil { + invalidParams.Add(request.NewErrParamRequired("TargetValue")) + } + if s.PredefinedLoadMetricSpecification != nil { + if err := s.PredefinedLoadMetricSpecification.Validate(); err != nil { + invalidParams.AddNested("PredefinedLoadMetricSpecification", err.(request.ErrInvalidParams)) + } + } + if s.PredefinedMetricPairSpecification != nil { + if err := s.PredefinedMetricPairSpecification.Validate(); err != nil { + invalidParams.AddNested("PredefinedMetricPairSpecification", err.(request.ErrInvalidParams)) + } + } + if s.PredefinedScalingMetricSpecification != nil { + if err := s.PredefinedScalingMetricSpecification.Validate(); err != nil { + invalidParams.AddNested("PredefinedScalingMetricSpecification", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPredefinedLoadMetricSpecification sets the PredefinedLoadMetricSpecification field's value. +func (s *PredictiveScalingMetricSpecification) SetPredefinedLoadMetricSpecification(v *PredictiveScalingPredefinedLoadMetric) *PredictiveScalingMetricSpecification { + s.PredefinedLoadMetricSpecification = v + return s +} + +// SetPredefinedMetricPairSpecification sets the PredefinedMetricPairSpecification field's value. +func (s *PredictiveScalingMetricSpecification) SetPredefinedMetricPairSpecification(v *PredictiveScalingPredefinedMetricPair) *PredictiveScalingMetricSpecification { + s.PredefinedMetricPairSpecification = v + return s +} + +// SetPredefinedScalingMetricSpecification sets the PredefinedScalingMetricSpecification field's value. +func (s *PredictiveScalingMetricSpecification) SetPredefinedScalingMetricSpecification(v *PredictiveScalingPredefinedScalingMetric) *PredictiveScalingMetricSpecification { + s.PredefinedScalingMetricSpecification = v + return s +} + +// SetTargetValue sets the TargetValue field's value. +func (s *PredictiveScalingMetricSpecification) SetTargetValue(v float64) *PredictiveScalingMetricSpecification { + s.TargetValue = &v + return s +} + +// Describes a load metric for a predictive scaling policy. +// +// When returned in the output of DescribePolicies, it indicates that a predictive +// scaling policy uses individually specified load and scaling metrics instead +// of a metric pair. +type PredictiveScalingPredefinedLoadMetric struct { + _ struct{} `type:"structure"` + + // The metric type. + // + // PredefinedMetricType is a required field + PredefinedMetricType *string `type:"string" required:"true" enum:"PredefinedLoadMetricType"` + + // A label that uniquely identifies a specific Application Load Balancer target + // group from which to determine the request count served by your Auto Scaling + // group. You can't specify a resource label unless the target group is attached + // to the Auto Scaling group. + // + // You create the resource label by appending the final portion of the load + // balancer ARN and the final portion of the target group ARN into a single + // value, separated by a forward slash (/). The format of the resource label + // is: + // + // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff. + // + // Where: + // + // * app// is the final portion of + // the load balancer ARN + // + // * targetgroup// is the final portion + // of the target group ARN. + // + // To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers + // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // API operation. To find the ARN for the target group, use the DescribeTargetGroups + // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html) + // API operation. + ResourceLabel *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PredictiveScalingPredefinedLoadMetric) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PredictiveScalingPredefinedLoadMetric) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PredictiveScalingPredefinedLoadMetric) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PredictiveScalingPredefinedLoadMetric"} + if s.PredefinedMetricType == nil { + invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType")) + } + if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPredefinedMetricType sets the PredefinedMetricType field's value. +func (s *PredictiveScalingPredefinedLoadMetric) SetPredefinedMetricType(v string) *PredictiveScalingPredefinedLoadMetric { + s.PredefinedMetricType = &v + return s +} + +// SetResourceLabel sets the ResourceLabel field's value. +func (s *PredictiveScalingPredefinedLoadMetric) SetResourceLabel(v string) *PredictiveScalingPredefinedLoadMetric { + s.ResourceLabel = &v + return s +} + +// Represents a metric pair for a predictive scaling policy. +type PredictiveScalingPredefinedMetricPair struct { + _ struct{} `type:"structure"` + + // Indicates which metrics to use. There are two different types of metrics + // for each metric type: one is a load metric and one is a scaling metric. For + // example, if the metric type is ASGCPUUtilization, the Auto Scaling group's + // total CPU metric is used as the load metric, and the average CPU metric is + // used for the scaling metric. + // + // PredefinedMetricType is a required field + PredefinedMetricType *string `type:"string" required:"true" enum:"PredefinedMetricPairType"` + + // A label that uniquely identifies a specific Application Load Balancer target + // group from which to determine the total and average request count served + // by your Auto Scaling group. You can't specify a resource label unless the + // target group is attached to the Auto Scaling group. + // + // You create the resource label by appending the final portion of the load + // balancer ARN and the final portion of the target group ARN into a single + // value, separated by a forward slash (/). The format of the resource label + // is: + // + // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff. + // + // Where: + // + // * app// is the final portion of + // the load balancer ARN + // + // * targetgroup// is the final portion + // of the target group ARN. + // + // To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers + // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) + // API operation. To find the ARN for the target group, use the DescribeTargetGroups + // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeTargetGroups.html) + // API operation. + ResourceLabel *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s PredictiveScalingPredefinedMetricPair) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PredictiveScalingPredefinedMetricPair) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PredictiveScalingPredefinedMetricPair) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PredictiveScalingPredefinedMetricPair"} + if s.PredefinedMetricType == nil { + invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType")) + } + if s.ResourceLabel != nil && len(*s.ResourceLabel) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ResourceLabel", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetPredefinedMetricType sets the PredefinedMetricType field's value. +func (s *PredictiveScalingPredefinedMetricPair) SetPredefinedMetricType(v string) *PredictiveScalingPredefinedMetricPair { + s.PredefinedMetricType = &v return s } -// SetTopicARN sets the TopicARN field's value. -func (s *NotificationConfiguration) SetTopicARN(v string) *NotificationConfiguration { - s.TopicARN = &v +// SetResourceLabel sets the ResourceLabel field's value. +func (s *PredictiveScalingPredefinedMetricPair) SetResourceLabel(v string) *PredictiveScalingPredefinedMetricPair { + s.ResourceLabel = &v return s } -// Represents a predefined metric for a target tracking scaling policy to use -// with Amazon EC2 Auto Scaling. -type PredefinedMetricSpecification struct { +// Describes a scaling metric for a predictive scaling policy. +// +// When returned in the output of DescribePolicies, it indicates that a predictive +// scaling policy uses individually specified load and scaling metrics instead +// of a metric pair. +type PredictiveScalingPredefinedScalingMetric struct { _ struct{} `type:"structure"` - // The metric type. The following predefined metrics are available: - // - // * ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling - // group. - // - // * ASGAverageNetworkIn - Average number of bytes received on all network - // interfaces by the Auto Scaling group. - // - // * ASGAverageNetworkOut - Average number of bytes sent out on all network - // interfaces by the Auto Scaling group. - // - // * ALBRequestCountPerTarget - Number of requests completed per target in - // an Application Load Balancer target group. + // The metric type. // // PredefinedMetricType is a required field - PredefinedMetricType *string `type:"string" required:"true" enum:"MetricType"` + PredefinedMetricType *string `type:"string" required:"true" enum:"PredefinedScalingMetricType"` - // Identifies the resource associated with the metric type. You can't specify - // a resource label unless the metric type is ALBRequestCountPerTarget and there - // is a target group attached to the Auto Scaling group. + // A label that uniquely identifies a specific Application Load Balancer target + // group from which to determine the average request count served by your Auto + // Scaling group. You can't specify a resource label unless the target group + // is attached to the Auto Scaling group. // // You create the resource label by appending the final portion of the load // balancer ARN and the final portion of the target group ARN into a single - // value, separated by a forward slash (/). The format is app///targetgroup//, - // where: + // value, separated by a forward slash (/). The format of the resource label + // is: + // + // app/my-alb/778d41231b141a0f/targetgroup/my-alb-target-group/943f017f100becff. + // + // Where: // // * app// is the final portion of // the load balancer ARN @@ -12326,8 +13970,6 @@ type PredefinedMetricSpecification struct { // * targetgroup// is the final portion // of the target group ARN. // - // This is an example: app/EC2Co-EcsEl-1TKLTMITMM0EO/f37c06a68c1748aa/targetgroup/EC2Co-Defau-LDNM7Q3ZH1ZN/6d4ea56ca2d6a18d. - // // To find the ARN for an Application Load Balancer, use the DescribeLoadBalancers // (https://docs.aws.amazon.com/elasticloadbalancing/latest/APIReference/API_DescribeLoadBalancers.html) // API operation. To find the ARN for the target group, use the DescribeTargetGroups @@ -12337,18 +13979,18 @@ type PredefinedMetricSpecification struct { } // String returns the string representation -func (s PredefinedMetricSpecification) String() string { +func (s PredictiveScalingPredefinedScalingMetric) String() string { return awsutil.Prettify(s) } // GoString returns the string representation -func (s PredefinedMetricSpecification) GoString() string { +func (s PredictiveScalingPredefinedScalingMetric) GoString() string { return s.String() } // Validate inspects the fields of the type to determine if they are valid. -func (s *PredefinedMetricSpecification) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PredefinedMetricSpecification"} +func (s *PredictiveScalingPredefinedScalingMetric) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PredictiveScalingPredefinedScalingMetric"} if s.PredefinedMetricType == nil { invalidParams.Add(request.NewErrParamRequired("PredefinedMetricType")) } @@ -12363,13 +14005,13 @@ func (s *PredefinedMetricSpecification) Validate() error { } // SetPredefinedMetricType sets the PredefinedMetricType field's value. -func (s *PredefinedMetricSpecification) SetPredefinedMetricType(v string) *PredefinedMetricSpecification { +func (s *PredictiveScalingPredefinedScalingMetric) SetPredefinedMetricType(v string) *PredictiveScalingPredefinedScalingMetric { s.PredefinedMetricType = &v return s } // SetResourceLabel sets the ResourceLabel field's value. -func (s *PredefinedMetricSpecification) SetResourceLabel(v string) *PredefinedMetricSpecification { +func (s *PredictiveScalingPredefinedScalingMetric) SetResourceLabel(v string) *PredictiveScalingPredefinedScalingMetric { s.ResourceLabel = &v return s } @@ -12750,8 +14392,21 @@ type PutScalingPolicyInput struct { // * StepScaling // // * SimpleScaling (default) + // + // * PredictiveScaling PolicyType *string `min:"1" type:"string"` + // A predictive scaling policy. Provides support for only predefined metrics. + // + // Predictive scaling works with CPU utilization, network in/out, and the Application + // Load Balancer request count. + // + // For more information, see PredictiveScalingConfiguration (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_PredictiveScalingConfiguration.html) + // in the Amazon EC2 Auto Scaling API Reference. + // + // Required if the policy type is PredictiveScaling. + PredictiveScalingConfiguration *PredictiveScalingConfiguration `type:"structure"` + // The amount by which to scale, based on the specified adjustment type. A positive // value adds to the current capacity while a negative number removes from the // current capacity. For exact capacity, you must specify a positive value. @@ -12767,7 +14422,7 @@ type PutScalingPolicyInput struct { // type.) StepAdjustments []*StepAdjustment `type:"list"` - // A target tracking scaling policy. Includes support for predefined or customized + // A target tracking scaling policy. Provides support for predefined or customized // metrics. // // The following predefined metrics are available: @@ -12824,6 +14479,11 @@ func (s *PutScalingPolicyInput) Validate() error { if s.PolicyType != nil && len(*s.PolicyType) < 1 { invalidParams.Add(request.NewErrParamMinLen("PolicyType", 1)) } + if s.PredictiveScalingConfiguration != nil { + if err := s.PredictiveScalingConfiguration.Validate(); err != nil { + invalidParams.AddNested("PredictiveScalingConfiguration", err.(request.ErrInvalidParams)) + } + } if s.StepAdjustments != nil { for i, v := range s.StepAdjustments { if v == nil { @@ -12906,6 +14566,12 @@ func (s *PutScalingPolicyInput) SetPolicyType(v string) *PutScalingPolicyInput { return s } +// SetPredictiveScalingConfiguration sets the PredictiveScalingConfiguration field's value. +func (s *PutScalingPolicyInput) SetPredictiveScalingConfiguration(v *PredictiveScalingConfiguration) *PutScalingPolicyInput { + s.PredictiveScalingConfiguration = v + return s +} + // SetScalingAdjustment sets the ScalingAdjustment field's value. func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput { s.ScalingAdjustment = &v @@ -12970,8 +14636,7 @@ type PutScheduledUpdateGroupActionInput struct { // scale beyond this capacity if you add more scaling conditions. DesiredCapacity *int64 `type:"integer"` - // The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling - // does not perform the action after this time. + // The date and time for the recurring schedule to end, in UTC. EndTime *time.Time `type:"timestamp"` // The maximum size of the Auto Scaling group. @@ -12980,14 +14645,15 @@ type PutScheduledUpdateGroupActionInput struct { // The minimum size of the Auto Scaling group. MinSize *int64 `type:"integer"` - // The recurring schedule for this action, in Unix cron syntax format. This - // format consists of five fields separated by white spaces: [Minute] [Hour] - // [Day_of_Month] [Month_of_Year] [Day_of_Week]. The value must be in quotes - // (for example, "30 0 1 1,6,12 *"). For more information about this format, - // see Crontab (http://crontab.org). + // The recurring schedule for this action. This format consists of five fields + // separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] + // [Day_of_Week]. The value must be in quotes (for example, "30 0 1 1,6,12 *"). + // For more information about this format, see Crontab (http://crontab.org). // // When StartTime and EndTime are specified with Recurrence, they form the boundaries // of when the recurring action starts and stops. + // + // Cron expressions use Universal Coordinated Time (UTC) by default. Recurrence *string `min:"1" type:"string"` // The name of this scaling action. @@ -13008,6 +14674,15 @@ type PutScheduledUpdateGroupActionInput struct { // This parameter is no longer used. Time *time.Time `type:"timestamp"` + + // Specifies the time zone for a cron expression. If a time zone is not provided, + // UTC is used by default. + // + // Valid values are the canonical names of the IANA time zones, derived from + // the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more + // information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + TimeZone *string `min:"1" type:"string"` } // String returns the string representation @@ -13038,6 +14713,9 @@ func (s *PutScheduledUpdateGroupActionInput) Validate() error { if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) } + if s.TimeZone != nil && len(*s.TimeZone) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TimeZone", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13099,6 +14777,12 @@ func (s *PutScheduledUpdateGroupActionInput) SetTime(v time.Time) *PutScheduledU return s } +// SetTimeZone sets the TimeZone field's value. +func (s *PutScheduledUpdateGroupActionInput) SetTimeZone(v string) *PutScheduledUpdateGroupActionInput { + s.TimeZone = &v + return s +} + type PutScheduledUpdateGroupActionOutput struct { _ struct{} `type:"structure"` } @@ -13113,6 +14797,113 @@ func (s PutScheduledUpdateGroupActionOutput) GoString() string { return s.String() } +type PutWarmPoolInput struct { + _ struct{} `type:"structure"` + + // The name of the Auto Scaling group. + // + // AutoScalingGroupName is a required field + AutoScalingGroupName *string `min:"1" type:"string" required:"true"` + + // Specifies the maximum number of instances that are allowed to be in the warm + // pool or in any state except Terminated for the Auto Scaling group. This is + // an optional property. Specify it only if you do not want the warm pool size + // to be determined by the difference between the group's maximum capacity and + // its desired capacity. + // + // If a value for MaxGroupPreparedCapacity is not specified, Amazon EC2 Auto + // Scaling launches and maintains the difference between the group's maximum + // capacity and its desired capacity. If you specify a value for MaxGroupPreparedCapacity, + // Amazon EC2 Auto Scaling uses the difference between the MaxGroupPreparedCapacity + // and the desired capacity instead. + // + // The size of the warm pool is dynamic. Only when MaxGroupPreparedCapacity + // and MinSize are set to the same value does the warm pool have an absolute + // size. + // + // If the desired capacity of the Auto Scaling group is higher than the MaxGroupPreparedCapacity, + // the capacity of the warm pool is 0, unless you specify a value for MinSize. + // To remove a value that you previously set, include the property but specify + // -1 for the value. + MaxGroupPreparedCapacity *int64 `type:"integer"` + + // Specifies the minimum number of instances to maintain in the warm pool. This + // helps you to ensure that there is always a certain number of warmed instances + // available to handle traffic spikes. Defaults to 0 if not specified. + MinSize *int64 `type:"integer"` + + // Sets the instance state to transition to after the lifecycle actions are + // complete. Default is Stopped. + PoolState *string `type:"string" enum:"WarmPoolState"` +} + +// String returns the string representation +func (s PutWarmPoolInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutWarmPoolInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutWarmPoolInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutWarmPoolInput"} + if s.AutoScalingGroupName == nil { + invalidParams.Add(request.NewErrParamRequired("AutoScalingGroupName")) + } + if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) + } + if s.MaxGroupPreparedCapacity != nil && *s.MaxGroupPreparedCapacity < -1 { + invalidParams.Add(request.NewErrParamMinValue("MaxGroupPreparedCapacity", -1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoScalingGroupName sets the AutoScalingGroupName field's value. +func (s *PutWarmPoolInput) SetAutoScalingGroupName(v string) *PutWarmPoolInput { + s.AutoScalingGroupName = &v + return s +} + +// SetMaxGroupPreparedCapacity sets the MaxGroupPreparedCapacity field's value. +func (s *PutWarmPoolInput) SetMaxGroupPreparedCapacity(v int64) *PutWarmPoolInput { + s.MaxGroupPreparedCapacity = &v + return s +} + +// SetMinSize sets the MinSize field's value. +func (s *PutWarmPoolInput) SetMinSize(v int64) *PutWarmPoolInput { + s.MinSize = &v + return s +} + +// SetPoolState sets the PoolState field's value. +func (s *PutWarmPoolInput) SetPoolState(v string) *PutWarmPoolInput { + s.PoolState = &v + return s +} + +type PutWarmPoolOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutWarmPoolOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutWarmPoolOutput) GoString() string { + return s.String() +} + type RecordLifecycleActionHeartbeatInput struct { _ struct{} `type:"structure"` @@ -13212,9 +15003,26 @@ func (s RecordLifecycleActionHeartbeatOutput) GoString() string { } // Describes information used to start an instance refresh. +// +// All properties are optional. However, if you specify a value for CheckpointDelay, +// you must also provide a value for CheckpointPercentages. type RefreshPreferences struct { _ struct{} `type:"structure"` + // The amount of time, in seconds, to wait after a checkpoint before continuing. + // This property is optional, but if you specify a value for it, you must also + // specify a value for CheckpointPercentages. If you specify a value for CheckpointPercentages + // and not for CheckpointDelay, the CheckpointDelay defaults to 3600 (1 hour). + CheckpointDelay *int64 `type:"integer"` + + // Threshold values for each checkpoint in ascending order. Each number must + // be unique. To replace all instances in the Auto Scaling group, the last number + // in the array must be 100. + // + // For usage examples, see Adding checkpoints to an instance refresh (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-adding-checkpoints-instance-refresh.html) + // in the Amazon EC2 Auto Scaling User Guide. + CheckpointPercentages []*int64 `type:"list"` + // The number of seconds until a newly launched instance is configured and ready // to use. During this time, Amazon EC2 Auto Scaling does not immediately move // on to the next replacement. The default is to use the value for the health @@ -13238,6 +15046,18 @@ func (s RefreshPreferences) GoString() string { return s.String() } +// SetCheckpointDelay sets the CheckpointDelay field's value. +func (s *RefreshPreferences) SetCheckpointDelay(v int64) *RefreshPreferences { + s.CheckpointDelay = &v + return s +} + +// SetCheckpointPercentages sets the CheckpointPercentages field's value. +func (s *RefreshPreferences) SetCheckpointPercentages(v []*int64) *RefreshPreferences { + s.CheckpointPercentages = v + return s +} + // SetInstanceWarmup sets the InstanceWarmup field's value. func (s *RefreshPreferences) SetInstanceWarmup(v int64) *RefreshPreferences { s.InstanceWarmup = &v @@ -13313,11 +15133,16 @@ type ScalingPolicy struct { // // * SimpleScaling (default) // + // * PredictiveScaling + // // For more information, see Target tracking scaling policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-target-tracking.html) // and Step and simple scaling policies (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html) // in the Amazon EC2 Auto Scaling User Guide. PolicyType *string `min:"1" type:"string"` + // A predictive scaling policy. + PredictiveScalingConfiguration *PredictiveScalingConfiguration `type:"structure"` + // The amount by which to scale, based on the specified adjustment type. A positive // value adds to the current capacity while a negative number removes from the // current capacity. @@ -13413,6 +15238,12 @@ func (s *ScalingPolicy) SetPolicyType(v string) *ScalingPolicy { return s } +// SetPredictiveScalingConfiguration sets the PredictiveScalingConfiguration field's value. +func (s *ScalingPolicy) SetPredictiveScalingConfiguration(v *PredictiveScalingConfiguration) *ScalingPolicy { + s.PredictiveScalingConfiguration = v + return s +} + // SetScalingAdjustment sets the ScalingAdjustment field's value. func (s *ScalingPolicy) SetScalingAdjustment(v int64) *ScalingPolicy { s.ScalingAdjustment = &v @@ -13539,6 +15370,9 @@ type ScheduledUpdateGroupAction struct { // This parameter is no longer used. Time *time.Time `type:"timestamp"` + + // The time zone for the cron expression. + TimeZone *string `min:"1" type:"string"` } // String returns the string representation @@ -13611,11 +15445,14 @@ func (s *ScheduledUpdateGroupAction) SetTime(v time.Time) *ScheduledUpdateGroupA return s } +// SetTimeZone sets the TimeZone field's value. +func (s *ScheduledUpdateGroupAction) SetTimeZone(v string) *ScheduledUpdateGroupAction { + s.TimeZone = &v + return s +} + // Describes information used for one or more scheduled scaling action updates // in a BatchPutScheduledUpdateGroupAction operation. -// -// When updating a scheduled scaling action, all optional parameters are left -// unchanged if not specified. type ScheduledUpdateGroupActionRequest struct { _ struct{} `type:"structure"` @@ -13623,8 +15460,7 @@ type ScheduledUpdateGroupActionRequest struct { // the scheduled action runs and the capacity it attempts to maintain. DesiredCapacity *int64 `type:"integer"` - // The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling - // does not perform the action after this time. + // The date and time for the recurring schedule to end, in UTC. EndTime *time.Time `type:"timestamp"` // The maximum size of the Auto Scaling group. @@ -13640,6 +15476,8 @@ type ScheduledUpdateGroupActionRequest struct { // // When StartTime and EndTime are specified with Recurrence, they form the boundaries // of when the recurring action starts and stops. + // + // Cron expressions use Universal Coordinated Time (UTC) by default. Recurrence *string `min:"1" type:"string"` // The name of the scaling action. @@ -13657,6 +15495,15 @@ type ScheduledUpdateGroupActionRequest struct { // If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns // an error message. StartTime *time.Time `type:"timestamp"` + + // Specifies the time zone for a cron expression. If a time zone is not provided, + // UTC is used by default. + // + // Valid values are the canonical names of the IANA time zones, derived from + // the IANA Time Zone Database (such as Etc/GMT+9 or Pacific/Tahiti). For more + // information, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones + // (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). + TimeZone *string `min:"1" type:"string"` } // String returns the string representation @@ -13681,6 +15528,9 @@ func (s *ScheduledUpdateGroupActionRequest) Validate() error { if s.ScheduledActionName != nil && len(*s.ScheduledActionName) < 1 { invalidParams.Add(request.NewErrParamMinLen("ScheduledActionName", 1)) } + if s.TimeZone != nil && len(*s.TimeZone) < 1 { + invalidParams.Add(request.NewErrParamMinLen("TimeZone", 1)) + } if invalidParams.Len() > 0 { return invalidParams @@ -13730,6 +15580,12 @@ func (s *ScheduledUpdateGroupActionRequest) SetStartTime(v time.Time) *Scheduled return s } +// SetTimeZone sets the TimeZone field's value. +func (s *ScheduledUpdateGroupActionRequest) SetTimeZone(v string) *ScheduledUpdateGroupActionRequest { + s.TimeZone = &v + return s +} + type SetDesiredCapacityInput struct { _ struct{} `type:"structure"` @@ -14243,7 +16099,7 @@ type Tag struct { // in the group. PropagateAtLaunch *bool `type:"boolean"` - // The name of the group. + // The name of the Auto Scaling group. ResourceId *string `type:"string"` // The type of resource. The only supported value is auto-scaling-group. @@ -14540,13 +16396,16 @@ type UpdateAutoScalingGroupInput struct { AutoScalingGroupName *string `min:"1" type:"string" required:"true"` // One or more Availability Zones for the group. - AvailabilityZones []*string `min:"1" type:"list"` + AvailabilityZones []*string `type:"list"` // Enables or disables Capacity Rebalancing. For more information, see Amazon // EC2 Auto Scaling Capacity Rebalancing (https://docs.aws.amazon.com/autoscaling/ec2/userguide/capacity-rebalance.html) // in the Amazon EC2 Auto Scaling User Guide. CapacityRebalance *bool `type:"boolean"` + // Reserved. + Context *string `type:"string"` + // The amount of time, in seconds, after a scaling activity completes before // another scaling activity can start. The default value is 300. This setting // applies when using simple scaling policies, but not when using other scaling @@ -14606,7 +16465,7 @@ type UpdateAutoScalingGroupInput struct { MinSize *int64 `type:"integer"` // An embedded object that specifies a mixed instances policy. When you make - // changes to an existing policy, all optional parameters are left unchanged + // changes to an existing policy, all optional properties are left unchanged // if not specified. For more information, see Auto Scaling groups with multiple // instance types and purchase options (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-purchase-options.html) // in the Amazon EC2 Auto Scaling User Guide. @@ -14627,7 +16486,7 @@ type UpdateAutoScalingGroupInput struct { PlacementGroup *string `min:"1" type:"string"` // The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling - // group uses to call other AWS services on your behalf. For more information, + // group uses to call other Amazon Web Services on your behalf. For more information, // see Service-linked roles (https://docs.aws.amazon.com/autoscaling/ec2/userguide/autoscaling-service-linked-role.html) // in the Amazon EC2 Auto Scaling User Guide. ServiceLinkedRoleARN *string `min:"1" type:"string"` @@ -14663,9 +16522,6 @@ func (s *UpdateAutoScalingGroupInput) Validate() error { if s.AutoScalingGroupName != nil && len(*s.AutoScalingGroupName) < 1 { invalidParams.Add(request.NewErrParamMinLen("AutoScalingGroupName", 1)) } - if s.AvailabilityZones != nil && len(s.AvailabilityZones) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZones", 1)) - } if s.HealthCheckType != nil && len(*s.HealthCheckType) < 1 { invalidParams.Add(request.NewErrParamMinLen("HealthCheckType", 1)) } @@ -14716,6 +16572,12 @@ func (s *UpdateAutoScalingGroupInput) SetCapacityRebalance(v bool) *UpdateAutoSc return s } +// SetContext sets the Context field's value. +func (s *UpdateAutoScalingGroupInput) SetContext(v string) *UpdateAutoScalingGroupInput { + s.Context = &v + return s +} + // SetDefaultCooldown sets the DefaultCooldown field's value. func (s *UpdateAutoScalingGroupInput) SetDefaultCooldown(v int64) *UpdateAutoScalingGroupInput { s.DefaultCooldown = &v @@ -14820,6 +16682,58 @@ func (s UpdateAutoScalingGroupOutput) GoString() string { return s.String() } +// Describes a warm pool configuration. +type WarmPoolConfiguration struct { + _ struct{} `type:"structure"` + + // The maximum number of instances that are allowed to be in the warm pool or + // in any state except Terminated for the Auto Scaling group. + MaxGroupPreparedCapacity *int64 `type:"integer"` + + // The minimum number of instances to maintain in the warm pool. + MinSize *int64 `type:"integer"` + + // The instance state to transition to after the lifecycle actions are complete. + PoolState *string `type:"string" enum:"WarmPoolState"` + + // The status of a warm pool that is marked for deletion. + Status *string `type:"string" enum:"WarmPoolStatus"` +} + +// String returns the string representation +func (s WarmPoolConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s WarmPoolConfiguration) GoString() string { + return s.String() +} + +// SetMaxGroupPreparedCapacity sets the MaxGroupPreparedCapacity field's value. +func (s *WarmPoolConfiguration) SetMaxGroupPreparedCapacity(v int64) *WarmPoolConfiguration { + s.MaxGroupPreparedCapacity = &v + return s +} + +// SetMinSize sets the MinSize field's value. +func (s *WarmPoolConfiguration) SetMinSize(v int64) *WarmPoolConfiguration { + s.MinSize = &v + return s +} + +// SetPoolState sets the PoolState field's value. +func (s *WarmPoolConfiguration) SetPoolState(v string) *WarmPoolConfiguration { + s.PoolState = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *WarmPoolConfiguration) SetStatus(v string) *WarmPoolConfiguration { + s.Status = &v + return s +} + const ( // InstanceMetadataEndpointStateDisabled is a InstanceMetadataEndpointState enum value InstanceMetadataEndpointStateDisabled = "disabled" @@ -14923,6 +16837,33 @@ const ( // LifecycleStateStandby is a LifecycleState enum value LifecycleStateStandby = "Standby" + + // LifecycleStateWarmedPending is a LifecycleState enum value + LifecycleStateWarmedPending = "Warmed:Pending" + + // LifecycleStateWarmedPendingWait is a LifecycleState enum value + LifecycleStateWarmedPendingWait = "Warmed:Pending:Wait" + + // LifecycleStateWarmedPendingProceed is a LifecycleState enum value + LifecycleStateWarmedPendingProceed = "Warmed:Pending:Proceed" + + // LifecycleStateWarmedTerminating is a LifecycleState enum value + LifecycleStateWarmedTerminating = "Warmed:Terminating" + + // LifecycleStateWarmedTerminatingWait is a LifecycleState enum value + LifecycleStateWarmedTerminatingWait = "Warmed:Terminating:Wait" + + // LifecycleStateWarmedTerminatingProceed is a LifecycleState enum value + LifecycleStateWarmedTerminatingProceed = "Warmed:Terminating:Proceed" + + // LifecycleStateWarmedTerminated is a LifecycleState enum value + LifecycleStateWarmedTerminated = "Warmed:Terminated" + + // LifecycleStateWarmedStopped is a LifecycleState enum value + LifecycleStateWarmedStopped = "Warmed:Stopped" + + // LifecycleStateWarmedRunning is a LifecycleState enum value + LifecycleStateWarmedRunning = "Warmed:Running" ) // LifecycleState_Values returns all elements of the LifecycleState enum @@ -14941,6 +16882,15 @@ func LifecycleState_Values() []string { LifecycleStateDetached, LifecycleStateEnteringStandby, LifecycleStateStandby, + LifecycleStateWarmedPending, + LifecycleStateWarmedPendingWait, + LifecycleStateWarmedPendingProceed, + LifecycleStateWarmedTerminating, + LifecycleStateWarmedTerminatingWait, + LifecycleStateWarmedTerminatingProceed, + LifecycleStateWarmedTerminated, + LifecycleStateWarmedStopped, + LifecycleStateWarmedRunning, } } @@ -14996,6 +16946,110 @@ func MetricType_Values() []string { } } +const ( + // PredefinedLoadMetricTypeAsgtotalCpuutilization is a PredefinedLoadMetricType enum value + PredefinedLoadMetricTypeAsgtotalCpuutilization = "ASGTotalCPUUtilization" + + // PredefinedLoadMetricTypeAsgtotalNetworkIn is a PredefinedLoadMetricType enum value + PredefinedLoadMetricTypeAsgtotalNetworkIn = "ASGTotalNetworkIn" + + // PredefinedLoadMetricTypeAsgtotalNetworkOut is a PredefinedLoadMetricType enum value + PredefinedLoadMetricTypeAsgtotalNetworkOut = "ASGTotalNetworkOut" + + // PredefinedLoadMetricTypeAlbtargetGroupRequestCount is a PredefinedLoadMetricType enum value + PredefinedLoadMetricTypeAlbtargetGroupRequestCount = "ALBTargetGroupRequestCount" +) + +// PredefinedLoadMetricType_Values returns all elements of the PredefinedLoadMetricType enum +func PredefinedLoadMetricType_Values() []string { + return []string{ + PredefinedLoadMetricTypeAsgtotalCpuutilization, + PredefinedLoadMetricTypeAsgtotalNetworkIn, + PredefinedLoadMetricTypeAsgtotalNetworkOut, + PredefinedLoadMetricTypeAlbtargetGroupRequestCount, + } +} + +const ( + // PredefinedMetricPairTypeAsgcpuutilization is a PredefinedMetricPairType enum value + PredefinedMetricPairTypeAsgcpuutilization = "ASGCPUUtilization" + + // PredefinedMetricPairTypeAsgnetworkIn is a PredefinedMetricPairType enum value + PredefinedMetricPairTypeAsgnetworkIn = "ASGNetworkIn" + + // PredefinedMetricPairTypeAsgnetworkOut is a PredefinedMetricPairType enum value + PredefinedMetricPairTypeAsgnetworkOut = "ASGNetworkOut" + + // PredefinedMetricPairTypeAlbrequestCount is a PredefinedMetricPairType enum value + PredefinedMetricPairTypeAlbrequestCount = "ALBRequestCount" +) + +// PredefinedMetricPairType_Values returns all elements of the PredefinedMetricPairType enum +func PredefinedMetricPairType_Values() []string { + return []string{ + PredefinedMetricPairTypeAsgcpuutilization, + PredefinedMetricPairTypeAsgnetworkIn, + PredefinedMetricPairTypeAsgnetworkOut, + PredefinedMetricPairTypeAlbrequestCount, + } +} + +const ( + // PredefinedScalingMetricTypeAsgaverageCpuutilization is a PredefinedScalingMetricType enum value + PredefinedScalingMetricTypeAsgaverageCpuutilization = "ASGAverageCPUUtilization" + + // PredefinedScalingMetricTypeAsgaverageNetworkIn is a PredefinedScalingMetricType enum value + PredefinedScalingMetricTypeAsgaverageNetworkIn = "ASGAverageNetworkIn" + + // PredefinedScalingMetricTypeAsgaverageNetworkOut is a PredefinedScalingMetricType enum value + PredefinedScalingMetricTypeAsgaverageNetworkOut = "ASGAverageNetworkOut" + + // PredefinedScalingMetricTypeAlbrequestCountPerTarget is a PredefinedScalingMetricType enum value + PredefinedScalingMetricTypeAlbrequestCountPerTarget = "ALBRequestCountPerTarget" +) + +// PredefinedScalingMetricType_Values returns all elements of the PredefinedScalingMetricType enum +func PredefinedScalingMetricType_Values() []string { + return []string{ + PredefinedScalingMetricTypeAsgaverageCpuutilization, + PredefinedScalingMetricTypeAsgaverageNetworkIn, + PredefinedScalingMetricTypeAsgaverageNetworkOut, + PredefinedScalingMetricTypeAlbrequestCountPerTarget, + } +} + +const ( + // PredictiveScalingMaxCapacityBreachBehaviorHonorMaxCapacity is a PredictiveScalingMaxCapacityBreachBehavior enum value + PredictiveScalingMaxCapacityBreachBehaviorHonorMaxCapacity = "HonorMaxCapacity" + + // PredictiveScalingMaxCapacityBreachBehaviorIncreaseMaxCapacity is a PredictiveScalingMaxCapacityBreachBehavior enum value + PredictiveScalingMaxCapacityBreachBehaviorIncreaseMaxCapacity = "IncreaseMaxCapacity" +) + +// PredictiveScalingMaxCapacityBreachBehavior_Values returns all elements of the PredictiveScalingMaxCapacityBreachBehavior enum +func PredictiveScalingMaxCapacityBreachBehavior_Values() []string { + return []string{ + PredictiveScalingMaxCapacityBreachBehaviorHonorMaxCapacity, + PredictiveScalingMaxCapacityBreachBehaviorIncreaseMaxCapacity, + } +} + +const ( + // PredictiveScalingModeForecastAndScale is a PredictiveScalingMode enum value + PredictiveScalingModeForecastAndScale = "ForecastAndScale" + + // PredictiveScalingModeForecastOnly is a PredictiveScalingMode enum value + PredictiveScalingModeForecastOnly = "ForecastOnly" +) + +// PredictiveScalingMode_Values returns all elements of the PredictiveScalingMode enum +func PredictiveScalingMode_Values() []string { + return []string{ + PredictiveScalingModeForecastAndScale, + PredictiveScalingModeForecastOnly, + } +} + const ( // RefreshStrategyRolling is a RefreshStrategy enum value RefreshStrategyRolling = "Rolling" @@ -15063,3 +17117,31 @@ func ScalingActivityStatusCode_Values() []string { ScalingActivityStatusCodeCancelled, } } + +const ( + // WarmPoolStateStopped is a WarmPoolState enum value + WarmPoolStateStopped = "Stopped" + + // WarmPoolStateRunning is a WarmPoolState enum value + WarmPoolStateRunning = "Running" +) + +// WarmPoolState_Values returns all elements of the WarmPoolState enum +func WarmPoolState_Values() []string { + return []string{ + WarmPoolStateStopped, + WarmPoolStateRunning, + } +} + +const ( + // WarmPoolStatusPendingDelete is a WarmPoolStatus enum value + WarmPoolStatusPendingDelete = "PendingDelete" +) + +// WarmPoolStatus_Values returns all elements of the WarmPoolStatus enum +func WarmPoolStatus_Values() []string { + return []string{ + WarmPoolStatusPendingDelete, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go index 0a2fe8c30f..27f32492dd 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/autoscaling/doc.go @@ -5,12 +5,14 @@ // // Amazon EC2 Auto Scaling is designed to automatically launch or terminate // EC2 instances based on user-defined scaling policies, scheduled actions, -// and health checks. Use this service with AWS Auto Scaling, Amazon CloudWatch, -// and Elastic Load Balancing. +// and health checks. // -// For more information, including information about granting IAM users required -// permissions for Amazon EC2 Auto Scaling actions, see the Amazon EC2 Auto +// For more information about Amazon EC2 Auto Scaling, see the Amazon EC2 Auto // Scaling User Guide (https://docs.aws.amazon.com/autoscaling/ec2/userguide/what-is-amazon-ec2-auto-scaling.html). +// For information about granting IAM users required permissions for calls to +// Amazon EC2 Auto Scaling, see Granting IAM users required permissions for +// Amazon EC2 Auto Scaling resources (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/ec2-auto-scaling-api-permissions.html) +// in the Amazon EC2 Auto Scaling API Reference. // // See https://docs.aws.amazon.com/goto/WebAPI/autoscaling-2011-01-01 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 6f0f6fbb1e..45fe3a63bf 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -88,6 +88,80 @@ func (c *EC2) AcceptReservedInstancesExchangeQuoteWithContext(ctx aws.Context, i return out, req.Send() } +const opAcceptTransitGatewayMulticastDomainAssociations = "AcceptTransitGatewayMulticastDomainAssociations" + +// AcceptTransitGatewayMulticastDomainAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the AcceptTransitGatewayMulticastDomainAssociations 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 AcceptTransitGatewayMulticastDomainAssociations for more information on using the AcceptTransitGatewayMulticastDomainAssociations +// 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 AcceptTransitGatewayMulticastDomainAssociationsRequest method. +// req, resp := client.AcceptTransitGatewayMulticastDomainAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayMulticastDomainAssociations +func (c *EC2) AcceptTransitGatewayMulticastDomainAssociationsRequest(input *AcceptTransitGatewayMulticastDomainAssociationsInput) (req *request.Request, output *AcceptTransitGatewayMulticastDomainAssociationsOutput) { + op := &request.Operation{ + Name: opAcceptTransitGatewayMulticastDomainAssociations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AcceptTransitGatewayMulticastDomainAssociationsInput{} + } + + output = &AcceptTransitGatewayMulticastDomainAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// AcceptTransitGatewayMulticastDomainAssociations API operation for Amazon Elastic Compute Cloud. +// +// Accepts a request to associate subnets with a transit gateway multicast domain. +// +// 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 Elastic Compute Cloud's +// API operation AcceptTransitGatewayMulticastDomainAssociations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AcceptTransitGatewayMulticastDomainAssociations +func (c *EC2) AcceptTransitGatewayMulticastDomainAssociations(input *AcceptTransitGatewayMulticastDomainAssociationsInput) (*AcceptTransitGatewayMulticastDomainAssociationsOutput, error) { + req, out := c.AcceptTransitGatewayMulticastDomainAssociationsRequest(input) + return out, req.Send() +} + +// AcceptTransitGatewayMulticastDomainAssociationsWithContext is the same as AcceptTransitGatewayMulticastDomainAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See AcceptTransitGatewayMulticastDomainAssociations 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 *EC2) AcceptTransitGatewayMulticastDomainAssociationsWithContext(ctx aws.Context, input *AcceptTransitGatewayMulticastDomainAssociationsInput, opts ...request.Option) (*AcceptTransitGatewayMulticastDomainAssociationsOutput, error) { + req, out := c.AcceptTransitGatewayMulticastDomainAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAcceptTransitGatewayPeeringAttachment = "AcceptTransitGatewayPeeringAttachment" // AcceptTransitGatewayPeeringAttachmentRequest generates a "aws/request.Request" representing the @@ -441,19 +515,20 @@ func (c *EC2) AdvertiseByoipCidrRequest(input *AdvertiseByoipCidrInput) (req *re // AdvertiseByoipCidr API operation for Amazon Elastic Compute Cloud. // // Advertises an IPv4 or IPv6 address range that is provisioned for use with -// your AWS resources through bring your own IP addresses (BYOIP). +// your Amazon Web Services resources through bring your own IP addresses (BYOIP). // // You can perform this operation at most once every 10 seconds, even if you // specify different address ranges each time. // // We recommend that you stop advertising the BYOIP CIDR from other locations -// when you advertise it from AWS. To minimize down time, you can configure -// your AWS resources to use an address from a BYOIP CIDR before it is advertised, -// and then simultaneously stop advertising it from the current location and -// start advertising it through AWS. +// when you advertise it from Amazon Web Services. To minimize down time, you +// can configure your Amazon Web Services resources to use an address from a +// BYOIP CIDR before it is advertised, and then simultaneously stop advertising +// it from the current location and start advertising it through Amazon Web +// Services. // // It can take a few minutes before traffic to the specified addresses starts -// routing to AWS because of BGP propagation delays. +// routing to Amazon Web Services because of BGP propagation delays. // // To stop advertising the BYOIP CIDR, use WithdrawByoipCidr. // @@ -529,22 +604,22 @@ func (c *EC2) AllocateAddressRequest(input *AllocateAddressInput) (req *request. // AllocateAddress API operation for Amazon Elastic Compute Cloud. // -// Allocates an Elastic IP address to your AWS account. After you allocate the -// Elastic IP address you can associate it with an instance or network interface. -// After you release an Elastic IP address, it is released to the IP address -// pool and can be allocated to a different AWS account. +// Allocates an Elastic IP address to your account. After you allocate the Elastic +// IP address you can associate it with an instance or network interface. After +// you release an Elastic IP address, it is released to the IP address pool +// and can be allocated to a different account. // -// You can allocate an Elastic IP address from an address pool owned by AWS -// or from an address pool created from a public IPv4 address range that you -// have brought to AWS for use with your AWS resources using bring your own -// IP addresses (BYOIP). For more information, see Bring Your Own IP Addresses -// (BYOIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) +// You can allocate an Elastic IP address from an address pool owned by Amazon +// Web Services or from an address pool created from a public IPv4 address range +// that you have brought to Amazon Web Services for use with your Amazon Web +// Services resources using bring your own IP addresses (BYOIP). For more information, +// see Bring Your Own IP Addresses (BYOIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) // in the Amazon Elastic Compute Cloud User Guide. // // [EC2-VPC] If you release an Elastic IP address, you might be able to recover // it. You cannot recover an Elastic IP address that you released after it is -// allocated to another AWS account. You cannot recover an Elastic IP address -// for EC2-Classic. To attempt to recover an Elastic IP address that you released, +// allocated to another account. You cannot recover an Elastic IP address for +// EC2-Classic. To attempt to recover an Elastic IP address that you released, // specify it in this operation. // // An Elastic IP address is for use either in the EC2-Classic platform or in @@ -1234,25 +1309,25 @@ func (c *EC2) AssociateEnclaveCertificateIamRoleRequest(input *AssociateEnclaveC // AssociateEnclaveCertificateIamRole API operation for Amazon Elastic Compute Cloud. // -// Associates an AWS Identity and Access Management (IAM) role with an AWS Certificate +// Associates an Identity and Access Management (IAM) role with an Certificate // Manager (ACM) certificate. This enables the certificate to be used by the // ACM for Nitro Enclaves application inside an enclave. For more information, -// see AWS Certificate Manager for Nitro Enclaves (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html) -// in the AWS Nitro Enclaves User Guide. +// see Certificate Manager for Nitro Enclaves (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html) +// in the Amazon Web Services Nitro Enclaves User Guide. // -// When the IAM role is associated with the ACM certificate, places the certificate, -// certificate chain, and encrypted private key in an Amazon S3 bucket that -// only the associated IAM role can access. The private key of the certificate -// is encrypted with an AWS-managed KMS customer master (CMK) that has an attached -// attestation-based CMK policy. +// When the IAM role is associated with the ACM certificate, the certificate, +// certificate chain, and encrypted private key are placed in an Amazon S3 bucket +// that only the associated IAM role can access. The private key of the certificate +// is encrypted with an Amazon Web Services managed key that has an attached +// attestation-based key policy. // // To enable the IAM role to access the Amazon S3 object, you must grant it // permission to call s3:GetObject on the Amazon S3 bucket returned by the command. -// To enable the IAM role to access the AWS KMS CMK, you must grant it permission -// to call kms:Decrypt on AWS KMS CMK returned by the command. For more information, +// To enable the IAM role to access the KMS key, you must grant it permission +// to call kms:Decrypt on the KMS key returned by the command. For more information, // see Grant the role permission to access the certificate and encryption key // (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave-refapp.html#add-policy) -// in the AWS Nitro Enclaves User Guide. +// in the Amazon Web Services Nitro Enclaves 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 @@ -1357,6 +1432,85 @@ func (c *EC2) AssociateIamInstanceProfileWithContext(ctx aws.Context, input *Ass return out, req.Send() } +const opAssociateInstanceEventWindow = "AssociateInstanceEventWindow" + +// AssociateInstanceEventWindowRequest generates a "aws/request.Request" representing the +// client's request for the AssociateInstanceEventWindow 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 AssociateInstanceEventWindow for more information on using the AssociateInstanceEventWindow +// 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 AssociateInstanceEventWindowRequest method. +// req, resp := client.AssociateInstanceEventWindowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateInstanceEventWindow +func (c *EC2) AssociateInstanceEventWindowRequest(input *AssociateInstanceEventWindowInput) (req *request.Request, output *AssociateInstanceEventWindowOutput) { + op := &request.Operation{ + Name: opAssociateInstanceEventWindow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateInstanceEventWindowInput{} + } + + output = &AssociateInstanceEventWindowOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateInstanceEventWindow API operation for Amazon Elastic Compute Cloud. +// +// Associates one or more targets with an event window. Only one type of target +// (instance IDs, Dedicated Host IDs, or tags) can be specified with an event +// window. +// +// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/monitoring-instances-status-check_sched.html#event-windows) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation AssociateInstanceEventWindow for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateInstanceEventWindow +func (c *EC2) AssociateInstanceEventWindow(input *AssociateInstanceEventWindowInput) (*AssociateInstanceEventWindowOutput, error) { + req, out := c.AssociateInstanceEventWindowRequest(input) + return out, req.Send() +} + +// AssociateInstanceEventWindowWithContext is the same as AssociateInstanceEventWindow with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateInstanceEventWindow 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 *EC2) AssociateInstanceEventWindowWithContext(ctx aws.Context, input *AssociateInstanceEventWindowInput, opts ...request.Option) (*AssociateInstanceEventWindowOutput, error) { + req, out := c.AssociateInstanceEventWindowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateRouteTable = "AssociateRouteTable" // AssociateRouteTableRequest generates a "aws/request.Request" representing the @@ -1669,6 +1823,88 @@ func (c *EC2) AssociateTransitGatewayRouteTableWithContext(ctx aws.Context, inpu return out, req.Send() } +const opAssociateTrunkInterface = "AssociateTrunkInterface" + +// AssociateTrunkInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the AssociateTrunkInterface 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 AssociateTrunkInterface for more information on using the AssociateTrunkInterface +// 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 AssociateTrunkInterfaceRequest method. +// req, resp := client.AssociateTrunkInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTrunkInterface +func (c *EC2) AssociateTrunkInterfaceRequest(input *AssociateTrunkInterfaceInput) (req *request.Request, output *AssociateTrunkInterfaceOutput) { + op := &request.Operation{ + Name: opAssociateTrunkInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &AssociateTrunkInterfaceInput{} + } + + output = &AssociateTrunkInterfaceOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateTrunkInterface API operation for Amazon Elastic Compute Cloud. +// +// Associates a branch network interface with a trunk network interface. +// +// Before you create the association, run the create-network-interface (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html) +// command and set --interface-type to trunk. You must also create a network +// interface for each branch network interface that you want to associate with +// the trunk network interface. +// +// For more information, see Network interface trunking (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/eni-trunking.html) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation AssociateTrunkInterface for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/AssociateTrunkInterface +func (c *EC2) AssociateTrunkInterface(input *AssociateTrunkInterfaceInput) (*AssociateTrunkInterfaceOutput, error) { + req, out := c.AssociateTrunkInterfaceRequest(input) + return out, req.Send() +} + +// AssociateTrunkInterfaceWithContext is the same as AssociateTrunkInterface with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateTrunkInterface 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 *EC2) AssociateTrunkInterfaceWithContext(ctx aws.Context, input *AssociateTrunkInterfaceInput, opts ...request.Option) (*AssociateTrunkInterfaceOutput, error) { + req, out := c.AssociateTrunkInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opAssociateVpcCidrBlock = "AssociateVpcCidrBlock" // AssociateVpcCidrBlockRequest generates a "aws/request.Request" representing the @@ -2043,13 +2279,13 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // in the Amazon Elastic Compute Cloud User Guide. // // After you attach an EBS volume, you must make it available. For more information, -// see Making an EBS volume available for use (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html). +// see Make an EBS volume available for use (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html). // -// If a volume has an AWS Marketplace product code: +// If a volume has an Marketplace product code: // // * The volume can be attached only to a stopped instance. // -// * AWS Marketplace product codes are copied from the volume to the instance. +// * Marketplace product codes are copied from the volume to the instance. // // * You must be subscribed to the product. // @@ -2057,7 +2293,7 @@ func (c *EC2) AttachVolumeRequest(input *AttachVolumeInput) (req *request.Reques // the product. For example, you can't detach a volume from a Windows instance // and attach it to a Linux instance. // -// For more information, see Attaching Amazon EBS volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) +// For more information, see Attach an Amazon EBS volume to an instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2282,18 +2518,17 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE output = &AuthorizeSecurityGroupEgressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AuthorizeSecurityGroupEgress API operation for Amazon Elastic Compute Cloud. // -// [VPC only] Adds the specified egress rules to a security group for use with -// a VPC. +// [VPC only] Adds the specified outbound (egress) rules to a security group +// for use with a VPC. // // An outbound rule permits instances to send traffic to the specified IPv4 -// or IPv6 CIDR address ranges, or to the instances associated with the specified -// destination security groups. +// or IPv6 CIDR address ranges, or to the instances that are associated with +// the specified destination security groups. // // You specify a protocol for each rule (for example, TCP). For the TCP and // UDP protocols, you must also specify the destination port or port range. @@ -2303,8 +2538,7 @@ func (c *EC2) AuthorizeSecurityGroupEgressRequest(input *AuthorizeSecurityGroupE // Rule changes are propagated to affected instances as quickly as possible. // However, a small delay might occur. // -// For more information about VPC security group limits, see Amazon VPC Limits -// (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html). +// For information about VPC security group quotas, see Amazon VPC quotas (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html). // // 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 @@ -2373,17 +2607,16 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup output = &AuthorizeSecurityGroupIngressOutput{} req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(ec2query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) return } // AuthorizeSecurityGroupIngress API operation for Amazon Elastic Compute Cloud. // -// Adds the specified ingress rules to a security group. +// Adds the specified inbound (ingress) rules to a security group. // // An inbound rule permits instances to receive traffic from the specified IPv4 -// or IPv6 CIDR address ranges, or from the instances associated with the specified -// destination security groups. +// or IPv6 CIDR address range, or from the instances that are associated with +// the specified destination security groups. // // You specify a protocol for each rule (for example, TCP). For TCP and UDP, // you must also specify the destination port or port range. For ICMP/ICMPv6, @@ -2393,7 +2626,7 @@ func (c *EC2) AuthorizeSecurityGroupIngressRequest(input *AuthorizeSecurityGroup // Rule changes are propagated to instances within the security group as quickly // as possible. However, a small delay might occur. // -// For more information about VPC security group limits, see Amazon VPC Limits +// For more information about VPC security group quotas, see Amazon VPC quotas // (https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2941,7 +3174,7 @@ func (c *EC2) CancelReservedInstancesListingRequest(input *CancelReservedInstanc // Marketplace. // // For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -3323,14 +3556,26 @@ func (c *EC2) CopyImageRequest(input *CopyImageInput) (req *request.Request, out // CopyImage API operation for Amazon Elastic Compute Cloud. // -// Initiates the copy of an AMI from the specified source Region to the current -// Region. You specify the destination Region by using its endpoint when making -// the request. -// -// Copies of encrypted backing snapshots for the AMI are encrypted. Copies of -// unencrypted backing snapshots remain unencrypted, unless you set Encrypted -// during the copy operation. You cannot create an unencrypted copy of an encrypted -// backing snapshot. +// Initiates the copy of an AMI. You can copy an AMI from one Region to another, +// or from a Region to an AWS Outpost. You can't copy an AMI from an Outpost +// to a Region, from one Outpost to another, or within the same Outpost. To +// copy an AMI to another partition, see CreateStoreImageTask (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html). +// +// To copy an AMI from one Region to another, specify the source Region using +// the SourceRegion parameter, and specify the destination Region using its +// endpoint. Copies of encrypted backing snapshots for the AMI are encrypted. +// Copies of unencrypted backing snapshots remain unencrypted, unless you set +// Encrypted during the copy operation. You cannot create an unencrypted copy +// of an encrypted backing snapshot. +// +// To copy an AMI from a Region to an Outpost, specify the source Region using +// the SourceRegion parameter, and specify the ARN of the destination Outpost +// using DestinationOutpostArn. Backing snapshots copied to an Outpost are encrypted +// by default using the default encryption key for the Region, or a different +// key that you specify in the request using KmsKeyId. Outposts do not support +// unencrypted snapshots. For more information, Amazon EBS local snapshots on +// Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami) +// in the Amazon Elastic Compute Cloud User Guide. // // For more information about the prerequisites and limits when copying an AMI, // see Copying an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/CopyingAMIs.html) @@ -3409,23 +3654,30 @@ func (c *EC2) CopySnapshotRequest(input *CopySnapshotInput) (req *request.Reques // CopySnapshot API operation for Amazon Elastic Compute Cloud. // // Copies a point-in-time snapshot of an EBS volume and stores it in Amazon -// S3. You can copy the snapshot within the same Region or from one Region to -// another. You can use the snapshot to create EBS volumes or Amazon Machine -// Images (AMIs). -// -// Copies of encrypted EBS snapshots remain encrypted. Copies of unencrypted -// snapshots remain unencrypted, unless you enable encryption for the snapshot -// copy operation. By default, encrypted snapshot copies use the default AWS -// Key Management Service (AWS KMS) customer master key (CMK); however, you -// can specify a different CMK. -// -// To copy an encrypted snapshot that has been shared from another account, -// you must have permissions for the CMK used to encrypt the snapshot. +// S3. You can copy a snapshot within the same Region, from one Region to another, +// or from a Region to an Outpost. You can't copy a snapshot from an Outpost +// to a Region, from one Outpost to another, or within the same Outpost. +// +// You can use the snapshot to create EBS volumes or Amazon Machine Images (AMIs). +// +// When copying snapshots to a Region, copies of encrypted EBS snapshots remain +// encrypted. Copies of unencrypted snapshots remain unencrypted, unless you +// enable encryption for the snapshot copy operation. By default, encrypted +// snapshot copies use the default Key Management Service (KMS) KMS key; however, +// you can specify a different KMS key. To copy an encrypted snapshot that has +// been shared from another account, you must have permissions for the KMS key +// used to encrypt the snapshot. +// +// Snapshots copied to an Outpost are encrypted by default using the default +// encryption key for the Region, or a different key that you specify in the +// request using KmsKeyId. Outposts do not support unencrypted snapshots. For +// more information, Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami) +// in the Amazon Elastic Compute Cloud User Guide. // // Snapshots created by copying another snapshot have an arbitrary volume ID // that should not be used for any purpose. // -// For more information, see Copying an Amazon EBS snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) +// For more information, see Copy an Amazon EBS snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-copy-snapshot.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3509,7 +3761,7 @@ func (c *EC2) CreateCapacityReservationRequest(input *CreateCapacityReservationI // you ensure that you always have access to Amazon EC2 capacity when you need // it, for as long as you need it. For more information, see Capacity Reservations // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // Your request to create a Capacity Reservation could fail if Amazon EC2 does // not have sufficient capacity to fulfill the request. If your request fails @@ -3522,8 +3774,8 @@ func (c *EC2) CreateCapacityReservationRequest(input *CreateCapacityReservationI // Instance limit for the selected instance type. If your request fails due // to limit constraints, increase your On-Demand Instance limit for the required // instance type and try again. For more information about increasing your instance -// limits, see Amazon EC2 Service Limits (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) -// in the Amazon Elastic Compute Cloud User Guide. +// limits, see Amazon EC2 Service Quotas (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-resource-limits.html) +// in the Amazon EC2 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 @@ -4288,7 +4540,7 @@ func (c *EC2) CreateFleetRequest(input *CreateFleetInput) (req *request.Request, // that vary by instance type, AMI, Availability Zone, or subnet. // // For more information, see Launching an EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -4571,6 +4823,103 @@ func (c *EC2) CreateImageWithContext(ctx aws.Context, input *CreateImageInput, o return out, req.Send() } +const opCreateInstanceEventWindow = "CreateInstanceEventWindow" + +// CreateInstanceEventWindowRequest generates a "aws/request.Request" representing the +// client's request for the CreateInstanceEventWindow 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 CreateInstanceEventWindow for more information on using the CreateInstanceEventWindow +// 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 CreateInstanceEventWindowRequest method. +// req, resp := client.CreateInstanceEventWindowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceEventWindow +func (c *EC2) CreateInstanceEventWindowRequest(input *CreateInstanceEventWindowInput) (req *request.Request, output *CreateInstanceEventWindowOutput) { + op := &request.Operation{ + Name: opCreateInstanceEventWindow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateInstanceEventWindowInput{} + } + + output = &CreateInstanceEventWindowOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateInstanceEventWindow API operation for Amazon Elastic Compute Cloud. +// +// Creates an event window in which scheduled events for the associated Amazon +// EC2 instances can run. +// +// You can define either a set of time ranges or a cron expression when creating +// the event window, but not both. All event window times are in UTC. +// +// You can create up to 200 event windows per Amazon Web Services Region. +// +// When you create the event window, targets (instance IDs, Dedicated Host IDs, +// or tags) are not yet associated with it. To ensure that the event window +// can be used, you must associate one or more targets with it by using the +// AssociateInstanceEventWindow API. +// +// Event windows are applicable only for scheduled events that stop, reboot, +// or terminate instances. +// +// Event windows are not applicable for: +// +// * Expedited scheduled events and network maintenance events. +// +// * Unscheduled maintenance such as AutoRecovery and unplanned reboots. +// +// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/monitoring-instances-status-check_sched.html#event-windows) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateInstanceEventWindow for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateInstanceEventWindow +func (c *EC2) CreateInstanceEventWindow(input *CreateInstanceEventWindowInput) (*CreateInstanceEventWindowOutput, error) { + req, out := c.CreateInstanceEventWindowRequest(input) + return out, req.Send() +} + +// CreateInstanceEventWindowWithContext is the same as CreateInstanceEventWindow with the addition of +// the ability to pass a context and additional request options. +// +// See CreateInstanceEventWindow 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 *EC2) CreateInstanceEventWindowWithContext(ctx aws.Context, input *CreateInstanceEventWindowInput, opts ...request.Option) (*CreateInstanceEventWindowOutput, error) { + req, out := c.CreateInstanceEventWindowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateInstanceExportTask = "CreateInstanceExportTask" // CreateInstanceExportTaskRequest generates a "aws/request.Request" representing the @@ -4619,7 +4968,7 @@ func (c *EC2) CreateInstanceExportTaskRequest(input *CreateInstanceExportTaskInp // // For information about the supported operating systems, image formats, and // known limitations for the types of instances you can export, see Exporting -// an Instance as a VM Using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html) +// an instance as a VM Using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html) // in the VM Import/Export User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5243,12 +5592,22 @@ func (c *EC2) CreateNatGatewayRequest(input *CreateNatGatewayInput) (req *reques // CreateNatGateway API operation for Amazon Elastic Compute Cloud. // -// Creates a NAT gateway in the specified public subnet. This action creates -// a network interface in the specified subnet with a private IP address from -// the IP address range of the subnet. Internet-bound traffic from a private -// subnet can be routed to the NAT gateway, therefore enabling instances in -// the private subnet to connect to the internet. For more information, see -// NAT Gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) +// Creates a NAT gateway in the specified subnet. This action creates a network +// interface in the specified subnet with a private IP address from the IP address +// range of the subnet. You can create either a public NAT gateway or a private +// NAT gateway. +// +// With a public NAT gateway, internet-bound traffic from a private subnet can +// be routed to the NAT gateway, so that instances in a private subnet can connect +// to the internet. +// +// With a private NAT gateway, private communication is routed across VPCs and +// on-premises networks through a transit gateway or virtual private gateway. +// Common use cases include running large workloads behind a small pool of allowlisted +// IPv4 addresses, preserving private IPv4 addresses, and communicating between +// overlapping networks. +// +// For more information, see NAT Gateways (https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) // in the Amazon Virtual Private Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -5448,6 +5807,84 @@ func (c *EC2) CreateNetworkAclEntryWithContext(ctx aws.Context, input *CreateNet return out, req.Send() } +const opCreateNetworkInsightsPath = "CreateNetworkInsightsPath" + +// CreateNetworkInsightsPathRequest generates a "aws/request.Request" representing the +// client's request for the CreateNetworkInsightsPath 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 CreateNetworkInsightsPath for more information on using the CreateNetworkInsightsPath +// 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 CreateNetworkInsightsPathRequest method. +// req, resp := client.CreateNetworkInsightsPathRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInsightsPath +func (c *EC2) CreateNetworkInsightsPathRequest(input *CreateNetworkInsightsPathInput) (req *request.Request, output *CreateNetworkInsightsPathOutput) { + op := &request.Operation{ + Name: opCreateNetworkInsightsPath, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateNetworkInsightsPathInput{} + } + + output = &CreateNetworkInsightsPathOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateNetworkInsightsPath API operation for Amazon Elastic Compute Cloud. +// +// Creates a path to analyze for reachability. +// +// Reachability Analyzer enables you to analyze and debug network reachability +// between two resources in your virtual private cloud (VPC). For more information, +// see What is Reachability Analyzer (https://docs.aws.amazon.com/vpc/latest/reachability/). +// +// 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 Elastic Compute Cloud's +// API operation CreateNetworkInsightsPath for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateNetworkInsightsPath +func (c *EC2) CreateNetworkInsightsPath(input *CreateNetworkInsightsPathInput) (*CreateNetworkInsightsPathOutput, error) { + req, out := c.CreateNetworkInsightsPathRequest(input) + return out, req.Send() +} + +// CreateNetworkInsightsPathWithContext is the same as CreateNetworkInsightsPath with the addition of +// the ability to pass a context and additional request options. +// +// See CreateNetworkInsightsPath 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 *EC2) CreateNetworkInsightsPathWithContext(ctx aws.Context, input *CreateNetworkInsightsPathInput, opts ...request.Option) (*CreateNetworkInsightsPathOutput, error) { + req, out := c.CreateNetworkInsightsPathRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateNetworkInterface = "CreateNetworkInterface" // CreateNetworkInterfaceRequest generates a "aws/request.Request" representing the @@ -5570,11 +6007,11 @@ func (c *EC2) CreateNetworkInterfacePermissionRequest(input *CreateNetworkInterf // CreateNetworkInterfacePermission API operation for Amazon Elastic Compute Cloud. // -// Grants an AWS-authorized account permission to attach the specified network -// interface to an instance in their account. +// Grants an Amazon Web Services-authorized account permission to attach the +// specified network interface to an instance in their account. // -// You can grant permission to a single AWS account only, and only one account -// at a time. +// You can grant permission to a single account only, and only one account at +// a time. // // 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 @@ -5659,7 +6096,7 @@ func (c *EC2) CreatePlacementGroupRequest(input *CreatePlacementGroupInput) (req // in another partition. // // For more information, see Placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -5689,6 +6126,85 @@ func (c *EC2) CreatePlacementGroupWithContext(ctx aws.Context, input *CreatePlac return out, req.Send() } +const opCreateReplaceRootVolumeTask = "CreateReplaceRootVolumeTask" + +// CreateReplaceRootVolumeTaskRequest generates a "aws/request.Request" representing the +// client's request for the CreateReplaceRootVolumeTask 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 CreateReplaceRootVolumeTask for more information on using the CreateReplaceRootVolumeTask +// 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 CreateReplaceRootVolumeTaskRequest method. +// req, resp := client.CreateReplaceRootVolumeTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReplaceRootVolumeTask +func (c *EC2) CreateReplaceRootVolumeTaskRequest(input *CreateReplaceRootVolumeTaskInput) (req *request.Request, output *CreateReplaceRootVolumeTaskOutput) { + op := &request.Operation{ + Name: opCreateReplaceRootVolumeTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateReplaceRootVolumeTaskInput{} + } + + output = &CreateReplaceRootVolumeTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateReplaceRootVolumeTask API operation for Amazon Elastic Compute Cloud. +// +// Creates a root volume replacement task for an Amazon EC2 instance. The root +// volume can either be restored to its initial launch state, or it can be restored +// using a specific snapshot. +// +// For more information, see Replace a root volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html#replace-root) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateReplaceRootVolumeTask for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateReplaceRootVolumeTask +func (c *EC2) CreateReplaceRootVolumeTask(input *CreateReplaceRootVolumeTaskInput) (*CreateReplaceRootVolumeTaskOutput, error) { + req, out := c.CreateReplaceRootVolumeTaskRequest(input) + return out, req.Send() +} + +// CreateReplaceRootVolumeTaskWithContext is the same as CreateReplaceRootVolumeTask with the addition of +// the ability to pass a context and additional request options. +// +// See CreateReplaceRootVolumeTask 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 *EC2) CreateReplaceRootVolumeTaskWithContext(ctx aws.Context, input *CreateReplaceRootVolumeTaskInput, opts ...request.Option) (*CreateReplaceRootVolumeTaskOutput, error) { + req, out := c.CreateReplaceRootVolumeTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateReservedInstancesListing = "CreateReservedInstancesListing" // CreateReservedInstancesListingRequest generates a "aws/request.Request" representing the @@ -5755,7 +6271,7 @@ func (c *EC2) CreateReservedInstancesListingRequest(input *CreateReservedInstanc // you can use the DescribeReservedInstancesListings operation. // // For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -5785,6 +6301,88 @@ func (c *EC2) CreateReservedInstancesListingWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateRestoreImageTask = "CreateRestoreImageTask" + +// CreateRestoreImageTaskRequest generates a "aws/request.Request" representing the +// client's request for the CreateRestoreImageTask 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 CreateRestoreImageTask for more information on using the CreateRestoreImageTask +// 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 CreateRestoreImageTaskRequest method. +// req, resp := client.CreateRestoreImageTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRestoreImageTask +func (c *EC2) CreateRestoreImageTaskRequest(input *CreateRestoreImageTaskInput) (req *request.Request, output *CreateRestoreImageTaskOutput) { + op := &request.Operation{ + Name: opCreateRestoreImageTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateRestoreImageTaskInput{} + } + + output = &CreateRestoreImageTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateRestoreImageTask API operation for Amazon Elastic Compute Cloud. +// +// Starts a task that restores an AMI from an S3 object that was previously +// created by using CreateStoreImageTask (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateStoreImageTask.html). +// +// To use this API, you must have the required permissions. For more information, +// see Permissions for storing and restoring AMIs using S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions) +// in the Amazon Elastic Compute Cloud User Guide. +// +// For more information, see Store and restore an AMI using S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateRestoreImageTask for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateRestoreImageTask +func (c *EC2) CreateRestoreImageTask(input *CreateRestoreImageTaskInput) (*CreateRestoreImageTaskOutput, error) { + req, out := c.CreateRestoreImageTaskRequest(input) + return out, req.Send() +} + +// CreateRestoreImageTaskWithContext is the same as CreateRestoreImageTask with the addition of +// the ability to pass a context and additional request options. +// +// See CreateRestoreImageTask 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 *EC2) CreateRestoreImageTaskWithContext(ctx aws.Context, input *CreateRestoreImageTaskInput, opts ...request.Option) (*CreateRestoreImageTaskOutput, error) { + req, out := c.CreateRestoreImageTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateRoute = "CreateRoute" // CreateRouteRequest generates a "aws/request.Request" representing the @@ -6103,28 +6701,35 @@ func (c *EC2) CreateSnapshotRequest(input *CreateSnapshotInput) (req *request.Re // snapshots for backups, to make copies of EBS volumes, and to save data before // shutting down an instance. // -// When a snapshot is created, any AWS Marketplace product codes that are associated +// You can create snapshots of volumes in a Region and volumes on an Outpost. +// If you create a snapshot of a volume in a Region, the snapshot must be stored +// in the same Region as the volume. If you create a snapshot of a volume on +// an Outpost, the snapshot can be stored on the same Outpost as the volume, +// or in the Region for that Outpost. +// +// When a snapshot is created, any Marketplace product codes that are associated // with the source volume are propagated to the snapshot. // // You can take a snapshot of an attached volume that is in use. However, snapshots -// only capture data that has been written to your EBS volume at the time the -// snapshot command is issued; this might exclude any data that has been cached -// by any applications or the operating system. If you can pause any file systems -// on the volume long enough to take a snapshot, your snapshot should be complete. -// However, if you cannot pause all file writes to the volume, you should unmount -// the volume from within the instance, issue the snapshot command, and then -// remount the volume to ensure a consistent and complete snapshot. You may -// remount and use your volume while the snapshot status is pending. -// -// To create a snapshot for EBS volumes that serve as root devices, you should -// stop the instance before taking the snapshot. +// only capture data that has been written to your Amazon EBS volume at the +// time the snapshot command is issued; this might exclude any data that has +// been cached by any applications or the operating system. If you can pause +// any file systems on the volume long enough to take a snapshot, your snapshot +// should be complete. However, if you cannot pause all file writes to the volume, +// you should unmount the volume from within the instance, issue the snapshot +// command, and then remount the volume to ensure a consistent and complete +// snapshot. You may remount and use your volume while the snapshot status is +// pending. +// +// To create a snapshot for Amazon EBS volumes that serve as root devices, you +// should stop the instance before taking the snapshot. // // Snapshots that are taken from encrypted volumes are automatically encrypted. // Volumes that are created from encrypted snapshots are also automatically // encrypted. Your encrypted volumes and any associated snapshots always remain // protected. // -// You can tag your snapshots during creation. For more information, see Tagging +// You can tag your snapshots during creation. For more information, see Tag // your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -6209,6 +6814,12 @@ func (c *EC2) CreateSnapshotsRequest(input *CreateSnapshotsInput) (req *request. // will produce one snapshot each that is crash-consistent across the instance. // Boot volumes can be excluded by changing the parameters. // +// You can create multi-volume snapshots of instances in a Region and instances +// on an Outpost. If you create snapshots from an instance in a Region, the +// snapshots must be stored in the same Region as the instance. If you create +// snapshots from an instance on an Outpost, the snapshots can be stored on +// the same Outpost as the instance, or in the Region for that Outpost. +// // 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. @@ -6282,7 +6893,7 @@ func (c *EC2) CreateSpotDatafeedSubscriptionRequest(input *CreateSpotDatafeedSub // CreateSpotDatafeedSubscription API operation for Amazon Elastic Compute Cloud. // // Creates a data feed for Spot Instances, enabling you to view Spot Instance -// usage logs. You can create one data feed per AWS account. For more information, +// usage logs. You can create one data feed per account. For more information, // see Spot Instance data feed (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-data-feeds.html) // in the Amazon EC2 User Guide for Linux Instances. // @@ -6314,6 +6925,87 @@ func (c *EC2) CreateSpotDatafeedSubscriptionWithContext(ctx aws.Context, input * return out, req.Send() } +const opCreateStoreImageTask = "CreateStoreImageTask" + +// CreateStoreImageTaskRequest generates a "aws/request.Request" representing the +// client's request for the CreateStoreImageTask 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 CreateStoreImageTask for more information on using the CreateStoreImageTask +// 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 CreateStoreImageTaskRequest method. +// req, resp := client.CreateStoreImageTaskRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateStoreImageTask +func (c *EC2) CreateStoreImageTaskRequest(input *CreateStoreImageTaskInput) (req *request.Request, output *CreateStoreImageTaskOutput) { + op := &request.Operation{ + Name: opCreateStoreImageTask, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateStoreImageTaskInput{} + } + + output = &CreateStoreImageTaskOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateStoreImageTask API operation for Amazon Elastic Compute Cloud. +// +// Stores an AMI as a single object in an S3 bucket. +// +// To use this API, you must have the required permissions. For more information, +// see Permissions for storing and restoring AMIs using S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions) +// in the Amazon Elastic Compute Cloud User Guide. +// +// For more information, see Store and restore an AMI using S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateStoreImageTask for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateStoreImageTask +func (c *EC2) CreateStoreImageTask(input *CreateStoreImageTaskInput) (*CreateStoreImageTaskOutput, error) { + req, out := c.CreateStoreImageTaskRequest(input) + return out, req.Send() +} + +// CreateStoreImageTaskWithContext is the same as CreateStoreImageTask with the addition of +// the ability to pass a context and additional request options. +// +// See CreateStoreImageTask 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 *EC2) CreateStoreImageTaskWithContext(ctx aws.Context, input *CreateStoreImageTaskInput, opts ...request.Option) (*CreateStoreImageTaskOutput, error) { + req, out := c.CreateStoreImageTaskRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateSubnet = "CreateSubnet" // CreateSubnetRequest generates a "aws/request.Request" representing the @@ -6916,6 +7608,166 @@ func (c *EC2) CreateTransitGatewayWithContext(ctx aws.Context, input *CreateTran return out, req.Send() } +const opCreateTransitGatewayConnect = "CreateTransitGatewayConnect" + +// CreateTransitGatewayConnectRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransitGatewayConnect 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 CreateTransitGatewayConnect for more information on using the CreateTransitGatewayConnect +// 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 CreateTransitGatewayConnectRequest method. +// req, resp := client.CreateTransitGatewayConnectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayConnect +func (c *EC2) CreateTransitGatewayConnectRequest(input *CreateTransitGatewayConnectInput) (req *request.Request, output *CreateTransitGatewayConnectOutput) { + op := &request.Operation{ + Name: opCreateTransitGatewayConnect, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransitGatewayConnectInput{} + } + + output = &CreateTransitGatewayConnectOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransitGatewayConnect API operation for Amazon Elastic Compute Cloud. +// +// Creates a Connect attachment from a specified transit gateway attachment. +// A Connect attachment is a GRE-based tunnel attachment that you can use to +// establish a connection between a transit gateway and an appliance. +// +// A Connect attachment uses an existing VPC or AWS Direct Connect attachment +// as the underlying transport mechanism. +// +// 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 Elastic Compute Cloud's +// API operation CreateTransitGatewayConnect for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayConnect +func (c *EC2) CreateTransitGatewayConnect(input *CreateTransitGatewayConnectInput) (*CreateTransitGatewayConnectOutput, error) { + req, out := c.CreateTransitGatewayConnectRequest(input) + return out, req.Send() +} + +// CreateTransitGatewayConnectWithContext is the same as CreateTransitGatewayConnect with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransitGatewayConnect 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 *EC2) CreateTransitGatewayConnectWithContext(ctx aws.Context, input *CreateTransitGatewayConnectInput, opts ...request.Option) (*CreateTransitGatewayConnectOutput, error) { + req, out := c.CreateTransitGatewayConnectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opCreateTransitGatewayConnectPeer = "CreateTransitGatewayConnectPeer" + +// CreateTransitGatewayConnectPeerRequest generates a "aws/request.Request" representing the +// client's request for the CreateTransitGatewayConnectPeer 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 CreateTransitGatewayConnectPeer for more information on using the CreateTransitGatewayConnectPeer +// 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 CreateTransitGatewayConnectPeerRequest method. +// req, resp := client.CreateTransitGatewayConnectPeerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayConnectPeer +func (c *EC2) CreateTransitGatewayConnectPeerRequest(input *CreateTransitGatewayConnectPeerInput) (req *request.Request, output *CreateTransitGatewayConnectPeerOutput) { + op := &request.Operation{ + Name: opCreateTransitGatewayConnectPeer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &CreateTransitGatewayConnectPeerInput{} + } + + output = &CreateTransitGatewayConnectPeerOutput{} + req = c.newRequest(op, input, output) + return +} + +// CreateTransitGatewayConnectPeer API operation for Amazon Elastic Compute Cloud. +// +// Creates a Connect peer for a specified transit gateway Connect attachment +// between a transit gateway and an appliance. +// +// The peer address and transit gateway address must be the same IP address +// family (IPv4 or IPv6). +// +// For more information, see Connect peers (https://docs.aws.amazon.com/vpc/latest/tgw/tgw-connect.html#tgw-connect-peer) +// in the Transit Gateways 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation CreateTransitGatewayConnectPeer for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/CreateTransitGatewayConnectPeer +func (c *EC2) CreateTransitGatewayConnectPeer(input *CreateTransitGatewayConnectPeerInput) (*CreateTransitGatewayConnectPeerOutput, error) { + req, out := c.CreateTransitGatewayConnectPeerRequest(input) + return out, req.Send() +} + +// CreateTransitGatewayConnectPeerWithContext is the same as CreateTransitGatewayConnectPeer with the addition of +// the ability to pass a context and additional request options. +// +// See CreateTransitGatewayConnectPeer 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 *EC2) CreateTransitGatewayConnectPeerWithContext(ctx aws.Context, input *CreateTransitGatewayConnectPeerInput, opts ...request.Option) (*CreateTransitGatewayConnectPeerOutput, error) { + req, out := c.CreateTransitGatewayConnectPeerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opCreateTransitGatewayMulticastDomain = "CreateTransitGatewayMulticastDomain" // CreateTransitGatewayMulticastDomainRequest generates a "aws/request.Request" representing the @@ -7426,8 +8278,7 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques // Zone. // // You can create a new empty volume or restore a volume from an EBS snapshot. -// Any AWS Marketplace product codes from the snapshot are propagated to the -// volume. +// Any Marketplace product codes from the snapshot are propagated to the volume. // // You can create encrypted volumes. Encrypted volumes must be attached to instances // that support Amazon EBS encryption. Volumes that are created from encrypted @@ -7435,11 +8286,11 @@ func (c *EC2) CreateVolumeRequest(input *CreateVolumeInput) (req *request.Reques // EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. // -// You can tag your volumes during creation. For more information, see Tagging -// your Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) +// You can tag your volumes during creation. For more information, see Tag your +// Amazon EC2 resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) // in the Amazon Elastic Compute Cloud User Guide. // -// For more information, see Creating an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) +// For more information, see Create an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-creating-volume.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -8698,7 +9549,7 @@ func (c *EC2) DeleteFleetsRequest(input *DeleteFleetsInput) (req *request.Reques // instant fleets. // // For more information, see Deleting an EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#delete-fleet) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -8876,6 +9727,83 @@ func (c *EC2) DeleteFpgaImageWithContext(ctx aws.Context, input *DeleteFpgaImage return out, req.Send() } +const opDeleteInstanceEventWindow = "DeleteInstanceEventWindow" + +// DeleteInstanceEventWindowRequest generates a "aws/request.Request" representing the +// client's request for the DeleteInstanceEventWindow 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 DeleteInstanceEventWindow for more information on using the DeleteInstanceEventWindow +// 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 DeleteInstanceEventWindowRequest method. +// req, resp := client.DeleteInstanceEventWindowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInstanceEventWindow +func (c *EC2) DeleteInstanceEventWindowRequest(input *DeleteInstanceEventWindowInput) (req *request.Request, output *DeleteInstanceEventWindowOutput) { + op := &request.Operation{ + Name: opDeleteInstanceEventWindow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteInstanceEventWindowInput{} + } + + output = &DeleteInstanceEventWindowOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteInstanceEventWindow API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified event window. +// +// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/monitoring-instances-status-check_sched.html#event-windows) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteInstanceEventWindow for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteInstanceEventWindow +func (c *EC2) DeleteInstanceEventWindow(input *DeleteInstanceEventWindowInput) (*DeleteInstanceEventWindowOutput, error) { + req, out := c.DeleteInstanceEventWindowRequest(input) + return out, req.Send() +} + +// DeleteInstanceEventWindowWithContext is the same as DeleteInstanceEventWindow with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteInstanceEventWindow 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 *EC2) DeleteInstanceEventWindowWithContext(ctx aws.Context, input *DeleteInstanceEventWindowInput, opts ...request.Option) (*DeleteInstanceEventWindowOutput, error) { + req, out := c.DeleteInstanceEventWindowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteInternetGateway = "DeleteInternetGateway" // DeleteInternetGatewayRequest generates a "aws/request.Request" representing the @@ -9446,9 +10374,10 @@ func (c *EC2) DeleteNatGatewayRequest(input *DeleteNatGatewayInput) (req *reques // DeleteNatGateway API operation for Amazon Elastic Compute Cloud. // -// Deletes the specified NAT gateway. Deleting a NAT gateway disassociates its -// Elastic IP address, but does not release the address from your account. Deleting -// a NAT gateway does not delete any NAT gateway routes in your route tables. +// Deletes the specified NAT gateway. Deleting a public NAT gateway disassociates +// its Elastic IP address, but does not release the address from your account. +// Deleting a NAT gateway does not delete any NAT gateway routes in your route +// tables. // // 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 @@ -9630,6 +10559,154 @@ func (c *EC2) DeleteNetworkAclEntryWithContext(ctx aws.Context, input *DeleteNet return out, req.Send() } +const opDeleteNetworkInsightsAnalysis = "DeleteNetworkInsightsAnalysis" + +// DeleteNetworkInsightsAnalysisRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNetworkInsightsAnalysis 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 DeleteNetworkInsightsAnalysis for more information on using the DeleteNetworkInsightsAnalysis +// 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 DeleteNetworkInsightsAnalysisRequest method. +// req, resp := client.DeleteNetworkInsightsAnalysisRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInsightsAnalysis +func (c *EC2) DeleteNetworkInsightsAnalysisRequest(input *DeleteNetworkInsightsAnalysisInput) (req *request.Request, output *DeleteNetworkInsightsAnalysisOutput) { + op := &request.Operation{ + Name: opDeleteNetworkInsightsAnalysis, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNetworkInsightsAnalysisInput{} + } + + output = &DeleteNetworkInsightsAnalysisOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteNetworkInsightsAnalysis API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified network insights analysis. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DeleteNetworkInsightsAnalysis for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInsightsAnalysis +func (c *EC2) DeleteNetworkInsightsAnalysis(input *DeleteNetworkInsightsAnalysisInput) (*DeleteNetworkInsightsAnalysisOutput, error) { + req, out := c.DeleteNetworkInsightsAnalysisRequest(input) + return out, req.Send() +} + +// DeleteNetworkInsightsAnalysisWithContext is the same as DeleteNetworkInsightsAnalysis with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNetworkInsightsAnalysis 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 *EC2) DeleteNetworkInsightsAnalysisWithContext(ctx aws.Context, input *DeleteNetworkInsightsAnalysisInput, opts ...request.Option) (*DeleteNetworkInsightsAnalysisOutput, error) { + req, out := c.DeleteNetworkInsightsAnalysisRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteNetworkInsightsPath = "DeleteNetworkInsightsPath" + +// DeleteNetworkInsightsPathRequest generates a "aws/request.Request" representing the +// client's request for the DeleteNetworkInsightsPath 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 DeleteNetworkInsightsPath for more information on using the DeleteNetworkInsightsPath +// 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 DeleteNetworkInsightsPathRequest method. +// req, resp := client.DeleteNetworkInsightsPathRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInsightsPath +func (c *EC2) DeleteNetworkInsightsPathRequest(input *DeleteNetworkInsightsPathInput) (req *request.Request, output *DeleteNetworkInsightsPathOutput) { + op := &request.Operation{ + Name: opDeleteNetworkInsightsPath, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteNetworkInsightsPathInput{} + } + + output = &DeleteNetworkInsightsPathOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteNetworkInsightsPath API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified path. +// +// 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 Elastic Compute Cloud's +// API operation DeleteNetworkInsightsPath for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteNetworkInsightsPath +func (c *EC2) DeleteNetworkInsightsPath(input *DeleteNetworkInsightsPathInput) (*DeleteNetworkInsightsPathOutput, error) { + req, out := c.DeleteNetworkInsightsPathRequest(input) + return out, req.Send() +} + +// DeleteNetworkInsightsPathWithContext is the same as DeleteNetworkInsightsPath with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteNetworkInsightsPath 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 *EC2) DeleteNetworkInsightsPathWithContext(ctx aws.Context, input *DeleteNetworkInsightsPathInput, opts ...request.Option) (*DeleteNetworkInsightsPathOutput, error) { + req, out := c.DeleteNetworkInsightsPathRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteNetworkInterface = "DeleteNetworkInterface" // DeleteNetworkInterfaceRequest generates a "aws/request.Request" representing the @@ -9831,7 +10908,7 @@ func (c *EC2) DeletePlacementGroupRequest(input *DeletePlacementGroupInput) (req // Deletes the specified placement group. You must terminate all instances in // the placement group before you can delete the placement group. For more information, // see Placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -10224,7 +11301,7 @@ func (c *EC2) DeleteSnapshotRequest(input *DeleteSnapshotInput) (req *request.Re // a registered AMI. You must first de-register the AMI before you can delete // the snapshot. // -// For more information, see Deleting an Amazon EBS snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html) +// For more information, see Delete an Amazon EBS snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-snapshot.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -10861,6 +11938,155 @@ func (c *EC2) DeleteTransitGatewayWithContext(ctx aws.Context, input *DeleteTran return out, req.Send() } +const opDeleteTransitGatewayConnect = "DeleteTransitGatewayConnect" + +// DeleteTransitGatewayConnectRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTransitGatewayConnect 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 DeleteTransitGatewayConnect for more information on using the DeleteTransitGatewayConnect +// 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 DeleteTransitGatewayConnectRequest method. +// req, resp := client.DeleteTransitGatewayConnectRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayConnect +func (c *EC2) DeleteTransitGatewayConnectRequest(input *DeleteTransitGatewayConnectInput) (req *request.Request, output *DeleteTransitGatewayConnectOutput) { + op := &request.Operation{ + Name: opDeleteTransitGatewayConnect, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTransitGatewayConnectInput{} + } + + output = &DeleteTransitGatewayConnectOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTransitGatewayConnect API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Connect attachment. You must first delete any Connect +// peers for the attachment. +// +// 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 Elastic Compute Cloud's +// API operation DeleteTransitGatewayConnect for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayConnect +func (c *EC2) DeleteTransitGatewayConnect(input *DeleteTransitGatewayConnectInput) (*DeleteTransitGatewayConnectOutput, error) { + req, out := c.DeleteTransitGatewayConnectRequest(input) + return out, req.Send() +} + +// DeleteTransitGatewayConnectWithContext is the same as DeleteTransitGatewayConnect with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTransitGatewayConnect 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 *EC2) DeleteTransitGatewayConnectWithContext(ctx aws.Context, input *DeleteTransitGatewayConnectInput, opts ...request.Option) (*DeleteTransitGatewayConnectOutput, error) { + req, out := c.DeleteTransitGatewayConnectRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeleteTransitGatewayConnectPeer = "DeleteTransitGatewayConnectPeer" + +// DeleteTransitGatewayConnectPeerRequest generates a "aws/request.Request" representing the +// client's request for the DeleteTransitGatewayConnectPeer 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 DeleteTransitGatewayConnectPeer for more information on using the DeleteTransitGatewayConnectPeer +// 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 DeleteTransitGatewayConnectPeerRequest method. +// req, resp := client.DeleteTransitGatewayConnectPeerRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayConnectPeer +func (c *EC2) DeleteTransitGatewayConnectPeerRequest(input *DeleteTransitGatewayConnectPeerInput) (req *request.Request, output *DeleteTransitGatewayConnectPeerOutput) { + op := &request.Operation{ + Name: opDeleteTransitGatewayConnectPeer, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DeleteTransitGatewayConnectPeerInput{} + } + + output = &DeleteTransitGatewayConnectPeerOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeleteTransitGatewayConnectPeer API operation for Amazon Elastic Compute Cloud. +// +// Deletes the specified Connect peer. +// +// 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 Elastic Compute Cloud's +// API operation DeleteTransitGatewayConnectPeer for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DeleteTransitGatewayConnectPeer +func (c *EC2) DeleteTransitGatewayConnectPeer(input *DeleteTransitGatewayConnectPeerInput) (*DeleteTransitGatewayConnectPeerOutput, error) { + req, out := c.DeleteTransitGatewayConnectPeerRequest(input) + return out, req.Send() +} + +// DeleteTransitGatewayConnectPeerWithContext is the same as DeleteTransitGatewayConnectPeer with the addition of +// the ability to pass a context and additional request options. +// +// See DeleteTransitGatewayConnectPeer 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 *EC2) DeleteTransitGatewayConnectPeerWithContext(ctx aws.Context, input *DeleteTransitGatewayConnectPeerInput, opts ...request.Option) (*DeleteTransitGatewayConnectPeerOutput, error) { + req, out := c.DeleteTransitGatewayConnectPeerRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDeleteTransitGatewayMulticastDomain = "DeleteTransitGatewayMulticastDomain" // DeleteTransitGatewayMulticastDomainRequest generates a "aws/request.Request" representing the @@ -11358,7 +12584,7 @@ func (c *EC2) DeleteVolumeRequest(input *DeleteVolumeInput) (req *request.Reques // // The volume can remain in the deleting state for several minutes. // -// For more information, see Deleting an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) +// For more information, see Delete an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-deleting-volume.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -11663,12 +12889,26 @@ func (c *EC2) DeleteVpcEndpointsRequest(input *DeleteVpcEndpointsInput) (req *re // DeleteVpcEndpoints API operation for Amazon Elastic Compute Cloud. // -// Deletes one or more specified VPC endpoints. Deleting a gateway endpoint -// also deletes the endpoint routes in the route tables that were associated -// with the endpoint. Deleting an interface endpoint or a Gateway Load Balancer -// endpoint deletes the endpoint network interfaces. Gateway Load Balancer endpoints -// can only be deleted if the routes that are associated with the endpoint are -// deleted. +// Deletes one or more specified VPC endpoints. You can delete any of the following +// types of VPC endpoints. +// +// * Gateway endpoint, +// +// * Gateway Load Balancer endpoint, +// +// * Interface endpoint +// +// The following rules apply when you delete a VPC endpoint: +// +// * When you delete a gateway endpoint, we delete the endpoint routes in +// the route tables that are associated with the endpoint. +// +// * When you delete a Gateway Load Balancer endpoint, we delete the endpoint +// network interfaces. You can only delete Gateway Load Balancer endpoints +// when the routes that are associated with the endpoint are deleted. +// +// * When you delete an interface endpoint, we delete the endpoint network +// interfaces. // // 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 @@ -12065,8 +13305,8 @@ func (c *EC2) DeprovisionByoipCidrRequest(input *DeprovisionByoipCidrInput) (req // DeprovisionByoipCidr API operation for Amazon Elastic Compute Cloud. // // Releases the specified address range that you provisioned for use with your -// AWS resources through bring your own IP addresses (BYOIP) and deletes the -// corresponding address pool. +// Amazon Web Services resources through bring your own IP addresses (BYOIP) +// and deletes the corresponding address pool. // // Before you can release an address range, you must stop advertising it using // WithdrawByoipCidr and you must not have any IP addresses allocated from its @@ -12227,6 +13467,8 @@ func (c *EC2) DeregisterInstanceEventNotificationAttributesRequest(input *Deregi // DeregisterInstanceEventNotificationAttributes API operation for Amazon Elastic Compute Cloud. // +// c +// // Deregisters tag keys to prevent tags that have the specified tag keys from // being included in scheduled event notifications for resources in the Region. // @@ -12580,6 +13822,139 @@ func (c *EC2) DescribeAddressesWithContext(ctx aws.Context, input *DescribeAddre return out, req.Send() } +const opDescribeAddressesAttribute = "DescribeAddressesAttribute" + +// DescribeAddressesAttributeRequest generates a "aws/request.Request" representing the +// client's request for the DescribeAddressesAttribute 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 DescribeAddressesAttribute for more information on using the DescribeAddressesAttribute +// 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 DescribeAddressesAttributeRequest method. +// req, resp := client.DescribeAddressesAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddressesAttribute +func (c *EC2) DescribeAddressesAttributeRequest(input *DescribeAddressesAttributeInput) (req *request.Request, output *DescribeAddressesAttributeOutput) { + op := &request.Operation{ + Name: opDescribeAddressesAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeAddressesAttributeInput{} + } + + output = &DescribeAddressesAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeAddressesAttribute API operation for Amazon Elastic Compute Cloud. +// +// Describes the attributes of the specified Elastic IP addresses. For requirements, +// see Using reverse DNS for email applications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS). +// +// 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 Elastic Compute Cloud's +// API operation DescribeAddressesAttribute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeAddressesAttribute +func (c *EC2) DescribeAddressesAttribute(input *DescribeAddressesAttributeInput) (*DescribeAddressesAttributeOutput, error) { + req, out := c.DescribeAddressesAttributeRequest(input) + return out, req.Send() +} + +// DescribeAddressesAttributeWithContext is the same as DescribeAddressesAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeAddressesAttribute 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 *EC2) DescribeAddressesAttributeWithContext(ctx aws.Context, input *DescribeAddressesAttributeInput, opts ...request.Option) (*DescribeAddressesAttributeOutput, error) { + req, out := c.DescribeAddressesAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeAddressesAttributePages iterates over the pages of a DescribeAddressesAttribute operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeAddressesAttribute 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 DescribeAddressesAttribute operation. +// pageNum := 0 +// err := client.DescribeAddressesAttributePages(params, +// func(page *ec2.DescribeAddressesAttributeOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeAddressesAttributePages(input *DescribeAddressesAttributeInput, fn func(*DescribeAddressesAttributeOutput, bool) bool) error { + return c.DescribeAddressesAttributePagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeAddressesAttributePagesWithContext same as DescribeAddressesAttributePages 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 *EC2) DescribeAddressesAttributePagesWithContext(ctx aws.Context, input *DescribeAddressesAttributeInput, fn func(*DescribeAddressesAttributeOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeAddressesAttributeInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeAddressesAttributeRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeAddressesAttributeOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeAggregateIdFormat = "DescribeAggregateIdFormat" // DescribeAggregateIdFormatRequest generates a "aws/request.Request" representing the @@ -13013,7 +14388,7 @@ func (c *EC2) DescribeCapacityReservationsRequest(input *DescribeCapacityReserva // DescribeCapacityReservations API operation for Amazon Elastic Compute Cloud. // // Describes one or more of your Capacity Reservations. The results describe -// only the Capacity Reservations in the AWS Region that you're currently using. +// only the Capacity Reservations in the Region that you're currently using. // // 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 @@ -15043,6 +16418,9 @@ func (c *EC2) DescribeFleetHistoryRequest(input *DescribeFleetHistoryInput) (req // This ensures that you can query by the last evaluated time and not miss a // recorded event. EC2 Fleet events are available for 48 hours. // +// For more information, see Monitoring your EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet) +// in the Amazon EC2 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 // the error. @@ -15117,6 +16495,9 @@ func (c *EC2) DescribeFleetInstancesRequest(input *DescribeFleetInstancesInput) // // Describes the running instances for the specified EC2 Fleet. // +// For more information, see Monitoring your EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet) +// in the Amazon EC2 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 // the error. @@ -15197,6 +16578,9 @@ func (c *EC2) DescribeFleetsRequest(input *DescribeFleetsInput) (req *request.Re // // Describes the specified EC2 Fleets or all of your EC2 Fleets. // +// For more information, see Monitoring your EC2 Fleet (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet.html#monitor-ec2-fleet) +// in the Amazon EC2 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 // the error. @@ -15676,8 +17060,8 @@ func (c *EC2) DescribeHostReservationOfferingsRequest(input *DescribeHostReserva // Hosts. When purchasing an offering, ensure that the instance family and Region // of the offering matches that of the Dedicated Hosts with which it is to be // associated. For more information about supported instance types, see Dedicated -// Hosts Overview (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) -// in the Amazon Elastic Compute Cloud User Guide. +// Hosts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-overview.html) +// in the Amazon EC2 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 @@ -16469,8 +17853,8 @@ func (c *EC2) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Re // // Recently deregistered images appear in the returned results for a short interval // and then return empty results. After all instances that reference a deregistered -// AMI are terminated, specifying the ID of the image results in an error indicating -// that the AMI ID cannot be found. +// AMI are terminated, specifying the ID of the image will eventually return +// an error indicating that the AMI ID cannot be found. // // 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 @@ -16916,7 +18300,7 @@ func (c *EC2) DescribeInstanceCreditSpecificationsRequest(input *DescribeInstanc // the call works normally. // // For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -17073,6 +18457,148 @@ func (c *EC2) DescribeInstanceEventNotificationAttributesWithContext(ctx aws.Con return out, req.Send() } +const opDescribeInstanceEventWindows = "DescribeInstanceEventWindows" + +// DescribeInstanceEventWindowsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeInstanceEventWindows 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 DescribeInstanceEventWindows for more information on using the DescribeInstanceEventWindows +// 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 DescribeInstanceEventWindowsRequest method. +// req, resp := client.DescribeInstanceEventWindowsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceEventWindows +func (c *EC2) DescribeInstanceEventWindowsRequest(input *DescribeInstanceEventWindowsInput) (req *request.Request, output *DescribeInstanceEventWindowsOutput) { + op := &request.Operation{ + Name: opDescribeInstanceEventWindows, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeInstanceEventWindowsInput{} + } + + output = &DescribeInstanceEventWindowsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeInstanceEventWindows API operation for Amazon Elastic Compute Cloud. +// +// Describes the specified event windows or all event windows. +// +// If you specify event window IDs, the output includes information for only +// the specified event windows. If you specify filters, the output includes +// information for only those event windows that meet the filter criteria. If +// you do not specify event windows IDs or filters, the output includes information +// for all event windows, which can affect performance. We recommend that you +// use pagination to ensure that the operation returns quickly and successfully. +// +// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/monitoring-instances-status-check_sched.html#event-windows) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeInstanceEventWindows for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeInstanceEventWindows +func (c *EC2) DescribeInstanceEventWindows(input *DescribeInstanceEventWindowsInput) (*DescribeInstanceEventWindowsOutput, error) { + req, out := c.DescribeInstanceEventWindowsRequest(input) + return out, req.Send() +} + +// DescribeInstanceEventWindowsWithContext is the same as DescribeInstanceEventWindows with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeInstanceEventWindows 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 *EC2) DescribeInstanceEventWindowsWithContext(ctx aws.Context, input *DescribeInstanceEventWindowsInput, opts ...request.Option) (*DescribeInstanceEventWindowsOutput, error) { + req, out := c.DescribeInstanceEventWindowsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeInstanceEventWindowsPages iterates over the pages of a DescribeInstanceEventWindows operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeInstanceEventWindows 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 DescribeInstanceEventWindows operation. +// pageNum := 0 +// err := client.DescribeInstanceEventWindowsPages(params, +// func(page *ec2.DescribeInstanceEventWindowsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeInstanceEventWindowsPages(input *DescribeInstanceEventWindowsInput, fn func(*DescribeInstanceEventWindowsOutput, bool) bool) error { + return c.DescribeInstanceEventWindowsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeInstanceEventWindowsPagesWithContext same as DescribeInstanceEventWindowsPages 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 *EC2) DescribeInstanceEventWindowsPagesWithContext(ctx aws.Context, input *DescribeInstanceEventWindowsInput, fn func(*DescribeInstanceEventWindowsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeInstanceEventWindowsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeInstanceEventWindowsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeInstanceEventWindowsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeInstanceStatus = "DescribeInstanceStatus" // DescribeInstanceStatusRequest generates a "aws/request.Request" representing the @@ -17133,18 +18659,18 @@ func (c *EC2) DescribeInstanceStatusRequest(input *DescribeInstanceStatusInput) // to identify hardware and software issues. For more information, see Status // checks for your instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-system-instance-status-check.html) // and Troubleshooting instances with failed status checks (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // * Scheduled events - Amazon EC2 can schedule events (such as reboot, stop, // or terminate) for your instances related to hardware issues, software // updates, or system maintenance. For more information, see Scheduled events // for your instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-instances-status-check_sched.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // * Instance state - You can manage your instances from the moment you launch // them through their termination. For more information, see Instance lifecycle // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -19098,7 +20624,8 @@ func (c *EC2) DescribeManagedPrefixListsRequest(input *DescribeManagedPrefixList // DescribeManagedPrefixLists API operation for Amazon Elastic Compute Cloud. // -// Describes your managed prefix lists and any AWS-managed prefix lists. +// Describes your managed prefix lists and any Amazon Web Services-managed prefix +// lists. // // To view the entries for your prefix list, use GetManagedPrefixListEntries. // @@ -19583,6 +21110,270 @@ func (c *EC2) DescribeNetworkAclsPagesWithContext(ctx aws.Context, input *Descri return p.Err() } +const opDescribeNetworkInsightsAnalyses = "DescribeNetworkInsightsAnalyses" + +// DescribeNetworkInsightsAnalysesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNetworkInsightsAnalyses 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 DescribeNetworkInsightsAnalyses for more information on using the DescribeNetworkInsightsAnalyses +// 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 DescribeNetworkInsightsAnalysesRequest method. +// req, resp := client.DescribeNetworkInsightsAnalysesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInsightsAnalyses +func (c *EC2) DescribeNetworkInsightsAnalysesRequest(input *DescribeNetworkInsightsAnalysesInput) (req *request.Request, output *DescribeNetworkInsightsAnalysesOutput) { + op := &request.Operation{ + Name: opDescribeNetworkInsightsAnalyses, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeNetworkInsightsAnalysesInput{} + } + + output = &DescribeNetworkInsightsAnalysesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNetworkInsightsAnalyses API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more of your network insights analyses. +// +// 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 Elastic Compute Cloud's +// API operation DescribeNetworkInsightsAnalyses for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInsightsAnalyses +func (c *EC2) DescribeNetworkInsightsAnalyses(input *DescribeNetworkInsightsAnalysesInput) (*DescribeNetworkInsightsAnalysesOutput, error) { + req, out := c.DescribeNetworkInsightsAnalysesRequest(input) + return out, req.Send() +} + +// DescribeNetworkInsightsAnalysesWithContext is the same as DescribeNetworkInsightsAnalyses with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNetworkInsightsAnalyses 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 *EC2) DescribeNetworkInsightsAnalysesWithContext(ctx aws.Context, input *DescribeNetworkInsightsAnalysesInput, opts ...request.Option) (*DescribeNetworkInsightsAnalysesOutput, error) { + req, out := c.DescribeNetworkInsightsAnalysesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeNetworkInsightsAnalysesPages iterates over the pages of a DescribeNetworkInsightsAnalyses operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeNetworkInsightsAnalyses 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 DescribeNetworkInsightsAnalyses operation. +// pageNum := 0 +// err := client.DescribeNetworkInsightsAnalysesPages(params, +// func(page *ec2.DescribeNetworkInsightsAnalysesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeNetworkInsightsAnalysesPages(input *DescribeNetworkInsightsAnalysesInput, fn func(*DescribeNetworkInsightsAnalysesOutput, bool) bool) error { + return c.DescribeNetworkInsightsAnalysesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeNetworkInsightsAnalysesPagesWithContext same as DescribeNetworkInsightsAnalysesPages 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 *EC2) DescribeNetworkInsightsAnalysesPagesWithContext(ctx aws.Context, input *DescribeNetworkInsightsAnalysesInput, fn func(*DescribeNetworkInsightsAnalysesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeNetworkInsightsAnalysesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNetworkInsightsAnalysesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeNetworkInsightsAnalysesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeNetworkInsightsPaths = "DescribeNetworkInsightsPaths" + +// DescribeNetworkInsightsPathsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeNetworkInsightsPaths 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 DescribeNetworkInsightsPaths for more information on using the DescribeNetworkInsightsPaths +// 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 DescribeNetworkInsightsPathsRequest method. +// req, resp := client.DescribeNetworkInsightsPathsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInsightsPaths +func (c *EC2) DescribeNetworkInsightsPathsRequest(input *DescribeNetworkInsightsPathsInput) (req *request.Request, output *DescribeNetworkInsightsPathsOutput) { + op := &request.Operation{ + Name: opDescribeNetworkInsightsPaths, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeNetworkInsightsPathsInput{} + } + + output = &DescribeNetworkInsightsPathsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeNetworkInsightsPaths API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more of your paths. +// +// 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 Elastic Compute Cloud's +// API operation DescribeNetworkInsightsPaths for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeNetworkInsightsPaths +func (c *EC2) DescribeNetworkInsightsPaths(input *DescribeNetworkInsightsPathsInput) (*DescribeNetworkInsightsPathsOutput, error) { + req, out := c.DescribeNetworkInsightsPathsRequest(input) + return out, req.Send() +} + +// DescribeNetworkInsightsPathsWithContext is the same as DescribeNetworkInsightsPaths with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeNetworkInsightsPaths 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 *EC2) DescribeNetworkInsightsPathsWithContext(ctx aws.Context, input *DescribeNetworkInsightsPathsInput, opts ...request.Option) (*DescribeNetworkInsightsPathsOutput, error) { + req, out := c.DescribeNetworkInsightsPathsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeNetworkInsightsPathsPages iterates over the pages of a DescribeNetworkInsightsPaths operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeNetworkInsightsPaths 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 DescribeNetworkInsightsPaths operation. +// pageNum := 0 +// err := client.DescribeNetworkInsightsPathsPages(params, +// func(page *ec2.DescribeNetworkInsightsPathsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeNetworkInsightsPathsPages(input *DescribeNetworkInsightsPathsInput, fn func(*DescribeNetworkInsightsPathsOutput, bool) bool) error { + return c.DescribeNetworkInsightsPathsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeNetworkInsightsPathsPagesWithContext same as DescribeNetworkInsightsPathsPages 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 *EC2) DescribeNetworkInsightsPathsPagesWithContext(ctx aws.Context, input *DescribeNetworkInsightsPathsInput, fn func(*DescribeNetworkInsightsPathsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeNetworkInsightsPathsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeNetworkInsightsPathsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeNetworkInsightsPathsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeNetworkInterfaceAttribute = "DescribeNetworkInterfaceAttribute" // DescribeNetworkInterfaceAttributeRequest generates a "aws/request.Request" representing the @@ -19968,7 +21759,7 @@ func (c *EC2) DescribePlacementGroupsRequest(input *DescribePlacementGroupsInput // // Describes the specified placement groups or all of your placement groups. // For more information, see Placement groups (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/placement-groups.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -20048,9 +21839,9 @@ func (c *EC2) DescribePrefixListsRequest(input *DescribePrefixListsInput) (req * // DescribePrefixLists API operation for Amazon Elastic Compute Cloud. // -// Describes available AWS services in a prefix list format, which includes -// the prefix list name and prefix list ID of the service and the IP address -// range for the service. +// Describes available Amazon Web Services services in a prefix list format, +// which includes the prefix list name and prefix list ID of the service and +// the IP address range for the service. // // We recommend that you use DescribeManagedPrefixLists instead. // @@ -20493,6 +22284,140 @@ func (c *EC2) DescribeRegionsWithContext(ctx aws.Context, input *DescribeRegions return out, req.Send() } +const opDescribeReplaceRootVolumeTasks = "DescribeReplaceRootVolumeTasks" + +// DescribeReplaceRootVolumeTasksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeReplaceRootVolumeTasks 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 DescribeReplaceRootVolumeTasks for more information on using the DescribeReplaceRootVolumeTasks +// 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 DescribeReplaceRootVolumeTasksRequest method. +// req, resp := client.DescribeReplaceRootVolumeTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReplaceRootVolumeTasks +func (c *EC2) DescribeReplaceRootVolumeTasksRequest(input *DescribeReplaceRootVolumeTasksInput) (req *request.Request, output *DescribeReplaceRootVolumeTasksOutput) { + op := &request.Operation{ + Name: opDescribeReplaceRootVolumeTasks, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeReplaceRootVolumeTasksInput{} + } + + output = &DescribeReplaceRootVolumeTasksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeReplaceRootVolumeTasks API operation for Amazon Elastic Compute Cloud. +// +// Describes a root volume replacement task. For more information, see Replace +// a root volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-restoring-volume.html#replace-root) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeReplaceRootVolumeTasks for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeReplaceRootVolumeTasks +func (c *EC2) DescribeReplaceRootVolumeTasks(input *DescribeReplaceRootVolumeTasksInput) (*DescribeReplaceRootVolumeTasksOutput, error) { + req, out := c.DescribeReplaceRootVolumeTasksRequest(input) + return out, req.Send() +} + +// DescribeReplaceRootVolumeTasksWithContext is the same as DescribeReplaceRootVolumeTasks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeReplaceRootVolumeTasks 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 *EC2) DescribeReplaceRootVolumeTasksWithContext(ctx aws.Context, input *DescribeReplaceRootVolumeTasksInput, opts ...request.Option) (*DescribeReplaceRootVolumeTasksOutput, error) { + req, out := c.DescribeReplaceRootVolumeTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeReplaceRootVolumeTasksPages iterates over the pages of a DescribeReplaceRootVolumeTasks operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeReplaceRootVolumeTasks 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 DescribeReplaceRootVolumeTasks operation. +// pageNum := 0 +// err := client.DescribeReplaceRootVolumeTasksPages(params, +// func(page *ec2.DescribeReplaceRootVolumeTasksOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeReplaceRootVolumeTasksPages(input *DescribeReplaceRootVolumeTasksInput, fn func(*DescribeReplaceRootVolumeTasksOutput, bool) bool) error { + return c.DescribeReplaceRootVolumeTasksPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeReplaceRootVolumeTasksPagesWithContext same as DescribeReplaceRootVolumeTasksPages 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 *EC2) DescribeReplaceRootVolumeTasksPagesWithContext(ctx aws.Context, input *DescribeReplaceRootVolumeTasksInput, fn func(*DescribeReplaceRootVolumeTasksOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeReplaceRootVolumeTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeReplaceRootVolumeTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeReplaceRootVolumeTasksOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeReservedInstances = "DescribeReservedInstances" // DescribeReservedInstancesRequest generates a "aws/request.Request" representing the @@ -20540,7 +22465,7 @@ func (c *EC2) DescribeReservedInstancesRequest(input *DescribeReservedInstancesI // Describes one or more of the Reserved Instances that you purchased. // // For more information about Reserved Instances, see Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -20635,7 +22560,7 @@ func (c *EC2) DescribeReservedInstancesListingsRequest(input *DescribeReservedIn // that you purchase. // // For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -20721,7 +22646,7 @@ func (c *EC2) DescribeReservedInstancesModificationsRequest(input *DescribeReser // about the specific modification is returned. // // For more information, see Modifying Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -20864,7 +22789,7 @@ func (c *EC2) DescribeReservedInstancesOfferingsRequest(input *DescribeReservedI // that you do not purchase your own Reserved Instances. // // For more information, see Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -21433,6 +23358,138 @@ func (c *EC2) DescribeSecurityGroupReferencesWithContext(ctx aws.Context, input return out, req.Send() } +const opDescribeSecurityGroupRules = "DescribeSecurityGroupRules" + +// DescribeSecurityGroupRulesRequest generates a "aws/request.Request" representing the +// client's request for the DescribeSecurityGroupRules 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 DescribeSecurityGroupRules for more information on using the DescribeSecurityGroupRules +// 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 DescribeSecurityGroupRulesRequest method. +// req, resp := client.DescribeSecurityGroupRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupRules +func (c *EC2) DescribeSecurityGroupRulesRequest(input *DescribeSecurityGroupRulesInput) (req *request.Request, output *DescribeSecurityGroupRulesOutput) { + op := &request.Operation{ + Name: opDescribeSecurityGroupRules, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeSecurityGroupRulesInput{} + } + + output = &DescribeSecurityGroupRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeSecurityGroupRules API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more of your security group rules. +// +// 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 Elastic Compute Cloud's +// API operation DescribeSecurityGroupRules for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeSecurityGroupRules +func (c *EC2) DescribeSecurityGroupRules(input *DescribeSecurityGroupRulesInput) (*DescribeSecurityGroupRulesOutput, error) { + req, out := c.DescribeSecurityGroupRulesRequest(input) + return out, req.Send() +} + +// DescribeSecurityGroupRulesWithContext is the same as DescribeSecurityGroupRules with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeSecurityGroupRules 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 *EC2) DescribeSecurityGroupRulesWithContext(ctx aws.Context, input *DescribeSecurityGroupRulesInput, opts ...request.Option) (*DescribeSecurityGroupRulesOutput, error) { + req, out := c.DescribeSecurityGroupRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeSecurityGroupRulesPages iterates over the pages of a DescribeSecurityGroupRules operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeSecurityGroupRules 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 DescribeSecurityGroupRules operation. +// pageNum := 0 +// err := client.DescribeSecurityGroupRulesPages(params, +// func(page *ec2.DescribeSecurityGroupRulesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeSecurityGroupRulesPages(input *DescribeSecurityGroupRulesInput, fn func(*DescribeSecurityGroupRulesOutput, bool) bool) error { + return c.DescribeSecurityGroupRulesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeSecurityGroupRulesPagesWithContext same as DescribeSecurityGroupRulesPages 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 *EC2) DescribeSecurityGroupRulesPagesWithContext(ctx aws.Context, input *DescribeSecurityGroupRulesInput, fn func(*DescribeSecurityGroupRulesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeSecurityGroupRulesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeSecurityGroupRulesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeSecurityGroupRulesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeSecurityGroups = "DescribeSecurityGroups" // DescribeSecurityGroupsRequest generates a "aws/request.Request" representing the @@ -21704,23 +23761,23 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ // snapshots available to you. // // The snapshots available to you include public snapshots, private snapshots -// that you own, and private snapshots owned by other AWS accounts for which -// you have explicit create volume permissions. +// that you own, and private snapshots owned by other accounts for which you +// have explicit create volume permissions. // // The create volume permissions fall into the following categories: // // * public: The owner of the snapshot granted create volume permissions -// for the snapshot to the all group. All AWS accounts have create volume -// permissions for these snapshots. +// for the snapshot to the all group. All accounts have create volume permissions +// for these snapshots. // // * explicit: The owner of the snapshot granted create volume permissions -// to a specific AWS account. +// to a specific account. // -// * implicit: An AWS account has implicit create volume permissions for -// all snapshots it owns. +// * implicit: An account has implicit create volume permissions for all +// snapshots it owns. // // The list of snapshots returned can be filtered by specifying snapshot IDs, -// snapshot owners, or AWS accounts with create volume permissions. If no options +// snapshot owners, or accounts with create volume permissions. If no options // are specified, Amazon EC2 returns all snapshots for which you have create // volume permissions. // @@ -21731,13 +23788,13 @@ func (c *EC2) DescribeSnapshotsRequest(input *DescribeSnapshotsInput) (req *requ // // If you specify one or more snapshot owners using the OwnerIds option, only // snapshots from the specified owners and for which you have access are returned. -// The results can include the AWS account IDs of the specified owners, amazon -// for snapshots owned by Amazon, or self for snapshots that you own. +// The results can include the account IDs of the specified owners, amazon for +// snapshots owned by Amazon, or self for snapshots that you own. // // If you specify a list of restorable users, only snapshots with create snapshot -// permissions for those users are returned. You can specify AWS account IDs -// (if you own the snapshots), self for snapshots for which you own or have -// explicit permissions, or all for public snapshots. +// permissions for those users are returned. You can specify account IDs (if +// you own the snapshots), self for snapshots for which you own or have explicit +// permissions, or all for public snapshots. // // If you are describing a long list of snapshots, we recommend that you paginate // the output to make the list more manageable. The MaxResults parameter sets @@ -22397,10 +24454,10 @@ func (c *EC2) DescribeSpotPriceHistoryRequest(input *DescribeSpotPriceHistoryInp // pricing history (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances-history.html) // in the Amazon EC2 User Guide for Linux Instances. // -// When you specify a start and end time, this operation returns the prices -// of the instance types within the time range that you specified and the time -// when the price changed. The price is valid within the time period that you -// specified; the response merely indicates the last time that the price changed. +// When you specify a start and end time, the operation returns the prices of +// the instance types within that time range. It also returns the last price +// change before the start time, which is the effective price as of the start +// time. // // 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 @@ -22617,6 +24674,154 @@ func (c *EC2) DescribeStaleSecurityGroupsPagesWithContext(ctx aws.Context, input return p.Err() } +const opDescribeStoreImageTasks = "DescribeStoreImageTasks" + +// DescribeStoreImageTasksRequest generates a "aws/request.Request" representing the +// client's request for the DescribeStoreImageTasks 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 DescribeStoreImageTasks for more information on using the DescribeStoreImageTasks +// 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 DescribeStoreImageTasksRequest method. +// req, resp := client.DescribeStoreImageTasksRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStoreImageTasks +func (c *EC2) DescribeStoreImageTasksRequest(input *DescribeStoreImageTasksInput) (req *request.Request, output *DescribeStoreImageTasksOutput) { + op := &request.Operation{ + Name: opDescribeStoreImageTasks, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeStoreImageTasksInput{} + } + + output = &DescribeStoreImageTasksOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeStoreImageTasks API operation for Amazon Elastic Compute Cloud. +// +// Describes the progress of the AMI store tasks. You can describe the store +// tasks for specified AMIs. If you don't specify the AMIs, you get a paginated +// list of store tasks from the last 31 days. +// +// For each AMI task, the response indicates if the task is InProgress, Completed, +// or Failed. For tasks InProgress, the response shows the estimated progress +// as a percentage. +// +// Tasks are listed in reverse chronological order. Currently, only tasks from +// the past 31 days can be viewed. +// +// To use this API, you must have the required permissions. For more information, +// see Permissions for storing and restoring AMIs using S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html#ami-s3-permissions) +// in the Amazon Elastic Compute Cloud User Guide. +// +// For more information, see Store and restore an AMI using S3 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-store-restore.html) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DescribeStoreImageTasks for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeStoreImageTasks +func (c *EC2) DescribeStoreImageTasks(input *DescribeStoreImageTasksInput) (*DescribeStoreImageTasksOutput, error) { + req, out := c.DescribeStoreImageTasksRequest(input) + return out, req.Send() +} + +// DescribeStoreImageTasksWithContext is the same as DescribeStoreImageTasks with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeStoreImageTasks 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 *EC2) DescribeStoreImageTasksWithContext(ctx aws.Context, input *DescribeStoreImageTasksInput, opts ...request.Option) (*DescribeStoreImageTasksOutput, error) { + req, out := c.DescribeStoreImageTasksRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeStoreImageTasksPages iterates over the pages of a DescribeStoreImageTasks operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeStoreImageTasks 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 DescribeStoreImageTasks operation. +// pageNum := 0 +// err := client.DescribeStoreImageTasksPages(params, +// func(page *ec2.DescribeStoreImageTasksOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeStoreImageTasksPages(input *DescribeStoreImageTasksInput, fn func(*DescribeStoreImageTasksOutput, bool) bool) error { + return c.DescribeStoreImageTasksPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeStoreImageTasksPagesWithContext same as DescribeStoreImageTasksPages 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 *EC2) DescribeStoreImageTasksPagesWithContext(ctx aws.Context, input *DescribeStoreImageTasksInput, fn func(*DescribeStoreImageTasksOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeStoreImageTasksInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeStoreImageTasksRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeStoreImageTasksOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeSubnets = "DescribeSubnets" // DescribeSubnetsRequest generates a "aws/request.Request" representing the @@ -23419,6 +25624,270 @@ func (c *EC2) DescribeTransitGatewayAttachmentsPagesWithContext(ctx aws.Context, return p.Err() } +const opDescribeTransitGatewayConnectPeers = "DescribeTransitGatewayConnectPeers" + +// DescribeTransitGatewayConnectPeersRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransitGatewayConnectPeers 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 DescribeTransitGatewayConnectPeers for more information on using the DescribeTransitGatewayConnectPeers +// 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 DescribeTransitGatewayConnectPeersRequest method. +// req, resp := client.DescribeTransitGatewayConnectPeersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayConnectPeers +func (c *EC2) DescribeTransitGatewayConnectPeersRequest(input *DescribeTransitGatewayConnectPeersInput) (req *request.Request, output *DescribeTransitGatewayConnectPeersOutput) { + op := &request.Operation{ + Name: opDescribeTransitGatewayConnectPeers, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTransitGatewayConnectPeersInput{} + } + + output = &DescribeTransitGatewayConnectPeersOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransitGatewayConnectPeers API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more Connect peers. +// +// 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 Elastic Compute Cloud's +// API operation DescribeTransitGatewayConnectPeers for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayConnectPeers +func (c *EC2) DescribeTransitGatewayConnectPeers(input *DescribeTransitGatewayConnectPeersInput) (*DescribeTransitGatewayConnectPeersOutput, error) { + req, out := c.DescribeTransitGatewayConnectPeersRequest(input) + return out, req.Send() +} + +// DescribeTransitGatewayConnectPeersWithContext is the same as DescribeTransitGatewayConnectPeers with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransitGatewayConnectPeers 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 *EC2) DescribeTransitGatewayConnectPeersWithContext(ctx aws.Context, input *DescribeTransitGatewayConnectPeersInput, opts ...request.Option) (*DescribeTransitGatewayConnectPeersOutput, error) { + req, out := c.DescribeTransitGatewayConnectPeersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTransitGatewayConnectPeersPages iterates over the pages of a DescribeTransitGatewayConnectPeers operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTransitGatewayConnectPeers 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 DescribeTransitGatewayConnectPeers operation. +// pageNum := 0 +// err := client.DescribeTransitGatewayConnectPeersPages(params, +// func(page *ec2.DescribeTransitGatewayConnectPeersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTransitGatewayConnectPeersPages(input *DescribeTransitGatewayConnectPeersInput, fn func(*DescribeTransitGatewayConnectPeersOutput, bool) bool) error { + return c.DescribeTransitGatewayConnectPeersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTransitGatewayConnectPeersPagesWithContext same as DescribeTransitGatewayConnectPeersPages 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 *EC2) DescribeTransitGatewayConnectPeersPagesWithContext(ctx aws.Context, input *DescribeTransitGatewayConnectPeersInput, fn func(*DescribeTransitGatewayConnectPeersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTransitGatewayConnectPeersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTransitGatewayConnectPeersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayConnectPeersOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opDescribeTransitGatewayConnects = "DescribeTransitGatewayConnects" + +// DescribeTransitGatewayConnectsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTransitGatewayConnects 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 DescribeTransitGatewayConnects for more information on using the DescribeTransitGatewayConnects +// 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 DescribeTransitGatewayConnectsRequest method. +// req, resp := client.DescribeTransitGatewayConnectsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayConnects +func (c *EC2) DescribeTransitGatewayConnectsRequest(input *DescribeTransitGatewayConnectsInput) (req *request.Request, output *DescribeTransitGatewayConnectsOutput) { + op := &request.Operation{ + Name: opDescribeTransitGatewayConnects, + HTTPMethod: "POST", + HTTPPath: "/", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &DescribeTransitGatewayConnectsInput{} + } + + output = &DescribeTransitGatewayConnectsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTransitGatewayConnects API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more Connect attachments. +// +// 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 Elastic Compute Cloud's +// API operation DescribeTransitGatewayConnects for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTransitGatewayConnects +func (c *EC2) DescribeTransitGatewayConnects(input *DescribeTransitGatewayConnectsInput) (*DescribeTransitGatewayConnectsOutput, error) { + req, out := c.DescribeTransitGatewayConnectsRequest(input) + return out, req.Send() +} + +// DescribeTransitGatewayConnectsWithContext is the same as DescribeTransitGatewayConnects with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTransitGatewayConnects 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 *EC2) DescribeTransitGatewayConnectsWithContext(ctx aws.Context, input *DescribeTransitGatewayConnectsInput, opts ...request.Option) (*DescribeTransitGatewayConnectsOutput, error) { + req, out := c.DescribeTransitGatewayConnectsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// DescribeTransitGatewayConnectsPages iterates over the pages of a DescribeTransitGatewayConnects operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See DescribeTransitGatewayConnects 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 DescribeTransitGatewayConnects operation. +// pageNum := 0 +// err := client.DescribeTransitGatewayConnectsPages(params, +// func(page *ec2.DescribeTransitGatewayConnectsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *EC2) DescribeTransitGatewayConnectsPages(input *DescribeTransitGatewayConnectsInput, fn func(*DescribeTransitGatewayConnectsOutput, bool) bool) error { + return c.DescribeTransitGatewayConnectsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// DescribeTransitGatewayConnectsPagesWithContext same as DescribeTransitGatewayConnectsPages 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 *EC2) DescribeTransitGatewayConnectsPagesWithContext(ctx aws.Context, input *DescribeTransitGatewayConnectsInput, fn func(*DescribeTransitGatewayConnectsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *DescribeTransitGatewayConnectsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.DescribeTransitGatewayConnectsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*DescribeTransitGatewayConnectsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + const opDescribeTransitGatewayMulticastDomains = "DescribeTransitGatewayMulticastDomains" // DescribeTransitGatewayMulticastDomainsRequest generates a "aws/request.Request" representing the @@ -24082,6 +26551,80 @@ func (c *EC2) DescribeTransitGatewaysPagesWithContext(ctx aws.Context, input *De return p.Err() } +const opDescribeTrunkInterfaceAssociations = "DescribeTrunkInterfaceAssociations" + +// DescribeTrunkInterfaceAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the DescribeTrunkInterfaceAssociations 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 DescribeTrunkInterfaceAssociations for more information on using the DescribeTrunkInterfaceAssociations +// 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 DescribeTrunkInterfaceAssociationsRequest method. +// req, resp := client.DescribeTrunkInterfaceAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrunkInterfaceAssociations +func (c *EC2) DescribeTrunkInterfaceAssociationsRequest(input *DescribeTrunkInterfaceAssociationsInput) (req *request.Request, output *DescribeTrunkInterfaceAssociationsOutput) { + op := &request.Operation{ + Name: opDescribeTrunkInterfaceAssociations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DescribeTrunkInterfaceAssociationsInput{} + } + + output = &DescribeTrunkInterfaceAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// DescribeTrunkInterfaceAssociations API operation for Amazon Elastic Compute Cloud. +// +// Describes one or more network interface trunk associations. +// +// 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 Elastic Compute Cloud's +// API operation DescribeTrunkInterfaceAssociations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DescribeTrunkInterfaceAssociations +func (c *EC2) DescribeTrunkInterfaceAssociations(input *DescribeTrunkInterfaceAssociationsInput) (*DescribeTrunkInterfaceAssociationsOutput, error) { + req, out := c.DescribeTrunkInterfaceAssociationsRequest(input) + return out, req.Send() +} + +// DescribeTrunkInterfaceAssociationsWithContext is the same as DescribeTrunkInterfaceAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See DescribeTrunkInterfaceAssociations 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 *EC2) DescribeTrunkInterfaceAssociationsWithContext(ctx aws.Context, input *DescribeTrunkInterfaceAssociationsInput, opts ...request.Option) (*DescribeTrunkInterfaceAssociationsOutput, error) { + req, out := c.DescribeTrunkInterfaceAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDescribeVolumeAttribute = "DescribeVolumeAttribute" // DescribeVolumeAttributeRequest generates a "aws/request.Request" representing the @@ -24227,7 +26770,7 @@ func (c *EC2) DescribeVolumeStatusRequest(input *DescribeVolumeStatusInput) (req // status of the volume is ok. If the check fails, the overall status is impaired. // If the status is insufficient-data, then the checks might still be taking // place on your volume at the time. We recommend that you retry the request. -// For more information about volume status, see Monitoring the status of your +// For more information about volume status, see Monitor the status of your // volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-status.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -24529,7 +27072,7 @@ func (c *EC2) DescribeVolumesModificationsRequest(input *DescribeVolumesModifica // You can also use CloudWatch Events to check the status of a modification // to an EBS volume. For information about CloudWatch Events, see the Amazon // CloudWatch Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). -// For more information, see Monitoring volume modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods) +// For more information, see Monitor the progress of volume modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -25476,12 +28019,12 @@ func (c *EC2) DescribeVpcEndpointServicesRequest(input *DescribeVpcEndpointServi // // Describes available services to which you can create a VPC endpoint. // -// When the service provider and the consumer have different accounts multiple +// When the service provider and the consumer have different accounts in multiple // Availability Zones, and the consumer views the VPC endpoint service information, // the response only includes the common Availability Zones. For example, when // the service provider account uses us-east-1a and us-east-1c and the consumer -// uses us-east-1a and us-east-1a and us-east-1b, the response includes the -// VPC endpoint services in the common Availability Zone, us-east-1a. +// uses us-east-1a and us-east-1b, the response includes the VPC endpoint services +// in the common Availability Zone, us-east-1a. // // 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 @@ -26342,10 +28885,10 @@ func (c *EC2) DetachVolumeRequest(input *DetachVolumeInput) (req *request.Reques // while the instance is running. To detach the root volume, stop the instance // first. // -// When a volume with an AWS Marketplace product code is detached from an instance, +// When a volume with an Marketplace product code is detached from an instance, // the product code is no longer associated with the instance. // -// For more information, see Detaching an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) +// For more information, see Detach an Amazon EBS volume (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-detaching-volume.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -26616,6 +29159,161 @@ func (c *EC2) DisableFastSnapshotRestoresWithContext(ctx aws.Context, input *Dis return out, req.Send() } +const opDisableImageDeprecation = "DisableImageDeprecation" + +// DisableImageDeprecationRequest generates a "aws/request.Request" representing the +// client's request for the DisableImageDeprecation 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 DisableImageDeprecation for more information on using the DisableImageDeprecation +// 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 DisableImageDeprecationRequest method. +// req, resp := client.DisableImageDeprecationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableImageDeprecation +func (c *EC2) DisableImageDeprecationRequest(input *DisableImageDeprecationInput) (req *request.Request, output *DisableImageDeprecationOutput) { + op := &request.Operation{ + Name: opDisableImageDeprecation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableImageDeprecationInput{} + } + + output = &DisableImageDeprecationOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisableImageDeprecation API operation for Amazon Elastic Compute Cloud. +// +// Cancels the deprecation of the specified AMI. +// +// For more information, see Deprecate an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DisableImageDeprecation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableImageDeprecation +func (c *EC2) DisableImageDeprecation(input *DisableImageDeprecationInput) (*DisableImageDeprecationOutput, error) { + req, out := c.DisableImageDeprecationRequest(input) + return out, req.Send() +} + +// DisableImageDeprecationWithContext is the same as DisableImageDeprecation with the addition of +// the ability to pass a context and additional request options. +// +// See DisableImageDeprecation 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 *EC2) DisableImageDeprecationWithContext(ctx aws.Context, input *DisableImageDeprecationInput, opts ...request.Option) (*DisableImageDeprecationOutput, error) { + req, out := c.DisableImageDeprecationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisableSerialConsoleAccess = "DisableSerialConsoleAccess" + +// DisableSerialConsoleAccessRequest generates a "aws/request.Request" representing the +// client's request for the DisableSerialConsoleAccess 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 DisableSerialConsoleAccess for more information on using the DisableSerialConsoleAccess +// 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 DisableSerialConsoleAccessRequest method. +// req, resp := client.DisableSerialConsoleAccessRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableSerialConsoleAccess +func (c *EC2) DisableSerialConsoleAccessRequest(input *DisableSerialConsoleAccessInput) (req *request.Request, output *DisableSerialConsoleAccessOutput) { + op := &request.Operation{ + Name: opDisableSerialConsoleAccess, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisableSerialConsoleAccessInput{} + } + + output = &DisableSerialConsoleAccessOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisableSerialConsoleAccess API operation for Amazon Elastic Compute Cloud. +// +// Disables access to the EC2 serial console of all instances for your account. +// By default, access to the EC2 serial console is disabled for your account. +// For more information, see Manage account access to the EC2 serial console +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DisableSerialConsoleAccess for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisableSerialConsoleAccess +func (c *EC2) DisableSerialConsoleAccess(input *DisableSerialConsoleAccessInput) (*DisableSerialConsoleAccessOutput, error) { + req, out := c.DisableSerialConsoleAccessRequest(input) + return out, req.Send() +} + +// DisableSerialConsoleAccessWithContext is the same as DisableSerialConsoleAccess with the addition of +// the ability to pass a context and additional request options. +// +// See DisableSerialConsoleAccess 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 *EC2) DisableSerialConsoleAccessWithContext(ctx aws.Context, input *DisableSerialConsoleAccessInput, opts ...request.Option) (*DisableSerialConsoleAccessOutput, error) { + req, out := c.DisableSerialConsoleAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisableTransitGatewayRouteTablePropagation = "DisableTransitGatewayRouteTablePropagation" // DisableTransitGatewayRouteTablePropagationRequest generates a "aws/request.Request" representing the @@ -27133,13 +29831,12 @@ func (c *EC2) DisassociateEnclaveCertificateIamRoleRequest(input *DisassociateEn // DisassociateEnclaveCertificateIamRole API operation for Amazon Elastic Compute Cloud. // -// Disassociates an IAM role from an AWS Certificate Manager (ACM) certificate. +// Disassociates an IAM role from an Certificate Manager (ACM) certificate. // Disassociating an IAM role from an ACM certificate removes the Amazon S3 // object that contains the certificate, certificate chain, and encrypted private // key from the Amazon S3 bucket. It also revokes the IAM role's permission -// to use the AWS Key Management Service (KMS) customer master key (CMK) used -// to encrypt the private key. This effectively revokes the role's permission -// to use the certificate. +// to use the KMS key used to encrypt the private key. This effectively revokes +// the role's permission to use the certificate. // // 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 @@ -27245,6 +29942,83 @@ func (c *EC2) DisassociateIamInstanceProfileWithContext(ctx aws.Context, input * return out, req.Send() } +const opDisassociateInstanceEventWindow = "DisassociateInstanceEventWindow" + +// DisassociateInstanceEventWindowRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateInstanceEventWindow 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 DisassociateInstanceEventWindow for more information on using the DisassociateInstanceEventWindow +// 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 DisassociateInstanceEventWindowRequest method. +// req, resp := client.DisassociateInstanceEventWindowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateInstanceEventWindow +func (c *EC2) DisassociateInstanceEventWindowRequest(input *DisassociateInstanceEventWindowInput) (req *request.Request, output *DisassociateInstanceEventWindowOutput) { + op := &request.Operation{ + Name: opDisassociateInstanceEventWindow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateInstanceEventWindowInput{} + } + + output = &DisassociateInstanceEventWindowOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateInstanceEventWindow API operation for Amazon Elastic Compute Cloud. +// +// Disassociates one or more targets from an event window. +// +// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/monitoring-instances-status-check_sched.html#event-windows) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation DisassociateInstanceEventWindow for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateInstanceEventWindow +func (c *EC2) DisassociateInstanceEventWindow(input *DisassociateInstanceEventWindowInput) (*DisassociateInstanceEventWindowOutput, error) { + req, out := c.DisassociateInstanceEventWindowRequest(input) + return out, req.Send() +} + +// DisassociateInstanceEventWindowWithContext is the same as DisassociateInstanceEventWindow with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateInstanceEventWindow 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 *EC2) DisassociateInstanceEventWindowWithContext(ctx aws.Context, input *DisassociateInstanceEventWindowInput, opts ...request.Option) (*DisassociateInstanceEventWindowOutput, error) { + req, out := c.DisassociateInstanceEventWindowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateRouteTable = "DisassociateRouteTable" // DisassociateRouteTableRequest generates a "aws/request.Request" representing the @@ -27549,6 +30323,81 @@ func (c *EC2) DisassociateTransitGatewayRouteTableWithContext(ctx aws.Context, i return out, req.Send() } +const opDisassociateTrunkInterface = "DisassociateTrunkInterface" + +// DisassociateTrunkInterfaceRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateTrunkInterface 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 DisassociateTrunkInterface for more information on using the DisassociateTrunkInterface +// 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 DisassociateTrunkInterfaceRequest method. +// req, resp := client.DisassociateTrunkInterfaceRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTrunkInterface +func (c *EC2) DisassociateTrunkInterfaceRequest(input *DisassociateTrunkInterfaceInput) (req *request.Request, output *DisassociateTrunkInterfaceOutput) { + op := &request.Operation{ + Name: opDisassociateTrunkInterface, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &DisassociateTrunkInterfaceInput{} + } + + output = &DisassociateTrunkInterfaceOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateTrunkInterface API operation for Amazon Elastic Compute Cloud. +// +// Removes an association between a branch network interface with a trunk network +// interface. +// +// 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 Elastic Compute Cloud's +// API operation DisassociateTrunkInterface for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/DisassociateTrunkInterface +func (c *EC2) DisassociateTrunkInterface(input *DisassociateTrunkInterfaceInput) (*DisassociateTrunkInterfaceOutput, error) { + req, out := c.DisassociateTrunkInterfaceRequest(input) + return out, req.Send() +} + +// DisassociateTrunkInterfaceWithContext is the same as DisassociateTrunkInterface with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateTrunkInterface 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 *EC2) DisassociateTrunkInterfaceWithContext(ctx aws.Context, input *DisassociateTrunkInterfaceInput, opts ...request.Option) (*DisassociateTrunkInterfaceOutput, error) { + req, out := c.DisassociateTrunkInterfaceRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opDisassociateVpcCidrBlock = "DisassociateVpcCidrBlock" // DisassociateVpcCidrBlockRequest generates a "aws/request.Request" representing the @@ -27676,12 +30525,12 @@ func (c *EC2) EnableEbsEncryptionByDefaultRequest(input *EnableEbsEncryptionByDe // Enables EBS encryption by default for your account in the current Region. // // After you enable encryption by default, the EBS volumes that you create are -// are always encrypted, either using the default CMK or the CMK that you specified -// when you created each volume. For more information, see Amazon EBS encryption -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// always encrypted, either using the default KMS key or the KMS key that you +// specified when you created each volume. For more information, see Amazon +// EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. // -// You can specify the default CMK for encryption by default using ModifyEbsDefaultKmsKeyId +// You can specify the default KMS key for encryption by default using ModifyEbsDefaultKmsKeyId // or ResetEbsDefaultKmsKeyId. // // Enabling encryption by default has no effect on the encryption status of @@ -27801,6 +30650,161 @@ func (c *EC2) EnableFastSnapshotRestoresWithContext(ctx aws.Context, input *Enab return out, req.Send() } +const opEnableImageDeprecation = "EnableImageDeprecation" + +// EnableImageDeprecationRequest generates a "aws/request.Request" representing the +// client's request for the EnableImageDeprecation 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 EnableImageDeprecation for more information on using the EnableImageDeprecation +// 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 EnableImageDeprecationRequest method. +// req, resp := client.EnableImageDeprecationRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableImageDeprecation +func (c *EC2) EnableImageDeprecationRequest(input *EnableImageDeprecationInput) (req *request.Request, output *EnableImageDeprecationOutput) { + op := &request.Operation{ + Name: opEnableImageDeprecation, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableImageDeprecationInput{} + } + + output = &EnableImageDeprecationOutput{} + req = c.newRequest(op, input, output) + return +} + +// EnableImageDeprecation API operation for Amazon Elastic Compute Cloud. +// +// Enables deprecation of the specified AMI at the specified date and time. +// +// For more information, see Deprecate an AMI (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-deprecate.html) +// in the Amazon Elastic Compute Cloud 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation EnableImageDeprecation for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableImageDeprecation +func (c *EC2) EnableImageDeprecation(input *EnableImageDeprecationInput) (*EnableImageDeprecationOutput, error) { + req, out := c.EnableImageDeprecationRequest(input) + return out, req.Send() +} + +// EnableImageDeprecationWithContext is the same as EnableImageDeprecation with the addition of +// the ability to pass a context and additional request options. +// +// See EnableImageDeprecation 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 *EC2) EnableImageDeprecationWithContext(ctx aws.Context, input *EnableImageDeprecationInput, opts ...request.Option) (*EnableImageDeprecationOutput, error) { + req, out := c.EnableImageDeprecationRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opEnableSerialConsoleAccess = "EnableSerialConsoleAccess" + +// EnableSerialConsoleAccessRequest generates a "aws/request.Request" representing the +// client's request for the EnableSerialConsoleAccess 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 EnableSerialConsoleAccess for more information on using the EnableSerialConsoleAccess +// 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 EnableSerialConsoleAccessRequest method. +// req, resp := client.EnableSerialConsoleAccessRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableSerialConsoleAccess +func (c *EC2) EnableSerialConsoleAccessRequest(input *EnableSerialConsoleAccessInput) (req *request.Request, output *EnableSerialConsoleAccessOutput) { + op := &request.Operation{ + Name: opEnableSerialConsoleAccess, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &EnableSerialConsoleAccessInput{} + } + + output = &EnableSerialConsoleAccessOutput{} + req = c.newRequest(op, input, output) + return +} + +// EnableSerialConsoleAccess API operation for Amazon Elastic Compute Cloud. +// +// Enables access to the EC2 serial console of all instances for your account. +// By default, access to the EC2 serial console is disabled for your account. +// For more information, see Manage account access to the EC2 serial console +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation EnableSerialConsoleAccess for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EnableSerialConsoleAccess +func (c *EC2) EnableSerialConsoleAccess(input *EnableSerialConsoleAccessInput) (*EnableSerialConsoleAccessOutput, error) { + req, out := c.EnableSerialConsoleAccessRequest(input) + return out, req.Send() +} + +// EnableSerialConsoleAccessWithContext is the same as EnableSerialConsoleAccess with the addition of +// the ability to pass a context and additional request options. +// +// See EnableSerialConsoleAccess 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 *EC2) EnableSerialConsoleAccessWithContext(ctx aws.Context, input *EnableSerialConsoleAccessInput, opts ...request.Option) (*EnableSerialConsoleAccessOutput, error) { + req, out := c.EnableSerialConsoleAccessRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opEnableTransitGatewayRouteTablePropagation = "EnableTransitGatewayRouteTablePropagation" // EnableTransitGatewayRouteTablePropagationRequest generates a "aws/request.Request" representing the @@ -28387,7 +31391,7 @@ func (c *EC2) ExportImageRequest(input *ExportImageInput) (req *request.Request, // ExportImage API operation for Amazon Elastic Compute Cloud. // // Exports an Amazon Machine Image (AMI) to a VM file. For more information, -// see Exporting a VM Directory from an Amazon Machine Image (AMI) (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html) +// see Exporting a VM directly from an Amazon Machine Image (AMI) (https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport_image.html) // in the VM Import/Export User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -28542,11 +31546,10 @@ func (c *EC2) GetAssociatedEnclaveCertificateIamRolesRequest(input *GetAssociate // GetAssociatedEnclaveCertificateIamRoles API operation for Amazon Elastic Compute Cloud. // -// Returns the IAM roles that are associated with the specified AWS Certificate -// Manager (ACM) certificate. It also returns the name of the Amazon S3 bucket -// and the Amazon S3 object key where the certificate, certificate chain, and -// encrypted private key bundle are stored, and the ARN of the AWS Key Management -// Service (KMS) customer master key (CMK) that's used to encrypt the private +// Returns the IAM roles that are associated with the specified ACM (ACM) certificate. +// It also returns the name of the Amazon S3 bucket and the Amazon S3 object +// key where the certificate, certificate chain, and encrypted private key bundle +// are stored, and the ARN of the KMS key that's used to encrypt the private // key. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -28756,9 +31759,9 @@ func (c *EC2) GetCapacityReservationUsageRequest(input *GetCapacityReservationUs // // Gets usage information about a Capacity Reservation. If the Capacity Reservation // is shared, it shows usage information for the Capacity Reservation owner -// and each AWS account that is currently using the shared capacity. If the -// Capacity Reservation is not shared, it shows only the Capacity Reservation -// owner's usage. +// and each account that is currently using the shared capacity. If the Capacity +// Reservation is not shared, it shows only the Capacity Reservation owner's +// usage. // // 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 @@ -28921,8 +31924,8 @@ func (c *EC2) GetConsoleOutputRequest(input *GetConsoleOutputInput) (req *reques // during the instance lifecycle. This option is supported on instance types // that use the Nitro hypervisor. // -// For more information, see Instance Console Output (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output) -// in the Amazon Elastic Compute Cloud User Guide. +// For more information, see Instance console output (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html#instance-console-console-output) +// in the Amazon EC2 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 @@ -29076,7 +32079,7 @@ func (c *EC2) GetDefaultCreditSpecificationRequest(input *GetDefaultCreditSpecif // instance family. // // For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -29150,9 +32153,9 @@ func (c *EC2) GetEbsDefaultKmsKeyIdRequest(input *GetEbsDefaultKmsKeyIdInput) (r // GetEbsDefaultKmsKeyId API operation for Amazon Elastic Compute Cloud. // -// Describes the default customer master key (CMK) for EBS encryption by default -// for your account in this Region. You can change the default CMK for encryption -// by default using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId. +// Describes the default KMS key for EBS encryption by default for your account +// in this Region. You can change the default KMS key for encryption by default +// using ModifyEbsDefaultKmsKeyId or ResetEbsDefaultKmsKeyId. // // For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -29263,6 +32266,93 @@ func (c *EC2) GetEbsEncryptionByDefaultWithContext(ctx aws.Context, input *GetEb return out, req.Send() } +const opGetFlowLogsIntegrationTemplate = "GetFlowLogsIntegrationTemplate" + +// GetFlowLogsIntegrationTemplateRequest generates a "aws/request.Request" representing the +// client's request for the GetFlowLogsIntegrationTemplate 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 GetFlowLogsIntegrationTemplate for more information on using the GetFlowLogsIntegrationTemplate +// 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 GetFlowLogsIntegrationTemplateRequest method. +// req, resp := client.GetFlowLogsIntegrationTemplateRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetFlowLogsIntegrationTemplate +func (c *EC2) GetFlowLogsIntegrationTemplateRequest(input *GetFlowLogsIntegrationTemplateInput) (req *request.Request, output *GetFlowLogsIntegrationTemplateOutput) { + op := &request.Operation{ + Name: opGetFlowLogsIntegrationTemplate, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetFlowLogsIntegrationTemplateInput{} + } + + output = &GetFlowLogsIntegrationTemplateOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetFlowLogsIntegrationTemplate API operation for Amazon Elastic Compute Cloud. +// +// Generates a CloudFormation template that streamlines and automates the integration +// of VPC flow logs with Amazon Athena. This make it easier for you to query +// and gain insights from VPC flow logs data. Based on the information that +// you provide, we configure resources in the template to do the following: +// +// * Create a table in Athena that maps fields to a custom log format +// +// * Create a Lambda function that updates the table with new partitions +// on a daily, weekly, or monthly basis +// +// * Create a table partitioned between two timestamps in the past +// +// * Create a set of named queries in Athena that you can use to get started +// quickly +// +// 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 Elastic Compute Cloud's +// API operation GetFlowLogsIntegrationTemplate for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetFlowLogsIntegrationTemplate +func (c *EC2) GetFlowLogsIntegrationTemplate(input *GetFlowLogsIntegrationTemplateInput) (*GetFlowLogsIntegrationTemplateOutput, error) { + req, out := c.GetFlowLogsIntegrationTemplateRequest(input) + return out, req.Send() +} + +// GetFlowLogsIntegrationTemplateWithContext is the same as GetFlowLogsIntegrationTemplate with the addition of +// the ability to pass a context and additional request options. +// +// See GetFlowLogsIntegrationTemplate 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 *EC2) GetFlowLogsIntegrationTemplateWithContext(ctx aws.Context, input *GetFlowLogsIntegrationTemplateInput, opts ...request.Option) (*GetFlowLogsIntegrationTemplateOutput, error) { + req, out := c.GetFlowLogsIntegrationTemplateRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetGroupsForCapacityReservation = "GetGroupsForCapacityReservation" // GetGroupsForCapacityReservationRequest generates a "aws/request.Request" representing the @@ -29870,7 +32960,7 @@ func (c *EC2) GetPasswordDataRequest(input *GetPasswordDataInput) (req *request. // scripts (Windows Server 2016 and later). This usually only happens the first // time an instance is launched. For more information, see EC2Config (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/UsingConfig_WinAMI.html) // and EC2Launch (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2launch.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // For the EC2Config service, the password is not generated for rebundled AMIs // unless Ec2SetPassword is enabled before bundling. @@ -29988,6 +33078,84 @@ func (c *EC2) GetReservedInstancesExchangeQuoteWithContext(ctx aws.Context, inpu return out, req.Send() } +const opGetSerialConsoleAccessStatus = "GetSerialConsoleAccessStatus" + +// GetSerialConsoleAccessStatusRequest generates a "aws/request.Request" representing the +// client's request for the GetSerialConsoleAccessStatus 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 GetSerialConsoleAccessStatus for more information on using the GetSerialConsoleAccessStatus +// 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 GetSerialConsoleAccessStatusRequest method. +// req, resp := client.GetSerialConsoleAccessStatusRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetSerialConsoleAccessStatus +func (c *EC2) GetSerialConsoleAccessStatusRequest(input *GetSerialConsoleAccessStatusInput) (req *request.Request, output *GetSerialConsoleAccessStatusOutput) { + op := &request.Operation{ + Name: opGetSerialConsoleAccessStatus, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetSerialConsoleAccessStatusInput{} + } + + output = &GetSerialConsoleAccessStatusOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetSerialConsoleAccessStatus API operation for Amazon Elastic Compute Cloud. +// +// Retrieves the access status of your account to the EC2 serial console of +// all instances. By default, access to the EC2 serial console is disabled for +// your account. For more information, see Manage account access to the EC2 +// serial console (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configure-access-to-serial-console.html#serial-console-account-access) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation GetSerialConsoleAccessStatus for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/GetSerialConsoleAccessStatus +func (c *EC2) GetSerialConsoleAccessStatus(input *GetSerialConsoleAccessStatusInput) (*GetSerialConsoleAccessStatusOutput, error) { + req, out := c.GetSerialConsoleAccessStatusRequest(input) + return out, req.Send() +} + +// GetSerialConsoleAccessStatusWithContext is the same as GetSerialConsoleAccessStatus with the addition of +// the ability to pass a context and additional request options. +// +// See GetSerialConsoleAccessStatus 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 *EC2) GetSerialConsoleAccessStatusWithContext(ctx aws.Context, input *GetSerialConsoleAccessStatusInput, opts ...request.Option) (*GetSerialConsoleAccessStatusOutput, error) { + req, out := c.GetSerialConsoleAccessStatusRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetTransitGatewayAttachmentPropagations = "GetTransitGatewayAttachmentPropagations" // GetTransitGatewayAttachmentPropagationsRequest generates a "aws/request.Request" representing the @@ -30776,8 +33944,10 @@ func (c *EC2) ImportImageRequest(input *ImportImageInput) (req *request.Request, // ImportImage API operation for Amazon Elastic Compute Cloud. // // Import single or multi-volume disk images or EBS snapshots into an Amazon -// Machine Image (AMI). For more information, see Importing a VM as an Image -// Using VM Import/Export (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html) +// Machine Image (AMI). +// +// For more information, see Importing a VM as an image using VM Import/Export +// (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-image-import.html) // in the VM Import/Export User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -30853,9 +34023,14 @@ func (c *EC2) ImportInstanceRequest(input *ImportInstanceInput) (req *request.Re // ImportInstance API operation for Amazon Elastic Compute Cloud. // // Creates an import instance task using metadata from the specified disk image. -// ImportInstance only supports single-volume VMs. To import multi-volume VMs, -// use ImportImage. For more information, see Importing a Virtual Machine Using -// the Amazon EC2 CLI (https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/ec2-cli-vmimport-export.html). +// +// This API action supports only single-volume VMs. To import multi-volume VMs, +// use ImportImage instead. +// +// This API action is not supported by the AWS Command Line Interface (AWS CLI). +// For information about using the Amazon EC2 CLI, which is deprecated, see +// Importing a VM to Amazon EC2 (https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#UsingVirtualMachinesinAmazonEC2) +// in the Amazon EC2 CLI Reference PDF file. // // For information about the import manifest referenced by this API action, // see VM Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). @@ -30933,10 +34108,11 @@ func (c *EC2) ImportKeyPairRequest(input *ImportKeyPairInput) (req *request.Requ // ImportKeyPair API operation for Amazon Elastic Compute Cloud. // // Imports the public key from an RSA key pair that you created with a third-party -// tool. Compare this with CreateKeyPair, in which AWS creates the key pair -// and gives the keys to you (AWS keeps a copy of the public key). With ImportKeyPair, -// you create the key pair and give AWS just the public key. The private key -// is never transferred between you and AWS. +// tool. Compare this with CreateKeyPair, in which Amazon Web Services creates +// the key pair and gives the keys to you (Amazon Web Services keeps a copy +// of the public key). With ImportKeyPair, you create the key pair and give +// Amazon Web Services just the public key. The private key is never transferred +// between you and Amazon Web Services. // // For more information about key pairs, see Key Pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -31015,6 +34191,10 @@ func (c *EC2) ImportSnapshotRequest(input *ImportSnapshotInput) (req *request.Re // // Imports a disk into an EBS snapshot. // +// For more information, see Importing a disk as a snapshot using VM Import/Export +// (https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html) +// in the VM Import/Export 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 // the error. @@ -31087,8 +34267,16 @@ func (c *EC2) ImportVolumeRequest(input *ImportVolumeInput) (req *request.Reques // ImportVolume API operation for Amazon Elastic Compute Cloud. // -// Creates an import volume task using metadata from the specified disk image.For -// more information, see Importing Disks to Amazon EBS (https://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/importing-your-volumes-into-amazon-ebs.html). +// Creates an import volume task using metadata from the specified disk image. +// +// This API action supports only single-volume VMs. To import multi-volume VMs, +// use ImportImage instead. To import a disk to a snapshot, use ImportSnapshot +// instead. +// +// This API action is not supported by the AWS Command Line Interface (AWS CLI). +// For information about using the Amazon EC2 CLI, which is deprecated, see +// Importing Disks to Amazon EBS (https://awsdocs.s3.amazonaws.com/EC2/ec2-clt.pdf#importing-your-volumes-into-amazon-ebs) +// in the Amazon EC2 CLI Reference PDF file. // // For information about the import manifest referenced by this API action, // see VM Import Manifest (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/manifest.html). @@ -31121,6 +34309,81 @@ func (c *EC2) ImportVolumeWithContext(ctx aws.Context, input *ImportVolumeInput, return out, req.Send() } +const opModifyAddressAttribute = "ModifyAddressAttribute" + +// ModifyAddressAttributeRequest generates a "aws/request.Request" representing the +// client's request for the ModifyAddressAttribute 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 ModifyAddressAttribute for more information on using the ModifyAddressAttribute +// 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 ModifyAddressAttributeRequest method. +// req, resp := client.ModifyAddressAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyAddressAttribute +func (c *EC2) ModifyAddressAttributeRequest(input *ModifyAddressAttributeInput) (req *request.Request, output *ModifyAddressAttributeOutput) { + op := &request.Operation{ + Name: opModifyAddressAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyAddressAttributeInput{} + } + + output = &ModifyAddressAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyAddressAttribute API operation for Amazon Elastic Compute Cloud. +// +// Modifies an attribute of the specified Elastic IP address. For requirements, +// see Using reverse DNS for email applications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS). +// +// 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 Elastic Compute Cloud's +// API operation ModifyAddressAttribute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyAddressAttribute +func (c *EC2) ModifyAddressAttribute(input *ModifyAddressAttributeInput) (*ModifyAddressAttributeOutput, error) { + req, out := c.ModifyAddressAttributeRequest(input) + return out, req.Send() +} + +// ModifyAddressAttributeWithContext is the same as ModifyAddressAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyAddressAttribute 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 *EC2) ModifyAddressAttributeWithContext(ctx aws.Context, input *ModifyAddressAttributeInput, opts ...request.Option) (*ModifyAddressAttributeOutput, error) { + req, out := c.ModifyAddressAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyAvailabilityZoneGroup = "ModifyAvailabilityZoneGroup" // ModifyAvailabilityZoneGroupRequest generates a "aws/request.Request" representing the @@ -31398,20 +34661,20 @@ func (c *EC2) ModifyDefaultCreditSpecificationRequest(input *ModifyDefaultCredit // ModifyDefaultCreditSpecification API operation for Amazon Elastic Compute Cloud. // // Modifies the default credit option for CPU usage of burstable performance -// instances. The default credit option is set at the account level per AWS -// Region, and is specified per instance family. All new burstable performance -// instances in the account launch using the default credit option. +// instances. The default credit option is set at the account level per Region, +// and is specified per instance family. All new burstable performance instances +// in the account launch using the default credit option. // // ModifyDefaultCreditSpecification is an asynchronous operation, which works -// at an AWS Region level and modifies the credit option for each Availability -// Zone. All zones in a Region are updated within five minutes. But if instances -// are launched during this operation, they might not get the new credit option +// at an Region level and modifies the credit option for each Availability Zone. +// All zones in a Region are updated within five minutes. But if instances are +// launched during this operation, they might not get the new credit option // until the zone is updated. To verify whether the update has occurred, you // can call GetDefaultCreditSpecification and check DefaultCreditSpecification // for updates. // // For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -31485,17 +34748,18 @@ func (c *EC2) ModifyEbsDefaultKmsKeyIdRequest(input *ModifyEbsDefaultKmsKeyIdInp // ModifyEbsDefaultKmsKeyId API operation for Amazon Elastic Compute Cloud. // -// Changes the default customer master key (CMK) for EBS encryption by default -// for your account in this Region. +// Changes the default KMS key for EBS encryption by default for your account +// in this Region. // -// AWS creates a unique AWS managed CMK in each Region for use with encryption -// by default. If you change the default CMK to a symmetric customer managed -// CMK, it is used instead of the AWS managed CMK. To reset the default CMK -// to the AWS managed CMK for EBS, use ResetEbsDefaultKmsKeyId. Amazon EBS does -// not support asymmetric CMKs. +// Amazon Web Services creates a unique Amazon Web Services managed KMS key +// in each Region for use with encryption by default. If you change the default +// KMS key to a symmetric customer managed KMS key, it is used instead of the +// Amazon Web Services managed KMS key. To reset the default KMS key to the +// Amazon Web Services managed KMS key for EBS, use ResetEbsDefaultKmsKeyId. +// Amazon EBS does not support asymmetric KMS keys. // -// If you delete or disable the customer managed CMK that you specified for -// use with encryption by default, your instances will fail to launch. +// If you delete or disable the customer managed KMS key that you specified +// for use with encryption by default, your instances will fail to launch. // // For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. @@ -32123,7 +35387,7 @@ func (c *EC2) ModifyInstanceAttributeRequest(input *ModifyInstanceAttributeInput // // To modify some attributes, the instance must be stopped. For more information, // see Modifying attributes of a stopped instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_ChangingAttributesWhileInstanceStopped.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -32278,7 +35542,7 @@ func (c *EC2) ModifyInstanceCreditSpecificationRequest(input *ModifyInstanceCred // performance instance. The credit options are standard and unlimited. // // For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -32382,6 +35646,92 @@ func (c *EC2) ModifyInstanceEventStartTimeWithContext(ctx aws.Context, input *Mo return out, req.Send() } +const opModifyInstanceEventWindow = "ModifyInstanceEventWindow" + +// ModifyInstanceEventWindowRequest generates a "aws/request.Request" representing the +// client's request for the ModifyInstanceEventWindow 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 ModifyInstanceEventWindow for more information on using the ModifyInstanceEventWindow +// 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 ModifyInstanceEventWindowRequest method. +// req, resp := client.ModifyInstanceEventWindowRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceEventWindow +func (c *EC2) ModifyInstanceEventWindowRequest(input *ModifyInstanceEventWindowInput) (req *request.Request, output *ModifyInstanceEventWindowOutput) { + op := &request.Operation{ + Name: opModifyInstanceEventWindow, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifyInstanceEventWindowInput{} + } + + output = &ModifyInstanceEventWindowOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifyInstanceEventWindow API operation for Amazon Elastic Compute Cloud. +// +// Modifies the specified event window. +// +// You can define either a set of time ranges or a cron expression when modifying +// the event window, but not both. +// +// To modify the targets associated with the event window, use the AssociateInstanceEventWindow +// and DisassociateInstanceEventWindow API. +// +// If Amazon Web Services has already scheduled an event, modifying an event +// window won't change the time of the scheduled event. +// +// For more information, see Define event windows for scheduled events (https://docs.aws.amazon.com/monitoring-instances-status-check_sched.html#event-windows) +// in the Amazon EC2 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 +// the error. +// +// See the AWS API reference guide for Amazon Elastic Compute Cloud's +// API operation ModifyInstanceEventWindow for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifyInstanceEventWindow +func (c *EC2) ModifyInstanceEventWindow(input *ModifyInstanceEventWindowInput) (*ModifyInstanceEventWindowOutput, error) { + req, out := c.ModifyInstanceEventWindowRequest(input) + return out, req.Send() +} + +// ModifyInstanceEventWindowWithContext is the same as ModifyInstanceEventWindow with the addition of +// the ability to pass a context and additional request options. +// +// See ModifyInstanceEventWindow 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 *EC2) ModifyInstanceEventWindowWithContext(ctx aws.Context, input *ModifyInstanceEventWindowInput, opts ...request.Option) (*ModifyInstanceEventWindowOutput, error) { + req, out := c.ModifyInstanceEventWindowRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifyInstanceMetadataOptions = "ModifyInstanceMetadataOptions" // ModifyInstanceMetadataOptionsRequest generates a "aws/request.Request" representing the @@ -32432,7 +35782,8 @@ func (c *EC2) ModifyInstanceMetadataOptionsRequest(input *ModifyInstanceMetadata // the API responds with a state of “pending”. After the parameter modifications // are successfully applied to the instance, the state of the modifications // changes from “pending” to “applied” in subsequent describe-instances -// API calls. For more information, see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html). +// API calls. For more information, see Instance metadata and user data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) +// in the Amazon EC2 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 @@ -32840,7 +36191,7 @@ func (c *EC2) ModifyReservedInstancesRequest(input *ModifyReservedInstancesInput // network platform, and instance type. // // For more information, see Modifying Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-modifying.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -32870,6 +36221,80 @@ func (c *EC2) ModifyReservedInstancesWithContext(ctx aws.Context, input *ModifyR return out, req.Send() } +const opModifySecurityGroupRules = "ModifySecurityGroupRules" + +// ModifySecurityGroupRulesRequest generates a "aws/request.Request" representing the +// client's request for the ModifySecurityGroupRules 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 ModifySecurityGroupRules for more information on using the ModifySecurityGroupRules +// 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 ModifySecurityGroupRulesRequest method. +// req, resp := client.ModifySecurityGroupRulesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySecurityGroupRules +func (c *EC2) ModifySecurityGroupRulesRequest(input *ModifySecurityGroupRulesInput) (req *request.Request, output *ModifySecurityGroupRulesOutput) { + op := &request.Operation{ + Name: opModifySecurityGroupRules, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ModifySecurityGroupRulesInput{} + } + + output = &ModifySecurityGroupRulesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ModifySecurityGroupRules API operation for Amazon Elastic Compute Cloud. +// +// Modifies the rules of a security group. +// +// 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 Elastic Compute Cloud's +// API operation ModifySecurityGroupRules for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ModifySecurityGroupRules +func (c *EC2) ModifySecurityGroupRules(input *ModifySecurityGroupRulesInput) (*ModifySecurityGroupRulesOutput, error) { + req, out := c.ModifySecurityGroupRulesRequest(input) + return out, req.Send() +} + +// ModifySecurityGroupRulesWithContext is the same as ModifySecurityGroupRules with the addition of +// the ability to pass a context and additional request options. +// +// See ModifySecurityGroupRules 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 *EC2) ModifySecurityGroupRulesWithContext(ctx aws.Context, input *ModifySecurityGroupRulesInput, opts ...request.Option) (*ModifySecurityGroupRulesOutput, error) { + req, out := c.ModifySecurityGroupRulesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opModifySnapshotAttribute = "ModifySnapshotAttribute" // ModifySnapshotAttributeRequest generates a "aws/request.Request" representing the @@ -32916,16 +36341,16 @@ func (c *EC2) ModifySnapshotAttributeRequest(input *ModifySnapshotAttributeInput // ModifySnapshotAttribute API operation for Amazon Elastic Compute Cloud. // // Adds or removes permission settings for the specified snapshot. You may add -// or remove specified AWS account IDs from a snapshot's list of create volume -// permissions, but you cannot do both in a single operation. If you need to -// both add and remove account IDs for a snapshot, you must use multiple operations. -// You can make up to 500 modifications to a snapshot in a single operation. +// or remove specified account IDs from a snapshot's list of create volume permissions, +// but you cannot do both in a single operation. If you need to both add and +// remove account IDs for a snapshot, you must use multiple operations. You +// can make up to 500 modifications to a snapshot in a single operation. // -// Encrypted snapshots and snapshots with AWS Marketplace product codes cannot -// be made public. Snapshots encrypted with your default CMK cannot be shared +// Encrypted snapshots and snapshots with Marketplace product codes cannot be +// made public. Snapshots encrypted with your default KMS key cannot be shared // with other accounts. // -// For more information about modifying snapshot permissions, see Sharing snapshots +// For more information about modifying snapshot permissions, see Share a snapshot // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -33643,34 +37068,28 @@ func (c *EC2) ModifyVolumeRequest(input *ModifyVolumeInput) (req *request.Reques // size, volume type, and IOPS capacity. If your EBS volume is attached to a // current-generation EC2 instance type, you might be able to apply these changes // without stopping the instance or detaching the volume from it. For more information -// about modifying an EBS volume running Linux, see Modifying the size, IOPS, -// or type of an EBS volume on Linux (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html). -// For more information about modifying an EBS volume running Windows, see Modifying -// the size, IOPS, or type of an EBS volume on Windows (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html). +// about modifying EBS volumes, see Amazon EBS Elastic Volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html) +// (Linux instances) or Amazon EBS Elastic Volumes (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-modify-volume.html) +// (Windows instances). // // When you complete a resize operation on your volume, you need to extend the // volume's file-system size to take advantage of the new storage capacity. -// For information about extending a Linux file system, see Extending a Linux -// file system (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux). -// For information about extending a Windows file system, see Extending a Windows -// file system (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows). +// For more information, see Extend a Linux file system (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux) +// or Extend a Windows file system (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-expand-volume.html#recognize-expanded-volume-windows). // // You can use CloudWatch Events to check the status of a modification to an // EBS volume. For information about CloudWatch Events, see the Amazon CloudWatch // Events User Guide (https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/). // You can also track the status of a modification using DescribeVolumesModifications. -// For information about tracking status changes using either method, see Monitoring -// volume modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-expand-volume.html#monitoring_mods). +// For information about tracking status changes using either method, see Monitor +// the progress of volume modifications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring-volume-modifications.html). // // With previous-generation instance types, resizing an EBS volume might require // detaching and reattaching the volume or stopping and restarting the instance. -// For more information, see Amazon EBS Elastic Volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modify-volume.html) -// (Linux) or Amazon EBS Elastic Volumes (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-modify-volume.html) -// (Windows). // -// If you reach the maximum volume modification rate per volume limit, you will -// need to wait at least six hours before applying further modifications to -// the affected EBS volume. +// If you reach the maximum volume modification rate per volume limit, you must +// wait at least six hours before applying further modifications to the affected +// EBS volume. // // 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 @@ -34747,7 +38166,7 @@ func (c *EC2) MonitorInstancesRequest(input *MonitorInstancesInput) (req *reques // Enables detailed monitoring for a running instance. Otherwise, basic monitoring // is enabled. For more information, see Monitoring your instances and volumes // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // To disable detailed monitoring, see . // @@ -34903,16 +38322,16 @@ func (c *EC2) ProvisionByoipCidrRequest(input *ProvisionByoipCidrInput) (req *re // ProvisionByoipCidr API operation for Amazon Elastic Compute Cloud. // -// Provisions an IPv4 or IPv6 address range for use with your AWS resources -// through bring your own IP addresses (BYOIP) and creates a corresponding address -// pool. After the address range is provisioned, it is ready to be advertised +// Provisions an IPv4 or IPv6 address range for use with your Amazon Web Services +// resources through bring your own IP addresses (BYOIP) and creates a corresponding +// address pool. After the address range is provisioned, it is ready to be advertised // using AdvertiseByoipCidr. // -// AWS verifies that you own the address range and are authorized to advertise -// it. You must ensure that the address range is registered to you and that -// you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 to advertise -// the address range. For more information, see Bring Your Own IP Addresses -// (BYOIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) +// Amazon Web Services verifies that you own the address range and are authorized +// to advertise it. You must ensure that the address range is registered to +// you and that you created an RPKI ROA to authorize Amazon ASNs 16509 and 14618 +// to advertise the address range. For more information, see Bring your own +// IP addresses (BYOIP) (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html) // in the Amazon Elastic Compute Cloud User Guide. // // Provisioning an address range is an asynchronous operation, so the call returns @@ -35083,7 +38502,7 @@ func (c *EC2) PurchaseReservedInstancesOfferingRequest(input *PurchaseReservedIn // // For more information, see Reserved Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-on-demand-reserved-instances.html) // and Reserved Instance Marketplace (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ri-market-general.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -35251,7 +38670,7 @@ func (c *EC2) RebootInstancesRequest(input *RebootInstancesInput) (req *request. // // For more information about troubleshooting, see Getting console output and // rebooting instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-console.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -35333,12 +38752,25 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ // For Amazon EBS-backed instances, CreateImage creates and registers the AMI // in a single request, so you don't have to register the AMI yourself. // -// You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from -// a snapshot of a root device volume. You specify the snapshot using the block -// device mapping. For more information, see Launching a Linux instance from -// a backup (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-launch-snapshot.html) +// If needed, you can deregister an AMI at any time. Any modifications you make +// to an AMI backed by an instance store volume invalidates its registration. +// If you make changes to an image, deregister the previous image and register +// the new image. +// +// Register a snapshot of a root device volume +// +// You can use RegisterImage to create an Amazon EBS-backed Linux AMI from a +// snapshot of a root device volume. You specify the snapshot using a block +// device mapping. You can't set the encryption state of the volume using the +// block device mapping. If the snapshot is encrypted, or encryption by default +// is enabled, the root volume of an instance launched from the AMI is encrypted. +// +// For more information, see Create a Linux AMI from a snapshot (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html#creating-launching-ami-from-snapshot) +// and Use encryption with EBS-backed AMIs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. // +// AWS Marketplace product codes +// // If any snapshots have AWS Marketplace product codes, they are copied to the // new AMI. // @@ -35364,11 +38796,6 @@ func (c *EC2) RegisterImageRequest(input *RegisterImageInput) (req *request.Requ // Obtaining billing information (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-billing-info.html) // in the Amazon Elastic Compute Cloud User Guide. // -// If needed, you can deregister an AMI at any time. Any modifications you make -// to an AMI backed by an instance store volume invalidates its registration. -// If you make changes to an image, deregister the previous image and register -// the new 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. @@ -35638,6 +39065,81 @@ func (c *EC2) RegisterTransitGatewayMulticastGroupSourcesWithContext(ctx aws.Con return out, req.Send() } +const opRejectTransitGatewayMulticastDomainAssociations = "RejectTransitGatewayMulticastDomainAssociations" + +// RejectTransitGatewayMulticastDomainAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the RejectTransitGatewayMulticastDomainAssociations 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 RejectTransitGatewayMulticastDomainAssociations for more information on using the RejectTransitGatewayMulticastDomainAssociations +// 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 RejectTransitGatewayMulticastDomainAssociationsRequest method. +// req, resp := client.RejectTransitGatewayMulticastDomainAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayMulticastDomainAssociations +func (c *EC2) RejectTransitGatewayMulticastDomainAssociationsRequest(input *RejectTransitGatewayMulticastDomainAssociationsInput) (req *request.Request, output *RejectTransitGatewayMulticastDomainAssociationsOutput) { + op := &request.Operation{ + Name: opRejectTransitGatewayMulticastDomainAssociations, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RejectTransitGatewayMulticastDomainAssociationsInput{} + } + + output = &RejectTransitGatewayMulticastDomainAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// RejectTransitGatewayMulticastDomainAssociations API operation for Amazon Elastic Compute Cloud. +// +// Rejects a request to associate cross-account subnets with a transit gateway +// multicast domain. +// +// 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 Elastic Compute Cloud's +// API operation RejectTransitGatewayMulticastDomainAssociations for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/RejectTransitGatewayMulticastDomainAssociations +func (c *EC2) RejectTransitGatewayMulticastDomainAssociations(input *RejectTransitGatewayMulticastDomainAssociationsInput) (*RejectTransitGatewayMulticastDomainAssociationsOutput, error) { + req, out := c.RejectTransitGatewayMulticastDomainAssociationsRequest(input) + return out, req.Send() +} + +// RejectTransitGatewayMulticastDomainAssociationsWithContext is the same as RejectTransitGatewayMulticastDomainAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See RejectTransitGatewayMulticastDomainAssociations 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 *EC2) RejectTransitGatewayMulticastDomainAssociationsWithContext(ctx aws.Context, input *RejectTransitGatewayMulticastDomainAssociationsInput, opts ...request.Option) (*RejectTransitGatewayMulticastDomainAssociationsOutput, error) { + req, out := c.RejectTransitGatewayMulticastDomainAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRejectTransitGatewayPeeringAttachment = "RejectTransitGatewayPeeringAttachment" // RejectTransitGatewayPeeringAttachmentRequest generates a "aws/request.Request" representing the @@ -36002,7 +39504,7 @@ func (c *EC2) ReleaseAddressRequest(input *ReleaseAddressInput) (req *request.Re // Be sure to update your DNS records and any servers or devices that communicate // with the address. If you attempt to release an Elastic IP address that you // already released, you'll get an AuthFailure error if the address is already -// allocated to another AWS account. +// allocated to another account. // // [EC2-VPC] After you release an Elastic IP address for use in a VPC, you might // be able to recover it. For more information, see AllocateAddress. @@ -36847,6 +40349,81 @@ func (c *EC2) RequestSpotInstancesWithContext(ctx aws.Context, input *RequestSpo return out, req.Send() } +const opResetAddressAttribute = "ResetAddressAttribute" + +// ResetAddressAttributeRequest generates a "aws/request.Request" representing the +// client's request for the ResetAddressAttribute 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 ResetAddressAttribute for more information on using the ResetAddressAttribute +// 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 ResetAddressAttributeRequest method. +// req, resp := client.ResetAddressAttributeRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetAddressAttribute +func (c *EC2) ResetAddressAttributeRequest(input *ResetAddressAttributeInput) (req *request.Request, output *ResetAddressAttributeOutput) { + op := &request.Operation{ + Name: opResetAddressAttribute, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ResetAddressAttributeInput{} + } + + output = &ResetAddressAttributeOutput{} + req = c.newRequest(op, input, output) + return +} + +// ResetAddressAttribute API operation for Amazon Elastic Compute Cloud. +// +// Resets the attribute of the specified IP address. For requirements, see Using +// reverse DNS for email applications (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html#Using_Elastic_Addressing_Reverse_DNS). +// +// 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 Elastic Compute Cloud's +// API operation ResetAddressAttribute for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/ResetAddressAttribute +func (c *EC2) ResetAddressAttribute(input *ResetAddressAttributeInput) (*ResetAddressAttributeOutput, error) { + req, out := c.ResetAddressAttributeRequest(input) + return out, req.Send() +} + +// ResetAddressAttributeWithContext is the same as ResetAddressAttribute with the addition of +// the ability to pass a context and additional request options. +// +// See ResetAddressAttribute 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 *EC2) ResetAddressAttributeWithContext(ctx aws.Context, input *ResetAddressAttributeInput, opts ...request.Option) (*ResetAddressAttributeOutput, error) { + req, out := c.ResetAddressAttributeRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opResetEbsDefaultKmsKeyId = "ResetEbsDefaultKmsKeyId" // ResetEbsDefaultKmsKeyIdRequest generates a "aws/request.Request" representing the @@ -36891,12 +40468,13 @@ func (c *EC2) ResetEbsDefaultKmsKeyIdRequest(input *ResetEbsDefaultKmsKeyIdInput // ResetEbsDefaultKmsKeyId API operation for Amazon Elastic Compute Cloud. // -// Resets the default customer master key (CMK) for EBS encryption for your -// account in this Region to the AWS managed CMK for EBS. +// Resets the default KMS key for EBS encryption for your account in this Region +// to the Amazon Web Services managed KMS key for EBS. // -// After resetting the default CMK to the AWS managed CMK, you can continue -// to encrypt by a customer managed CMK by specifying it when you create the -// volume. For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) +// After resetting the default KMS key to the Amazon Web Services managed KMS +// key, you can continue to encrypt by a customer managed KMS key by specifying +// it when you create the volume. For more information, see Amazon EBS encryption +// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) // in the Amazon Elastic Compute Cloud User Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -37132,7 +40710,7 @@ func (c *EC2) ResetInstanceAttributeRequest(input *ResetInstanceAttributeInput) // is enabled. The default value is true, which means checking is enabled. This // value must be false for a NAT instance to perform NAT. For more information, // see NAT Instances (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) -// in the Amazon Virtual Private Cloud User Guide. +// in the Amazon VPC 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 @@ -37285,7 +40863,7 @@ func (c *EC2) ResetSnapshotAttributeRequest(input *ResetSnapshotAttributeInput) // // Resets permission settings for the specified snapshot. // -// For more information about modifying snapshot permissions, see Sharing snapshots +// For more information about modifying snapshot permissions, see Share a snapshot // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html) // in the Amazon Elastic Compute Cloud User Guide. // @@ -37587,23 +41165,25 @@ func (c *EC2) RevokeSecurityGroupEgressRequest(input *RevokeSecurityGroupEgressI // RevokeSecurityGroupEgress API operation for Amazon Elastic Compute Cloud. // -// [VPC only] Removes the specified egress rules from a security group for EC2-VPC. -// This action does not apply to security groups for use in EC2-Classic. To -// remove a rule, the values that you specify (for example, ports) must match -// the existing rule's values exactly. +// [VPC only] Removes the specified outbound (egress) rules from a security +// group for EC2-VPC. This action does not apply to security groups for use +// in EC2-Classic. +// +// You can specify rules using either rule IDs or security group rule properties. +// If you use rule properties, the values that you specify (for example, ports) +// must match the existing rule's values exactly. Each rule has a protocol, +// from and to ports, and destination (CIDR range, security group, or prefix +// list). For the TCP and UDP protocols, you must also specify the destination +// port or range of ports. For the ICMP protocol, you must also specify the +// ICMP type and code. If the security group rule has a description, you do +// not need to specify the description to revoke the rule. // // [Default VPC] If the values you specify do not match the existing rule's // values, no error is returned, and the output describes the security group // rules that were not revoked. // -// AWS recommends that you use DescribeSecurityGroups to verify that the rule -// has been removed. -// -// Each rule consists of the protocol and the IPv4 or IPv6 CIDR range or source -// security group. For the TCP and UDP protocols, you must also specify the -// destination port or range of ports. For the ICMP protocol, you must also -// specify the ICMP type and code. If the security group rule has a description, -// you do not have to specify the description to revoke the rule. +// Amazon Web Services recommends that you describe the security group to verify +// that the rules were removed. // // Rule changes are propagated to instances within the security group as quickly // as possible. However, a small delay might occur. @@ -37680,22 +41260,23 @@ func (c *EC2) RevokeSecurityGroupIngressRequest(input *RevokeSecurityGroupIngres // RevokeSecurityGroupIngress API operation for Amazon Elastic Compute Cloud. // -// Removes the specified ingress rules from a security group. To remove a rule, -// the values that you specify (for example, ports) must match the existing -// rule's values exactly. +// Removes the specified inbound (ingress) rules from a security group. +// +// You can specify rules using either rule IDs or security group rule properties. +// If you use rule properties, the values that you specify (for example, ports) +// must match the existing rule's values exactly. Each rule has a protocol, +// from and to ports, and source (CIDR range, security group, or prefix list). +// For the TCP and UDP protocols, you must also specify the destination port +// or range of ports. For the ICMP protocol, you must also specify the ICMP +// type and code. If the security group rule has a description, you do not need +// to specify the description to revoke the rule. // -// [EC2-Classic , default VPC] If the values you specify do not match the existing +// [EC2-Classic, default VPC] If the values you specify do not match the existing // rule's values, no error is returned, and the output describes the security // group rules that were not revoked. // -// AWS recommends that you use DescribeSecurityGroups to verify that the rule -// has been removed. -// -// Each rule consists of the protocol and the CIDR range or source security -// group. For the TCP and UDP protocols, you must also specify the destination -// port or range of ports. For the ICMP protocol, you must also specify the -// ICMP type and code. If the security group rule has a description, you do -// not have to specify the description to revoke the rule. +// Amazon Web Services recommends that you describe the security group to verify +// that the rules were removed. // // Rule changes are propagated to instances within the security group as quickly // as possible. However, a small delay might occur. @@ -37819,13 +41400,11 @@ func (c *EC2) RunInstancesRequest(input *RunInstancesInput) (req *request.Reques // Linux instances have access to the public key of the key pair at boot. You // can use this key to provide secure access to the instance. Amazon EC2 public // images use this feature to provide secure access without passwords. For more -// information, see Key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) -// in the Amazon Elastic Compute Cloud User Guide. +// information, see Key pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html). // // For troubleshooting, see What to do if an instance immediately terminates // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_InstanceStraightToTerminated.html), -// and Troubleshooting connecting to your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html) -// in the Amazon Elastic Compute Cloud User Guide. +// and Troubleshooting connecting to your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html). // // 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 @@ -37909,7 +41488,7 @@ func (c *EC2) RunScheduledInstancesRequest(input *RunScheduledInstancesInput) (r // If you terminate a Scheduled Instance before the current scheduled time period // ends, you can launch it again after a few minutes. For more information, // see Scheduled Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-scheduled-instances.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -38421,11 +42000,7 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re // released and you are not billed for instance usage. However, your root partition // Amazon EBS volume remains and continues to persist your data, and you are // charged for Amazon EBS volume usage. You can restart your instance at any -// time. Every time you start your Windows instance, Amazon EC2 charges you -// for a full instance hour. If you stop and restart your Windows instance, -// a new instance hour begins and Amazon EC2 charges you for another full instance -// hour even if you are still within the same 60-minute period when it was stopped. -// Every time you start your Linux instance, Amazon EC2 charges a one-minute +// time. Every time you start your instance, Amazon EC2 charges a one-minute // minimum for instance usage, and thereafter charges per second for instance // usage. // @@ -38436,7 +42011,7 @@ func (c *EC2) StartInstancesRequest(input *StartInstancesInput) (req *request.Re // root device returns an error. // // For more information, see Stopping instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Stop_Start.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -38466,6 +42041,81 @@ func (c *EC2) StartInstancesWithContext(ctx aws.Context, input *StartInstancesIn return out, req.Send() } +const opStartNetworkInsightsAnalysis = "StartNetworkInsightsAnalysis" + +// StartNetworkInsightsAnalysisRequest generates a "aws/request.Request" representing the +// client's request for the StartNetworkInsightsAnalysis 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 StartNetworkInsightsAnalysis for more information on using the StartNetworkInsightsAnalysis +// 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 StartNetworkInsightsAnalysisRequest method. +// req, resp := client.StartNetworkInsightsAnalysisRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartNetworkInsightsAnalysis +func (c *EC2) StartNetworkInsightsAnalysisRequest(input *StartNetworkInsightsAnalysisInput) (req *request.Request, output *StartNetworkInsightsAnalysisOutput) { + op := &request.Operation{ + Name: opStartNetworkInsightsAnalysis, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &StartNetworkInsightsAnalysisInput{} + } + + output = &StartNetworkInsightsAnalysisOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartNetworkInsightsAnalysis API operation for Amazon Elastic Compute Cloud. +// +// Starts analyzing the specified path. If the path is reachable, the operation +// returns the shortest feasible path. +// +// 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 Elastic Compute Cloud's +// API operation StartNetworkInsightsAnalysis for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/StartNetworkInsightsAnalysis +func (c *EC2) StartNetworkInsightsAnalysis(input *StartNetworkInsightsAnalysisInput) (*StartNetworkInsightsAnalysisOutput, error) { + req, out := c.StartNetworkInsightsAnalysisRequest(input) + return out, req.Send() +} + +// StartNetworkInsightsAnalysisWithContext is the same as StartNetworkInsightsAnalysis with the addition of +// the ability to pass a context and additional request options. +// +// See StartNetworkInsightsAnalysis 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 *EC2) StartNetworkInsightsAnalysisWithContext(ctx aws.Context, input *StartNetworkInsightsAnalysisInput, opts ...request.Option) (*StartNetworkInsightsAnalysisOutput, error) { + req, out := c.StartNetworkInsightsAnalysisRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opStartVpcEndpointServicePrivateDnsVerification = "StartVpcEndpointServicePrivateDnsVerification" // StartVpcEndpointServicePrivateDnsVerificationRequest generates a "aws/request.Request" representing the @@ -38599,23 +42249,19 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ // for hibernation (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#enabling-hibernation) // and it meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). // For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // We don't charge usage for a stopped instance, or data transfer fees; however, // your root partition Amazon EBS volume remains and continues to persist your // data, and you are charged for Amazon EBS volume usage. Every time you start -// your Windows instance, Amazon EC2 charges you for a full instance hour. If -// you stop and restart your Windows instance, a new instance hour begins and -// Amazon EC2 charges you for another full instance hour even if you are still -// within the same 60-minute period when it was stopped. Every time you start -// your Linux instance, Amazon EC2 charges a one-minute minimum for instance -// usage, and thereafter charges per second for instance usage. +// your instance, Amazon EC2 charges a one-minute minimum for instance usage, +// and thereafter charges per second for instance usage. // // You can't stop or hibernate instance store-backed instances. You can't use // the Stop action to hibernate Spot Instances, but you can specify that Amazon // EC2 should hibernate Spot Instances when they are interrupted. For more information, // see Hibernating interrupted Spot Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // When you stop or hibernate an instance, we shut it down. You can restart // your instance at any time. Before stopping or hibernating an instance, make @@ -38631,13 +42277,13 @@ func (c *EC2) StopInstancesRequest(input *StopInstancesInput) (req *request.Requ // launch are automatically deleted. For more information about the differences // between rebooting, stopping, hibernating, and terminating instances, see // Instance lifecycle (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // When you stop an instance, we attempt to shut it down forcibly after a short // while. If your instance appears stuck in the stopping state after a period // of time, there may be an issue with the underlying host computer. For more // information, see Troubleshooting stopping your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesStopping.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -38793,6 +42439,36 @@ func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *re // If you specify multiple instances and the request fails (for example, because // of a single incorrect instance ID), none of the instances are terminated. // +// If you terminate multiple instances across multiple Availability Zones, and +// one or more of the specified instances are enabled for termination protection, +// the request fails with the following results: +// +// * The specified instances that are in the same Availability Zone as the +// protected instance are not terminated. +// +// * The specified instances that are in different Availability Zones, where +// no other specified instances are protected, are successfully terminated. +// +// For example, say you have the following instances: +// +// * Instance A: us-east-1a; Not protected +// +// * Instance B: us-east-1a; Not protected +// +// * Instance C: us-east-1b; Protected +// +// * Instance D: us-east-1b; not protected +// +// If you attempt to terminate all of these instances in the same request, the +// request reports failure with the following results: +// +// * Instance A and Instance B are successfully terminated because none of +// the specified instances in us-east-1a are enabled for termination protection. +// +// * Instance C and Instance D fail to terminate because at least one of +// the specified instances in us-east-1b (Instance C) is enabled for termination +// protection. +// // Terminated instances remain visible after termination (for approximately // one hour). // @@ -38807,11 +42483,11 @@ func (c *EC2) TerminateInstancesRequest(input *TerminateInstancesInput) (req *re // device mapping parameter set to true are automatically deleted. For more // information about the differences between stopping and terminating instances, // see Instance lifecycle (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-lifecycle.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. // // For more information about troubleshooting, see Troubleshooting terminating // your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesShuttingDown.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -39036,7 +42712,7 @@ func (c *EC2) UnmonitorInstancesRequest(input *UnmonitorInstancesInput) (req *re // // Disables detailed monitoring for a running instance. For more information, // see Monitoring your instances and volumes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 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 @@ -39112,11 +42788,8 @@ func (c *EC2) UpdateSecurityGroupRuleDescriptionsEgressRequest(input *UpdateSecu // // [VPC only] Updates the description of an egress (outbound) security group // rule. You can replace an existing description, or add a description to a -// rule that did not have one previously. -// -// You specify the description as part of the IP permissions structure. You -// can remove a description for a security group rule by omitting the description -// parameter in the request. +// rule that did not have one previously. You can remove a description for a +// security group rule by omitting the description parameter in the request. // // 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 @@ -39192,11 +42865,8 @@ func (c *EC2) UpdateSecurityGroupRuleDescriptionsIngressRequest(input *UpdateSec // // Updates the description of an ingress (inbound) security group rule. You // can replace an existing description, or add a description to a rule that -// did not have one previously. -// -// You specify the description as part of the IP permissions structure. You -// can remove a description for a security group rule by omitting the description -// parameter in the request. +// did not have one previously. You can remove a description for a security +// group rule by omitting the description parameter in the request. // // 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 @@ -39276,7 +42946,7 @@ func (c *EC2) WithdrawByoipCidrRequest(input *WithdrawByoipCidrInput) (req *requ // specify different address ranges each time. // // It can take a few minutes before traffic to the specified addresses stops -// routing to AWS because of BGP propagation delays. +// routing to Amazon Web Services because of BGP propagation delays. // // 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 @@ -39402,6 +43072,82 @@ func (s *AcceptReservedInstancesExchangeQuoteOutput) SetExchangeId(v string) *Ac return s } +type AcceptTransitGatewayMulticastDomainAssociationsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the subnets to associate with the transit gateway multicast domain. + SubnetIds []*string `locationNameList:"item" type:"list"` + + // The ID of the transit gateway attachment. + TransitGatewayAttachmentId *string `type:"string"` + + // The ID of the transit gateway multicast domain. + TransitGatewayMulticastDomainId *string `type:"string"` +} + +// String returns the string representation +func (s AcceptTransitGatewayMulticastDomainAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptTransitGatewayMulticastDomainAssociationsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *AcceptTransitGatewayMulticastDomainAssociationsInput) SetDryRun(v bool) *AcceptTransitGatewayMulticastDomainAssociationsInput { + s.DryRun = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *AcceptTransitGatewayMulticastDomainAssociationsInput) SetSubnetIds(v []*string) *AcceptTransitGatewayMulticastDomainAssociationsInput { + s.SubnetIds = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *AcceptTransitGatewayMulticastDomainAssociationsInput) SetTransitGatewayAttachmentId(v string) *AcceptTransitGatewayMulticastDomainAssociationsInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayMulticastDomainId sets the TransitGatewayMulticastDomainId field's value. +func (s *AcceptTransitGatewayMulticastDomainAssociationsInput) SetTransitGatewayMulticastDomainId(v string) *AcceptTransitGatewayMulticastDomainAssociationsInput { + s.TransitGatewayMulticastDomainId = &v + return s +} + +type AcceptTransitGatewayMulticastDomainAssociationsOutput struct { + _ struct{} `type:"structure"` + + // Describes the multicast domain associations. + Associations *TransitGatewayMulticastDomainAssociations `locationName:"associations" type:"structure"` +} + +// String returns the string representation +func (s AcceptTransitGatewayMulticastDomainAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AcceptTransitGatewayMulticastDomainAssociationsOutput) GoString() string { + return s.String() +} + +// SetAssociations sets the Associations field's value. +func (s *AcceptTransitGatewayMulticastDomainAssociationsOutput) SetAssociations(v *TransitGatewayMulticastDomainAssociations) *AcceptTransitGatewayMulticastDomainAssociationsOutput { + s.Associations = v + return s +} + type AcceptTransitGatewayPeeringAttachmentInput struct { _ struct{} `type:"structure"` @@ -39890,7 +43636,7 @@ type Address struct { // The ID of the network interface. NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // The ID of the AWS account that owns the network interface. + // The ID of the account that owns the network interface. NetworkInterfaceOwnerId *string `locationName:"networkInterfaceOwnerId" type:"string"` // The private IP address associated with the Elastic IP address. @@ -40000,6 +43746,57 @@ func (s *Address) SetTags(v []*Tag) *Address { return s } +// The attributes associated with an Elastic IP address. +type AddressAttribute struct { + _ struct{} `type:"structure"` + + // [EC2-VPC] The allocation ID. + AllocationId *string `locationName:"allocationId" type:"string"` + + // The pointer (PTR) record for the IP address. + PtrRecord *string `locationName:"ptrRecord" type:"string"` + + // The updated PTR record for the IP address. + PtrRecordUpdate *PtrUpdateStatus `locationName:"ptrRecordUpdate" type:"structure"` + + // The public IP address. + PublicIp *string `locationName:"publicIp" type:"string"` +} + +// String returns the string representation +func (s AddressAttribute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AddressAttribute) GoString() string { + return s.String() +} + +// SetAllocationId sets the AllocationId field's value. +func (s *AddressAttribute) SetAllocationId(v string) *AddressAttribute { + s.AllocationId = &v + return s +} + +// SetPtrRecord sets the PtrRecord field's value. +func (s *AddressAttribute) SetPtrRecord(v string) *AddressAttribute { + s.PtrRecord = &v + return s +} + +// SetPtrRecordUpdate sets the PtrRecordUpdate field's value. +func (s *AddressAttribute) SetPtrRecordUpdate(v *PtrUpdateStatus) *AddressAttribute { + s.PtrRecordUpdate = v + return s +} + +// SetPublicIp sets the PublicIp field's value. +func (s *AddressAttribute) SetPublicIp(v string) *AddressAttribute { + s.PublicIp = &v + return s +} + type AdvertiseByoipCidrInput struct { _ struct{} `type:"structure"` @@ -40115,6 +43912,9 @@ type AllocateAddressInput struct { // EC2 select an address from the address pool. To specify a specific address // from the address pool, use the Address parameter instead. PublicIpv4Pool *string `type:"string"` + + // The tags to assign to the Elastic IP address. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -40163,11 +43963,17 @@ func (s *AllocateAddressInput) SetPublicIpv4Pool(v string) *AllocateAddressInput return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *AllocateAddressInput) SetTagSpecifications(v []*TagSpecification) *AllocateAddressInput { + s.TagSpecifications = v + return s +} + type AllocateAddressOutput struct { _ struct{} `type:"structure"` - // [EC2-VPC] The ID that AWS assigns to represent the allocation of the Elastic - // IP address for use with instances in a VPC. + // [EC2-VPC] The ID that Amazon Web Services assigns to represent the allocation + // of the Elastic IP address for use with instances in a VPC. AllocationId *string `locationName:"allocationId" type:"string"` // The carrier IP address. This option is only available for network interfaces @@ -40259,8 +44065,8 @@ type AllocateHostsInput struct { // Indicates whether the host accepts any untargeted instance launches that // match its instance type configuration, or if it only accepts Host tenancy // instance launches that specify its unique host ID. For more information, - // see Understanding Instance Placement and Host Affinity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding) - // in the Amazon EC2 User Guide for Linux Instances. + // see Understanding auto-placement and affinity (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/how-dedicated-hosts-work.html#dedicated-hosts-understanding) + // in the Amazon EC2 User Guide. // // Default: on AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` @@ -40271,13 +44077,13 @@ type AllocateHostsInput struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` // Indicates whether to enable or disable host recovery for the Dedicated Host. - // Host recovery is disabled by default. For more information, see Host Recovery + // Host recovery is disabled by default. For more information, see Host recovery // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. // // Default: off HostRecovery *string `type:"string" enum:"HostRecovery"` @@ -40441,6 +44247,472 @@ func (s *AllowedPrincipal) SetPrincipalType(v string) *AllowedPrincipal { return s } +// Describes an potential intermediate component of a feasible path. +type AlternatePathHint struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the component. + ComponentArn *string `locationName:"componentArn" type:"string"` + + // The ID of the component. + ComponentId *string `locationName:"componentId" type:"string"` +} + +// String returns the string representation +func (s AlternatePathHint) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AlternatePathHint) GoString() string { + return s.String() +} + +// SetComponentArn sets the ComponentArn field's value. +func (s *AlternatePathHint) SetComponentArn(v string) *AlternatePathHint { + s.ComponentArn = &v + return s +} + +// SetComponentId sets the ComponentId field's value. +func (s *AlternatePathHint) SetComponentId(v string) *AlternatePathHint { + s.ComponentId = &v + return s +} + +// Describes a network access control (ACL) rule. +type AnalysisAclRule struct { + _ struct{} `type:"structure"` + + // The IPv4 address range, in CIDR notation. + Cidr *string `locationName:"cidr" type:"string"` + + // Indicates whether the rule is an outbound rule. + Egress *bool `locationName:"egress" type:"boolean"` + + // The range of ports. + PortRange *PortRange `locationName:"portRange" type:"structure"` + + // The protocol. + Protocol *string `locationName:"protocol" type:"string"` + + // Indicates whether to allow or deny traffic that matches the rule. + RuleAction *string `locationName:"ruleAction" type:"string"` + + // The rule number. + RuleNumber *int64 `locationName:"ruleNumber" type:"integer"` +} + +// String returns the string representation +func (s AnalysisAclRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisAclRule) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *AnalysisAclRule) SetCidr(v string) *AnalysisAclRule { + s.Cidr = &v + return s +} + +// SetEgress sets the Egress field's value. +func (s *AnalysisAclRule) SetEgress(v bool) *AnalysisAclRule { + s.Egress = &v + return s +} + +// SetPortRange sets the PortRange field's value. +func (s *AnalysisAclRule) SetPortRange(v *PortRange) *AnalysisAclRule { + s.PortRange = v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *AnalysisAclRule) SetProtocol(v string) *AnalysisAclRule { + s.Protocol = &v + return s +} + +// SetRuleAction sets the RuleAction field's value. +func (s *AnalysisAclRule) SetRuleAction(v string) *AnalysisAclRule { + s.RuleAction = &v + return s +} + +// SetRuleNumber sets the RuleNumber field's value. +func (s *AnalysisAclRule) SetRuleNumber(v int64) *AnalysisAclRule { + s.RuleNumber = &v + return s +} + +// Describes a path component. +type AnalysisComponent struct { + _ struct{} `type:"structure"` + + // The Amazon Resource Name (ARN) of the component. + Arn *string `locationName:"arn" type:"string"` + + // The ID of the component. + Id *string `locationName:"id" type:"string"` +} + +// String returns the string representation +func (s AnalysisComponent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisComponent) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *AnalysisComponent) SetArn(v string) *AnalysisComponent { + s.Arn = &v + return s +} + +// SetId sets the Id field's value. +func (s *AnalysisComponent) SetId(v string) *AnalysisComponent { + s.Id = &v + return s +} + +// Describes a load balancer listener. +type AnalysisLoadBalancerListener struct { + _ struct{} `type:"structure"` + + // [Classic Load Balancers] The back-end port for the listener. + InstancePort *int64 `locationName:"instancePort" min:"1" type:"integer"` + + // The port on which the load balancer is listening. + LoadBalancerPort *int64 `locationName:"loadBalancerPort" min:"1" type:"integer"` +} + +// String returns the string representation +func (s AnalysisLoadBalancerListener) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisLoadBalancerListener) GoString() string { + return s.String() +} + +// SetInstancePort sets the InstancePort field's value. +func (s *AnalysisLoadBalancerListener) SetInstancePort(v int64) *AnalysisLoadBalancerListener { + s.InstancePort = &v + return s +} + +// SetLoadBalancerPort sets the LoadBalancerPort field's value. +func (s *AnalysisLoadBalancerListener) SetLoadBalancerPort(v int64) *AnalysisLoadBalancerListener { + s.LoadBalancerPort = &v + return s +} + +// Describes a load balancer target. +type AnalysisLoadBalancerTarget struct { + _ struct{} `type:"structure"` + + // The IP address. + Address *string `locationName:"address" type:"string"` + + // The Availability Zone. + AvailabilityZone *string `locationName:"availabilityZone" type:"string"` + + // Information about the instance. + Instance *AnalysisComponent `locationName:"instance" type:"structure"` + + // The port on which the target is listening. + Port *int64 `locationName:"port" min:"1" type:"integer"` +} + +// String returns the string representation +func (s AnalysisLoadBalancerTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisLoadBalancerTarget) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *AnalysisLoadBalancerTarget) SetAddress(v string) *AnalysisLoadBalancerTarget { + s.Address = &v + return s +} + +// SetAvailabilityZone sets the AvailabilityZone field's value. +func (s *AnalysisLoadBalancerTarget) SetAvailabilityZone(v string) *AnalysisLoadBalancerTarget { + s.AvailabilityZone = &v + return s +} + +// SetInstance sets the Instance field's value. +func (s *AnalysisLoadBalancerTarget) SetInstance(v *AnalysisComponent) *AnalysisLoadBalancerTarget { + s.Instance = v + return s +} + +// SetPort sets the Port field's value. +func (s *AnalysisLoadBalancerTarget) SetPort(v int64) *AnalysisLoadBalancerTarget { + s.Port = &v + return s +} + +// Describes a header. Reflects any changes made by a component as traffic passes +// through. The fields of an inbound header are null except for the first component +// of a path. +type AnalysisPacketHeader struct { + _ struct{} `type:"structure"` + + // The destination addresses. + DestinationAddresses []*string `locationName:"destinationAddressSet" locationNameList:"item" type:"list"` + + // The destination port ranges. + DestinationPortRanges []*PortRange `locationName:"destinationPortRangeSet" locationNameList:"item" type:"list"` + + // The protocol. + Protocol *string `locationName:"protocol" type:"string"` + + // The source addresses. + SourceAddresses []*string `locationName:"sourceAddressSet" locationNameList:"item" type:"list"` + + // The source port ranges. + SourcePortRanges []*PortRange `locationName:"sourcePortRangeSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s AnalysisPacketHeader) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisPacketHeader) GoString() string { + return s.String() +} + +// SetDestinationAddresses sets the DestinationAddresses field's value. +func (s *AnalysisPacketHeader) SetDestinationAddresses(v []*string) *AnalysisPacketHeader { + s.DestinationAddresses = v + return s +} + +// SetDestinationPortRanges sets the DestinationPortRanges field's value. +func (s *AnalysisPacketHeader) SetDestinationPortRanges(v []*PortRange) *AnalysisPacketHeader { + s.DestinationPortRanges = v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *AnalysisPacketHeader) SetProtocol(v string) *AnalysisPacketHeader { + s.Protocol = &v + return s +} + +// SetSourceAddresses sets the SourceAddresses field's value. +func (s *AnalysisPacketHeader) SetSourceAddresses(v []*string) *AnalysisPacketHeader { + s.SourceAddresses = v + return s +} + +// SetSourcePortRanges sets the SourcePortRanges field's value. +func (s *AnalysisPacketHeader) SetSourcePortRanges(v []*PortRange) *AnalysisPacketHeader { + s.SourcePortRanges = v + return s +} + +// Describes a route table route. +type AnalysisRouteTableRoute struct { + _ struct{} `type:"structure"` + + // The destination IPv4 address, in CIDR notation. + DestinationCidr *string `locationName:"destinationCidr" type:"string"` + + // The prefix of the AWS service. + DestinationPrefixListId *string `locationName:"destinationPrefixListId" type:"string"` + + // The ID of an egress-only internet gateway. + EgressOnlyInternetGatewayId *string `locationName:"egressOnlyInternetGatewayId" type:"string"` + + // The ID of the gateway, such as an internet gateway or virtual private gateway. + GatewayId *string `locationName:"gatewayId" type:"string"` + + // The ID of the instance, such as a NAT instance. + InstanceId *string `locationName:"instanceId" type:"string"` + + // The ID of a NAT gateway. + NatGatewayId *string `locationName:"natGatewayId" type:"string"` + + // The ID of a network interface. + NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` + + // Describes how the route was created. The following are possible values: + // + // * CreateRouteTable - The route was automatically created when the route + // table was created. + // + // * CreateRoute - The route was manually added to the route table. + // + // * EnableVgwRoutePropagation - The route was propagated by route propagation. + Origin *string `locationName:"origin" type:"string"` + + // The ID of a transit gateway. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + + // The ID of a VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` +} + +// String returns the string representation +func (s AnalysisRouteTableRoute) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisRouteTableRoute) GoString() string { + return s.String() +} + +// SetDestinationCidr sets the DestinationCidr field's value. +func (s *AnalysisRouteTableRoute) SetDestinationCidr(v string) *AnalysisRouteTableRoute { + s.DestinationCidr = &v + return s +} + +// SetDestinationPrefixListId sets the DestinationPrefixListId field's value. +func (s *AnalysisRouteTableRoute) SetDestinationPrefixListId(v string) *AnalysisRouteTableRoute { + s.DestinationPrefixListId = &v + return s +} + +// SetEgressOnlyInternetGatewayId sets the EgressOnlyInternetGatewayId field's value. +func (s *AnalysisRouteTableRoute) SetEgressOnlyInternetGatewayId(v string) *AnalysisRouteTableRoute { + s.EgressOnlyInternetGatewayId = &v + return s +} + +// SetGatewayId sets the GatewayId field's value. +func (s *AnalysisRouteTableRoute) SetGatewayId(v string) *AnalysisRouteTableRoute { + s.GatewayId = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *AnalysisRouteTableRoute) SetInstanceId(v string) *AnalysisRouteTableRoute { + s.InstanceId = &v + return s +} + +// SetNatGatewayId sets the NatGatewayId field's value. +func (s *AnalysisRouteTableRoute) SetNatGatewayId(v string) *AnalysisRouteTableRoute { + s.NatGatewayId = &v + return s +} + +// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. +func (s *AnalysisRouteTableRoute) SetNetworkInterfaceId(v string) *AnalysisRouteTableRoute { + s.NetworkInterfaceId = &v + return s +} + +// SetOrigin sets the Origin field's value. +func (s *AnalysisRouteTableRoute) SetOrigin(v string) *AnalysisRouteTableRoute { + s.Origin = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *AnalysisRouteTableRoute) SetTransitGatewayId(v string) *AnalysisRouteTableRoute { + s.TransitGatewayId = &v + return s +} + +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *AnalysisRouteTableRoute) SetVpcPeeringConnectionId(v string) *AnalysisRouteTableRoute { + s.VpcPeeringConnectionId = &v + return s +} + +// Describes a security group rule. +type AnalysisSecurityGroupRule struct { + _ struct{} `type:"structure"` + + // The IPv4 address range, in CIDR notation. + Cidr *string `locationName:"cidr" type:"string"` + + // The direction. The following are possible values: + // + // * egress + // + // * ingress + Direction *string `locationName:"direction" type:"string"` + + // The port range. + PortRange *PortRange `locationName:"portRange" type:"structure"` + + // The prefix list ID. + PrefixListId *string `locationName:"prefixListId" type:"string"` + + // The protocol name. + Protocol *string `locationName:"protocol" type:"string"` + + // The security group ID. + SecurityGroupId *string `locationName:"securityGroupId" type:"string"` +} + +// String returns the string representation +func (s AnalysisSecurityGroupRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AnalysisSecurityGroupRule) GoString() string { + return s.String() +} + +// SetCidr sets the Cidr field's value. +func (s *AnalysisSecurityGroupRule) SetCidr(v string) *AnalysisSecurityGroupRule { + s.Cidr = &v + return s +} + +// SetDirection sets the Direction field's value. +func (s *AnalysisSecurityGroupRule) SetDirection(v string) *AnalysisSecurityGroupRule { + s.Direction = &v + return s +} + +// SetPortRange sets the PortRange field's value. +func (s *AnalysisSecurityGroupRule) SetPortRange(v *PortRange) *AnalysisSecurityGroupRule { + s.PortRange = v + return s +} + +// SetPrefixListId sets the PrefixListId field's value. +func (s *AnalysisSecurityGroupRule) SetPrefixListId(v string) *AnalysisSecurityGroupRule { + s.PrefixListId = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *AnalysisSecurityGroupRule) SetProtocol(v string) *AnalysisSecurityGroupRule { + s.Protocol = &v + return s +} + +// SetSecurityGroupId sets the SecurityGroupId field's value. +func (s *AnalysisSecurityGroupRule) SetSecurityGroupId(v string) *AnalysisSecurityGroupRule { + s.SecurityGroupId = &v + return s +} + type ApplySecurityGroupsToClientVpnTargetNetworkInput struct { _ struct{} `type:"structure"` @@ -40546,8 +44818,10 @@ func (s *ApplySecurityGroupsToClientVpnTargetNetworkOutput) SetSecurityGroupIds( type AssignIpv6AddressesInput struct { _ struct{} `type:"structure"` - // The number of IPv6 addresses to assign to the network interface. Amazon EC2 - // automatically selects the IPv6 addresses from the subnet range. You can't + // The number of additional IPv6 addresses to assign to the network interface. + // The specified number of IPv6 addresses are assigned in addition to the existing + // IPv6 addresses that are already assigned to the network interface. Amazon + // EC2 automatically selects the IPv6 addresses from the subnet range. You can't // use this option if specifying specific IPv6 addresses. Ipv6AddressCount *int64 `locationName:"ipv6AddressCount" type:"integer"` @@ -40605,7 +44879,8 @@ func (s *AssignIpv6AddressesInput) SetNetworkInterfaceId(v string) *AssignIpv6Ad type AssignIpv6AddressesOutput struct { _ struct{} `type:"structure"` - // The IPv6 addresses assigned to the network interface. + // The new IPv6 addresses assigned to the network interface. Existing IPv6 addresses + // that were assigned to the network interface before the request are not included. AssignedIpv6Addresses []*string `locationName:"assignedIpv6Addresses" locationNameList:"item" type:"list"` // The ID of the network interface. @@ -40783,10 +45058,10 @@ type AssociateAddressInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` - // The ID of the instance. This is required for EC2-Classic. For EC2-VPC, you - // can specify either the instance ID or the network interface ID, but not both. - // The operation fails if you specify an instance ID unless exactly one network - // interface is attached. + // The ID of the instance. The instance must have exactly one attached network + // interface. For EC2-VPC, you can specify either the instance ID or the network + // interface ID, but not both. For EC2-Classic, you must specify an instance + // ID and the instance must be in the running state. InstanceId *string `type:"string"` // [EC2-VPC] The ID of the network interface. If the instance has more than @@ -40801,8 +45076,8 @@ type AssociateAddressInput struct { // address is associated with the primary private IP address. PrivateIpAddress *string `locationName:"privateIpAddress" type:"string"` - // The Elastic IP address to associate with the instance. This is required for - // EC2-Classic. + // [EC2-Classic] The Elastic IP address to associate with the instance. This + // is required for EC2-Classic. PublicIp *string `type:"string"` } @@ -41135,10 +45410,10 @@ type AssociateEnclaveCertificateIamRoleOutput struct { CertificateS3BucketName *string `locationName:"certificateS3BucketName" type:"string"` // The Amazon S3 object key where the certificate, certificate chain, and encrypted - // private key bundle are stored. The object key is formatted as follows: certificate_arn/role_arn. + // private key bundle are stored. The object key is formatted as follows: role_arn/certificate_arn. CertificateS3ObjectKey *string `locationName:"certificateS3ObjectKey" type:"string"` - // The ID of the AWS KMS CMK used to encrypt the private key of the certificate. + // The ID of the KMS key used to encrypt the private key of the certificate. EncryptionKmsKeyId *string `locationName:"encryptionKmsKeyId" type:"string"` } @@ -41245,6 +45520,93 @@ func (s *AssociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation(v * return s } +type AssociateInstanceEventWindowInput struct { + _ struct{} `type:"structure"` + + // One or more targets associated with the specified event window. + // + // AssociationTarget is a required field + AssociationTarget *InstanceEventWindowAssociationRequest `type:"structure" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the event window. + // + // InstanceEventWindowId is a required field + InstanceEventWindowId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s AssociateInstanceEventWindowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateInstanceEventWindowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateInstanceEventWindowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateInstanceEventWindowInput"} + if s.AssociationTarget == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationTarget")) + } + if s.InstanceEventWindowId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceEventWindowId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationTarget sets the AssociationTarget field's value. +func (s *AssociateInstanceEventWindowInput) SetAssociationTarget(v *InstanceEventWindowAssociationRequest) *AssociateInstanceEventWindowInput { + s.AssociationTarget = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AssociateInstanceEventWindowInput) SetDryRun(v bool) *AssociateInstanceEventWindowInput { + s.DryRun = &v + return s +} + +// SetInstanceEventWindowId sets the InstanceEventWindowId field's value. +func (s *AssociateInstanceEventWindowInput) SetInstanceEventWindowId(v string) *AssociateInstanceEventWindowInput { + s.InstanceEventWindowId = &v + return s +} + +type AssociateInstanceEventWindowOutput struct { + _ struct{} `type:"structure"` + + // Information about the event window. + InstanceEventWindow *InstanceEventWindow `locationName:"instanceEventWindow" type:"structure"` +} + +// String returns the string representation +func (s AssociateInstanceEventWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateInstanceEventWindowOutput) GoString() string { + return s.String() +} + +// SetInstanceEventWindow sets the InstanceEventWindow field's value. +func (s *AssociateInstanceEventWindowOutput) SetInstanceEventWindow(v *InstanceEventWindow) *AssociateInstanceEventWindowOutput { + s.InstanceEventWindow = v + return s +} + type AssociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -41594,6 +45956,132 @@ func (s *AssociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGatew return s } +type AssociateTrunkInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID of the branch network interface. + // + // BranchInterfaceId is a required field + BranchInterfaceId *string `type:"string" required:"true"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The application key. This applies to the GRE protocol. + GreKey *int64 `type:"integer"` + + // The ID of the trunk network interface. + // + // TrunkInterfaceId is a required field + TrunkInterfaceId *string `type:"string" required:"true"` + + // The ID of the VLAN. This applies to the VLAN protocol. + VlanId *int64 `type:"integer"` +} + +// String returns the string representation +func (s AssociateTrunkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTrunkInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateTrunkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateTrunkInterfaceInput"} + if s.BranchInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("BranchInterfaceId")) + } + if s.TrunkInterfaceId == nil { + invalidParams.Add(request.NewErrParamRequired("TrunkInterfaceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBranchInterfaceId sets the BranchInterfaceId field's value. +func (s *AssociateTrunkInterfaceInput) SetBranchInterfaceId(v string) *AssociateTrunkInterfaceInput { + s.BranchInterfaceId = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *AssociateTrunkInterfaceInput) SetClientToken(v string) *AssociateTrunkInterfaceInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *AssociateTrunkInterfaceInput) SetDryRun(v bool) *AssociateTrunkInterfaceInput { + s.DryRun = &v + return s +} + +// SetGreKey sets the GreKey field's value. +func (s *AssociateTrunkInterfaceInput) SetGreKey(v int64) *AssociateTrunkInterfaceInput { + s.GreKey = &v + return s +} + +// SetTrunkInterfaceId sets the TrunkInterfaceId field's value. +func (s *AssociateTrunkInterfaceInput) SetTrunkInterfaceId(v string) *AssociateTrunkInterfaceInput { + s.TrunkInterfaceId = &v + return s +} + +// SetVlanId sets the VlanId field's value. +func (s *AssociateTrunkInterfaceInput) SetVlanId(v int64) *AssociateTrunkInterfaceInput { + s.VlanId = &v + return s +} + +type AssociateTrunkInterfaceOutput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // Information about the association between the trunk network interface and + // branch network interface. + InterfaceAssociation *TrunkInterfaceAssociation `locationName:"interfaceAssociation" type:"structure"` +} + +// String returns the string representation +func (s AssociateTrunkInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AssociateTrunkInterfaceOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *AssociateTrunkInterfaceOutput) SetClientToken(v string) *AssociateTrunkInterfaceOutput { + s.ClientToken = &v + return s +} + +// SetInterfaceAssociation sets the InterfaceAssociation field's value. +func (s *AssociateTrunkInterfaceOutput) SetInterfaceAssociation(v *TrunkInterfaceAssociation) *AssociateTrunkInterfaceOutput { + s.InterfaceAssociation = v + return s +} + type AssociateVpcCidrBlockInput struct { _ struct{} `type:"structure"` @@ -41740,7 +46228,7 @@ type AssociatedRole struct { // The key of the Amazon S3 object ey where the certificate, certificate chain, // and encrypted private key bundle is stored. The object key is formated as - // follows: certificate_arn/role_arn. + // follows: role_arn/certificate_arn. CertificateS3ObjectKey *string `locationName:"certificateS3ObjectKey" type:"string"` // The ID of the KMS customer master key (CMK) used to encrypt the private key. @@ -41848,6 +46336,77 @@ func (s *AssociationStatus) SetMessage(v string) *AssociationStatus { return s } +// Describes integration options for Amazon Athena. +type AthenaIntegration struct { + _ struct{} `type:"structure"` + + // The location in Amazon S3 to store the generated CloudFormation template. + // + // IntegrationResultS3DestinationArn is a required field + IntegrationResultS3DestinationArn *string `type:"string" required:"true"` + + // The end date for the partition. + PartitionEndDate *time.Time `type:"timestamp"` + + // The schedule for adding new partitions to the table. + // + // PartitionLoadFrequency is a required field + PartitionLoadFrequency *string `type:"string" required:"true" enum:"PartitionLoadFrequency"` + + // The start date for the partition. + PartitionStartDate *time.Time `type:"timestamp"` +} + +// String returns the string representation +func (s AthenaIntegration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AthenaIntegration) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AthenaIntegration) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AthenaIntegration"} + if s.IntegrationResultS3DestinationArn == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrationResultS3DestinationArn")) + } + if s.PartitionLoadFrequency == nil { + invalidParams.Add(request.NewErrParamRequired("PartitionLoadFrequency")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIntegrationResultS3DestinationArn sets the IntegrationResultS3DestinationArn field's value. +func (s *AthenaIntegration) SetIntegrationResultS3DestinationArn(v string) *AthenaIntegration { + s.IntegrationResultS3DestinationArn = &v + return s +} + +// SetPartitionEndDate sets the PartitionEndDate field's value. +func (s *AthenaIntegration) SetPartitionEndDate(v time.Time) *AthenaIntegration { + s.PartitionEndDate = &v + return s +} + +// SetPartitionLoadFrequency sets the PartitionLoadFrequency field's value. +func (s *AthenaIntegration) SetPartitionLoadFrequency(v string) *AthenaIntegration { + s.PartitionLoadFrequency = &v + return s +} + +// SetPartitionStartDate sets the PartitionStartDate field's value. +func (s *AthenaIntegration) SetPartitionStartDate(v time.Time) *AthenaIntegration { + s.PartitionStartDate = &v + return s +} + type AttachClassicLinkVpcInput struct { _ struct{} `type:"structure"` @@ -42603,6 +47162,9 @@ type AuthorizeSecurityGroupEgressInput struct { // group. SourceSecurityGroupOwnerId *string `locationName:"sourceSecurityGroupOwnerId" type:"string"` + // The tags applied to the security group rule. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + // Not supported. Use a set of IP permissions to specify the port. ToPort *int64 `locationName:"toPort" type:"integer"` } @@ -42678,6 +47240,12 @@ func (s *AuthorizeSecurityGroupEgressInput) SetSourceSecurityGroupOwnerId(v stri return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *AuthorizeSecurityGroupEgressInput) SetTagSpecifications(v []*TagSpecification) *AuthorizeSecurityGroupEgressInput { + s.TagSpecifications = v + return s +} + // SetToPort sets the ToPort field's value. func (s *AuthorizeSecurityGroupEgressInput) SetToPort(v int64) *AuthorizeSecurityGroupEgressInput { s.ToPort = &v @@ -42686,6 +47254,12 @@ func (s *AuthorizeSecurityGroupEgressInput) SetToPort(v int64) *AuthorizeSecurit type AuthorizeSecurityGroupEgressOutput struct { _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, returns an error. + Return *bool `locationName:"return" type:"boolean"` + + // Information about the outbound (egress) security group rules that were added. + SecurityGroupRules []*SecurityGroupRule `locationName:"securityGroupRuleSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -42698,6 +47272,18 @@ func (s AuthorizeSecurityGroupEgressOutput) GoString() string { return s.String() } +// SetReturn sets the Return field's value. +func (s *AuthorizeSecurityGroupEgressOutput) SetReturn(v bool) *AuthorizeSecurityGroupEgressOutput { + s.Return = &v + return s +} + +// SetSecurityGroupRules sets the SecurityGroupRules field's value. +func (s *AuthorizeSecurityGroupEgressOutput) SetSecurityGroupRules(v []*SecurityGroupRule) *AuthorizeSecurityGroupEgressOutput { + s.SecurityGroupRules = v + return s +} + type AuthorizeSecurityGroupIngressInput struct { _ struct{} `type:"structure"` @@ -42755,14 +47341,18 @@ type AuthorizeSecurityGroupIngressInput struct { // be in the same VPC. SourceSecurityGroupName *string `type:"string"` - // [nondefault VPC] The AWS account ID for the source security group, if the - // source security group is in a different account. You can't specify this parameter - // in combination with the following parameters: the CIDR IP address range, - // the IP protocol, the start of the port range, and the end of the port range. - // Creates rules that grant full ICMP, UDP, and TCP access. To create a rule - // with a specific IP protocol and port range, use a set of IP permissions instead. + // [nondefault VPC] The Amazon Web Services account ID for the source security + // group, if the source security group is in a different account. You can't + // specify this parameter in combination with the following parameters: the + // CIDR IP address range, the IP protocol, the start of the port range, and + // the end of the port range. Creates rules that grant full ICMP, UDP, and TCP + // access. To create a rule with a specific IP protocol and port range, use + // a set of IP permissions instead. SourceSecurityGroupOwnerId *string `type:"string"` + // [VPC Only] The tags applied to the security group rule. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + // The end of port range for the TCP and UDP protocols, or an ICMP code number. // For the ICMP code number, use -1 to specify all codes. If you specify all // ICMP types, you must specify all codes. @@ -42836,6 +47426,12 @@ func (s *AuthorizeSecurityGroupIngressInput) SetSourceSecurityGroupOwnerId(v str return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *AuthorizeSecurityGroupIngressInput) SetTagSpecifications(v []*TagSpecification) *AuthorizeSecurityGroupIngressInput { + s.TagSpecifications = v + return s +} + // SetToPort sets the ToPort field's value. func (s *AuthorizeSecurityGroupIngressInput) SetToPort(v int64) *AuthorizeSecurityGroupIngressInput { s.ToPort = &v @@ -42844,6 +47440,12 @@ func (s *AuthorizeSecurityGroupIngressInput) SetToPort(v int64) *AuthorizeSecuri type AuthorizeSecurityGroupIngressOutput struct { _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, returns an error. + Return *bool `locationName:"return" type:"boolean"` + + // Information about the inbound (ingress) security group rules that were added. + SecurityGroupRules []*SecurityGroupRule `locationName:"securityGroupRuleSet" locationNameList:"item" type:"list"` } // String returns the string representation @@ -42856,6 +47458,18 @@ func (s AuthorizeSecurityGroupIngressOutput) GoString() string { return s.String() } +// SetReturn sets the Return field's value. +func (s *AuthorizeSecurityGroupIngressOutput) SetReturn(v bool) *AuthorizeSecurityGroupIngressOutput { + s.Return = &v + return s +} + +// SetSecurityGroupRules sets the SecurityGroupRules field's value. +func (s *AuthorizeSecurityGroupIngressOutput) SetSecurityGroupRules(v []*SecurityGroupRule) *AuthorizeSecurityGroupIngressOutput { + s.SecurityGroupRules = v + return s +} + // Describes Availability Zones, Local Zones, and Wavelength Zones. type AvailabilityZone struct { _ struct{} `type:"structure"` @@ -43077,8 +47691,7 @@ type BlockDeviceMapping struct { // launched. Ebs *EbsBlockDevice `locationName:"ebs" type:"structure"` - // Suppresses the specified device included in the block device mapping of the - // AMI. + // To omit the device from the block device mapping, specify an empty string. NoDevice *string `locationName:"noDevice" type:"string"` // The virtual device name (ephemeralN). Instance store volumes are numbered @@ -43349,7 +47962,7 @@ func (s *BundleTaskError) SetMessage(v string) *BundleTaskError { } // Information about an address range that is provisioned for use with your -// AWS resources through bring your own IP addresses (BYOIP). +// Amazon Web Services resources through bring your own IP addresses (BYOIP). type ByoipCidr struct { _ struct{} `type:"structure"` @@ -44208,9 +48821,16 @@ type CapacityReservation struct { // The type of instance for which the Capacity Reservation reserves capacity. InstanceType *string `locationName:"instanceType" type:"string"` - // The ID of the AWS account that owns the Capacity Reservation. + // The Amazon Resource Name (ARN) of the Outpost on which the Capacity Reservation + // was created. + OutpostArn *string `locationName:"outpostArn" type:"string"` + + // The ID of the account that owns the Capacity Reservation. OwnerId *string `locationName:"ownerId" type:"string"` + // The date and time at which the Capacity Reservation was started. + StartDate *time.Time `locationName:"startDate" type:"timestamp"` + // The current state of the Capacity Reservation. A Capacity Reservation can // be in one of the following states: // @@ -44221,8 +48841,8 @@ type CapacityReservation struct { // and time specified in your request. The reserved capacity is no longer // available for your use. // - // * cancelled - The Capacity Reservation was manually cancelled. The reserved - // capacity is no longer available for your use. + // * cancelled - The Capacity Reservation was cancelled. The reserved capacity + // is no longer available for your use. // // * pending - The Capacity Reservation request was successful but the capacity // provisioning is still pending. @@ -44239,10 +48859,10 @@ type CapacityReservation struct { // can have one of the following tenancy settings: // // * default - The Capacity Reservation is created on hardware that is shared - // with other AWS accounts. + // with other accounts. // // * dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single AWS account. + // that is dedicated to a single account. Tenancy *string `locationName:"tenancy" type:"string" enum:"CapacityReservationTenancy"` // The total number of instances for which the Capacity Reservation reserves @@ -44338,12 +48958,24 @@ func (s *CapacityReservation) SetInstanceType(v string) *CapacityReservation { return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *CapacityReservation) SetOutpostArn(v string) *CapacityReservation { + s.OutpostArn = &v + return s +} + // SetOwnerId sets the OwnerId field's value. func (s *CapacityReservation) SetOwnerId(v string) *CapacityReservation { s.OwnerId = &v return s } +// SetStartDate sets the StartDate field's value. +func (s *CapacityReservation) SetStartDate(v time.Time) *CapacityReservation { + s.StartDate = &v + return s +} + // SetState sets the State field's value. func (s *CapacityReservation) SetState(v string) *CapacityReservation { s.State = &v @@ -44375,7 +49007,7 @@ type CapacityReservationGroup struct { // The ARN of the resource group. GroupArn *string `locationName:"groupArn" type:"string"` - // The ID of the AWS account that owns the resource group. + // The ID of the account that owns the resource group. OwnerId *string `locationName:"ownerId" type:"string"` } @@ -44408,9 +49040,9 @@ func (s *CapacityReservationGroup) SetOwnerId(v string) *CapacityReservationGrou // // For more information about Capacity Reservations, see On-Demand Capacity // Reservations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon Elastic Compute Cloud User Guide. For examples of using Capacity -// Reservations in an EC2 Fleet, see EC2 Fleet example configurations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. For examples of using Capacity Reservations +// in an EC2 Fleet, see EC2 Fleet example configurations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) +// in the Amazon EC2 User Guide. type CapacityReservationOptions struct { _ struct{} `type:"structure"` @@ -44453,9 +49085,9 @@ func (s *CapacityReservationOptions) SetUsageStrategy(v string) *CapacityReserva // // For more information about Capacity Reservations, see On-Demand Capacity // Reservations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html) -// in the Amazon Elastic Compute Cloud User Guide. For examples of using Capacity -// Reservations in an EC2 Fleet, see EC2 Fleet example configurations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. For examples of using Capacity Reservations +// in an EC2 Fleet, see EC2 Fleet example configurations (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-examples.html) +// in the Amazon EC2 User Guide. type CapacityReservationOptionsRequest struct { _ struct{} `type:"structure"` @@ -44763,9 +49395,8 @@ func (s *CertificateAuthenticationRequest) SetClientRootCertificateChainArn(v st } // Provides authorization for Amazon to bring a specific IP address range to -// a specific AWS account using bring your own IP addresses (BYOIP). For more -// information, see Prepare to Bring Your Address Range to Your AWS Account -// (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip) +// a specific account using bring your own IP addresses (BYOIP). For more information, +// see Configuring your BYOIP address range (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-byoip.html#prepare-for-byoip) // in the Amazon Elastic Compute Cloud User Guide. type CidrAuthorizationContext struct { _ struct{} `type:"structure"` @@ -46055,7 +50686,7 @@ func (s *ConfirmProductInstanceInput) SetProductCode(v string) *ConfirmProductIn type ConfirmProductInstanceOutput struct { _ struct{} `type:"structure"` - // The AWS account ID of the instance owner. This is only present if the product + // The account ID of the instance owner. This is only present if the product // code is attached to the instance. OwnerId *string `locationName:"ownerId" type:"string"` @@ -46456,13 +51087,23 @@ type CopyImageInput struct { _ struct{} `type:"structure"` // Unique, case-sensitive identifier you provide to ensure idempotency of the - // request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) - // in the Amazon Elastic Compute Cloud User Guide. + // request. For more information, see Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) + // in the Amazon EC2 API Reference. ClientToken *string `type:"string"` // A description for the new AMI in the destination Region. Description *string `type:"string"` + // The Amazon Resource Name (ARN) of the Outpost to which to copy the AMI. Only + // specify this parameter when copying an AMI from an AWS Region to an Outpost. + // The AMI must be in the Region of the destination Outpost. You cannot copy + // an AMI from an Outpost to a Region, from one Outpost to another, or within + // the same Outpost. + // + // For more information, see Copying AMIs from an AWS Region to an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-amis) + // in the Amazon Elastic Compute Cloud User Guide. + DestinationOutpostArn *string `type:"string"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -46558,6 +51199,12 @@ func (s *CopyImageInput) SetDescription(v string) *CopyImageInput { return s } +// SetDestinationOutpostArn sets the DestinationOutpostArn field's value. +func (s *CopyImageInput) SetDestinationOutpostArn(v string) *CopyImageInput { + s.DestinationOutpostArn = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *CopyImageInput) SetDryRun(v bool) *CopyImageInput { s.DryRun = &v @@ -46624,14 +51271,25 @@ type CopySnapshotInput struct { // A description for the EBS snapshot. Description *string `type:"string"` + // The Amazon Resource Name (ARN) of the Outpost to which to copy the snapshot. + // Only specify this parameter when copying a snapshot from an Amazon Web Services + // Region to an Outpost. The snapshot must be in the Region for the destination + // Outpost. You cannot copy a snapshot from an Outpost to a Region, from one + // Outpost to another, or within the same Outpost. + // + // For more information, see Copy snapshots from an Amazon Web Services Region + // to an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#copy-snapshots) + // in the Amazon Elastic Compute Cloud User Guide. + DestinationOutpostArn *string `type:"string"` + // The destination Region to use in the PresignedUrl parameter of a snapshot // copy operation. This parameter is only valid for specifying the destination // Region in a PresignedUrl parameter, where it is required. // // The snapshot copy is sent to the regional endpoint that you sent the HTTP - // request to (for example, ec2.us-east-1.amazonaws.com). With the AWS CLI, - // this is specified using the --region parameter or the default Region in your - // AWS configuration file. + // request to (for example, ec2.us-east-1.amazonaws.com). With the CLI, this + // is specified using the --region parameter or the default Region in your Amazon + // Web Services configuration file. DestinationRegion *string `locationName:"destinationRegion" type:"string"` // Checks whether you have the required permissions for the action, without @@ -46648,12 +51306,11 @@ type CopySnapshotInput struct { // in the Amazon Elastic Compute Cloud User Guide. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The identifier of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, - // your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted - // state must be true. + // The identifier of the Key Management Service (KMS) KMS key to use for Amazon + // EBS encryption. If this parameter is not specified, your KMS key for Amazon + // EBS is used. If KmsKeyId is specified, the encrypted state must be true. // - // You can specify the CMK using any of the following: + // You can specify the KMS key using any of the following: // // * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. // @@ -46663,9 +51320,9 @@ type CopySnapshotInput struct { // // * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. // - // AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, - // alias, or ARN that is not valid, the action can appear to complete, but eventually - // fails. + // Amazon Web Services authenticates the KMS key asynchronously. Therefore, + // if you specify an ID, alias, or ARN that is not valid, the action can appear + // to complete, but eventually fails. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // When you copy an encrypted source snapshot using the Amazon EC2 Query API, @@ -46674,10 +51331,11 @@ type CopySnapshotInput struct { // // The PresignedUrl should use the snapshot source endpoint, the CopySnapshot // action, and include the SourceRegion, SourceSnapshotId, and DestinationRegion - // parameters. The PresignedUrl must be signed using AWS Signature Version 4. - // Because EBS snapshots are stored in Amazon S3, the signing algorithm for - // this parameter uses the same logic that is described in Authenticating Requests: - // Using Query Parameters (AWS Signature Version 4) (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) + // parameters. The PresignedUrl must be signed using Amazon Web Services Signature + // Version 4. Because EBS snapshots are stored in Amazon S3, the signing algorithm + // for this parameter uses the same logic that is described in Authenticating + // Requests: Using Query Parameters (Amazon Web Services Signature Version 4) + // (https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html) // in the Amazon Simple Storage Service API Reference. An invalid or improperly // signed PresignedUrl will cause the copy operation to fail asynchronously, // and the snapshot will move to an error state. @@ -46729,6 +51387,12 @@ func (s *CopySnapshotInput) SetDescription(v string) *CopySnapshotInput { return s } +// SetDestinationOutpostArn sets the DestinationOutpostArn field's value. +func (s *CopySnapshotInput) SetDestinationOutpostArn(v string) *CopySnapshotInput { + s.DestinationOutpostArn = &v + return s +} + // SetDestinationRegion sets the DestinationRegion field's value. func (s *CopySnapshotInput) SetDestinationRegion(v string) *CopySnapshotInput { s.DestinationRegion = &v @@ -46887,7 +51551,7 @@ type CreateCapacityReservationInput struct { AvailabilityZoneId *string `type:"string"` // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // of the request. For more information, see Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` // Checks whether you have the required permissions for the action, without @@ -46959,12 +51623,16 @@ type CreateCapacityReservationInput struct { InstancePlatform *string `type:"string" required:"true" enum:"CapacityReservationInstancePlatform"` // The instance type for which to reserve capacity. For more information, see - // Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. // // InstanceType is a required field InstanceType *string `type:"string" required:"true"` + // The Amazon Resource Name (ARN) of the Outpost on which to create the Capacity + // Reservation. + OutpostArn *string `type:"string"` + // The tags to apply to the Capacity Reservation during launch. TagSpecifications []*TagSpecification `locationNameList:"item" type:"list"` @@ -46972,10 +51640,10 @@ type CreateCapacityReservationInput struct { // can have one of the following tenancy settings: // // * default - The Capacity Reservation is created on hardware that is shared - // with other AWS accounts. + // with other accounts. // // * dedicated - The Capacity Reservation is created on single-tenant hardware - // that is dedicated to a single AWS account. + // that is dedicated to a single account. Tenancy *string `type:"string" enum:"CapacityReservationTenancy"` } @@ -47080,6 +51748,12 @@ func (s *CreateCapacityReservationInput) SetInstanceType(v string) *CreateCapaci return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *CreateCapacityReservationInput) SetOutpostArn(v string) *CreateCapacityReservationInput { + s.OutpostArn = &v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateCapacityReservationInput) SetTagSpecifications(v []*TagSpecification) *CreateCapacityReservationInput { s.TagSpecifications = v @@ -48106,6 +52780,9 @@ type CreateFleetInput struct { // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` + // Reserved. + Context *string `type:"string"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -48125,16 +52802,24 @@ type CreateFleetInput struct { // Describes the configuration of On-Demand Instances in an EC2 Fleet. OnDemandOptions *OnDemandOptionsRequest `type:"structure"` - // Indicates whether EC2 Fleet should replace unhealthy instances. + // Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported + // only for fleets of type maintain. For more information, see EC2 Fleet health + // checks (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) + // in the Amazon EC2 User Guide. ReplaceUnhealthyInstances *bool `type:"boolean"` // Describes the configuration of Spot Instances in an EC2 Fleet. SpotOptions *SpotOptionsRequest `type:"structure"` - // The key-value pair for tagging the EC2 Fleet request on creation. The value - // for ResourceType must be fleet, otherwise the fleet request fails. To tag - // instances at launch, specify the tags in the launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). - // For information about tagging after launch, see Tagging your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). + // The key-value pair for tagging the EC2 Fleet request on creation. For more + // information, see Tagging your resources (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources). + // + // If the fleet type is instant, specify a resource type of fleet to tag the + // fleet or instance to tag the instances at launch. + // + // If the fleet type is maintain or request, specify a resource type of fleet + // to tag the fleet. You cannot specify a resource type of instance. To tag + // instances at launch, specify the tags in a launch template (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template). TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The number of units to request. @@ -48146,9 +52831,9 @@ type CreateFleetInput struct { // expires. TerminateInstancesWithExpiration *bool `type:"boolean"` - // The type of request. The default value is maintain. + // The fleet type. The default value is maintain. // - // * maintain - The EC2 Fleet plaees an asynchronous request for your desired + // * maintain - The EC2 Fleet places an asynchronous request for your desired // capacity, and continues to maintain your desired Spot capacity by replenishing // interrupted Spot Instances. // @@ -48162,7 +52847,7 @@ type CreateFleetInput struct { // be launched. // // For more information, see EC2 Fleet request types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-request-type) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. Type *string `type:"string" enum:"FleetType"` // The start date and time of the request, in UTC format (for example, YYYY-MM-DDTHH:MM:SSZ). @@ -48222,6 +52907,12 @@ func (s *CreateFleetInput) SetClientToken(v string) *CreateFleetInput { return s } +// SetContext sets the Context field's value. +func (s *CreateFleetInput) SetContext(v string) *CreateFleetInput { + s.Context = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *CreateFleetInput) SetDryRun(v bool) *CreateFleetInput { s.DryRun = &v @@ -48361,14 +53052,14 @@ type CreateFleetOutput struct { _ struct{} `type:"structure"` // Information about the instances that could not be launched by the fleet. - // Valid only when Type is set to instant. + // Supported only for fleets of type instant. Errors []*CreateFleetError `locationName:"errorSet" locationNameList:"item" type:"list"` // The ID of the EC2 Fleet. FleetId *string `locationName:"fleetId" type:"string"` - // Information about the instances that were launched by the fleet. Valid only - // when Type is set to instant. + // Information about the instances that were launched by the fleet. Supported + // only for fleets of type instant. Instances []*CreateFleetInstance `locationName:"fleetInstanceSet" locationNameList:"item" type:"list"` } @@ -48804,10 +53495,25 @@ type CreateImageInput struct { Name *string `locationName:"name" type:"string" required:"true"` // By default, Amazon EC2 attempts to shut down and reboot the instance before - // creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't - // shut down the instance before creating the image. When this option is used, - // file system integrity on the created image can't be guaranteed. + // creating the image. If the No Reboot option is set, Amazon EC2 doesn't shut + // down the instance before creating the image. When this option is used, file + // system integrity on the created image can't be guaranteed. NoReboot *bool `locationName:"noReboot" type:"boolean"` + + // The tags to apply to the AMI and snapshots on creation. You can tag the AMI, + // the snapshots, or both. + // + // * To tag the AMI, the value for ResourceType must be image. + // + // * To tag the snapshots that are created of the root volume and of other + // EBS volumes that are attached to the instance, the value for ResourceType + // must be snapshot. The same tag is applied to all of the snapshots that + // are created. + // + // If you specify other values for ResourceType, the request fails. + // + // To tag an AMI or snapshot after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } // String returns the string representation @@ -48872,6 +53578,12 @@ func (s *CreateImageInput) SetNoReboot(v bool) *CreateImageInput { return s } +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateImageInput) SetTagSpecifications(v []*TagSpecification) *CreateImageInput { + s.TagSpecifications = v + return s +} + type CreateImageOutput struct { _ struct{} `type:"structure"` @@ -48895,6 +53607,113 @@ func (s *CreateImageOutput) SetImageId(v string) *CreateImageOutput { return s } +type CreateInstanceEventWindowInput struct { + _ struct{} `type:"structure"` + + // The cron expression for the event window, for example, * 0-4,20-23 * * 1,5. + // If you specify a cron expression, you can't specify a time range. + // + // Constraints: + // + // * Only hour and day of the week values are supported. + // + // * For day of the week values, you can specify either integers 0 through + // 6, or alternative single values SUN through SAT. + // + // * The minute, month, and year must be specified by *. + // + // * The hour value must be one or a multiple range, for example, 0-4 or + // 0-4,20-23. + // + // * Each hour range must be >= 2 hours, for example, 0-2 or 20-23. + // + // * The event window must be >= 4 hours. The combined total time ranges + // in the event window must be >= 4 hours. + // + // For more information about cron expressions, see cron (https://en.wikipedia.org/wiki/Cron) + // on the Wikipedia website. + CronExpression *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The name of the event window. + Name *string `type:"string"` + + // The tags to apply to the event window. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The time range for the event window. If you specify a time range, you can't + // specify a cron expression. + TimeRanges []*InstanceEventWindowTimeRangeRequest `locationName:"TimeRange" type:"list"` +} + +// String returns the string representation +func (s CreateInstanceEventWindowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceEventWindowInput) GoString() string { + return s.String() +} + +// SetCronExpression sets the CronExpression field's value. +func (s *CreateInstanceEventWindowInput) SetCronExpression(v string) *CreateInstanceEventWindowInput { + s.CronExpression = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateInstanceEventWindowInput) SetDryRun(v bool) *CreateInstanceEventWindowInput { + s.DryRun = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateInstanceEventWindowInput) SetName(v string) *CreateInstanceEventWindowInput { + s.Name = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateInstanceEventWindowInput) SetTagSpecifications(v []*TagSpecification) *CreateInstanceEventWindowInput { + s.TagSpecifications = v + return s +} + +// SetTimeRanges sets the TimeRanges field's value. +func (s *CreateInstanceEventWindowInput) SetTimeRanges(v []*InstanceEventWindowTimeRangeRequest) *CreateInstanceEventWindowInput { + s.TimeRanges = v + return s +} + +type CreateInstanceEventWindowOutput struct { + _ struct{} `type:"structure"` + + // Information about the event window. + InstanceEventWindow *InstanceEventWindow `locationName:"instanceEventWindow" type:"structure"` +} + +// String returns the string representation +func (s CreateInstanceEventWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateInstanceEventWindowOutput) GoString() string { + return s.String() +} + +// SetInstanceEventWindow sets the InstanceEventWindow field's value. +func (s *CreateInstanceEventWindowOutput) SetInstanceEventWindow(v *InstanceEventWindow) *CreateInstanceEventWindowOutput { + s.InstanceEventWindow = v + return s +} + type CreateInstanceExportTaskInput struct { _ struct{} `type:"structure"` @@ -48902,7 +53721,7 @@ type CreateInstanceExportTaskInput struct { // maximum length is 255 characters. Description *string `locationName:"description" type:"string"` - // The format and location for an instance export task. + // The format and location for an export instance task. // // ExportToS3Task is a required field ExportToS3Task *ExportToS3TaskSpecification `locationName:"exportToS3" type:"structure" required:"true"` @@ -48912,7 +53731,7 @@ type CreateInstanceExportTaskInput struct { // InstanceId is a required field InstanceId *string `locationName:"instanceId" type:"string" required:"true"` - // The tags to apply to the instance export task during creation. + // The tags to apply to the export instance task during creation. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` // The target virtualization environment. @@ -48983,7 +53802,7 @@ func (s *CreateInstanceExportTaskInput) SetTargetEnvironment(v string) *CreateIn type CreateInstanceExportTaskOutput struct { _ struct{} `type:"structure"` - // Information about the instance export task. + // Information about the export instance task. ExportTask *ExportTask `locationName:"exportTask" type:"structure"` } @@ -49810,12 +54629,11 @@ func (s *CreateManagedPrefixListOutput) SetPrefixList(v *ManagedPrefixList) *Cre type CreateNatGatewayInput struct { _ struct{} `type:"structure"` - // The allocation ID of an Elastic IP address to associate with the NAT gateway. - // If the Elastic IP address is associated with another resource, you must first - // disassociate it. - // - // AllocationId is a required field - AllocationId *string `type:"string" required:"true"` + // [Public NAT gateways only] The allocation ID of an Elastic IP address to + // associate with the NAT gateway. You cannot specify an Elastic IP address + // with a private NAT gateway. If the Elastic IP address is associated with + // another resource, you must first disassociate it. + AllocationId *string `type:"string"` // Unique, case-sensitive identifier that you provide to ensure the idempotency // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). @@ -49823,6 +54641,10 @@ type CreateNatGatewayInput struct { // Constraint: Maximum 64 ASCII characters. ClientToken *string `type:"string" idempotencyToken:"true"` + // Indicates whether the NAT gateway supports public or private connectivity. + // The default is public connectivity. + ConnectivityType *string `type:"string" enum:"ConnectivityType"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -49851,9 +54673,6 @@ func (s CreateNatGatewayInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *CreateNatGatewayInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "CreateNatGatewayInput"} - if s.AllocationId == nil { - invalidParams.Add(request.NewErrParamRequired("AllocationId")) - } if s.SubnetId == nil { invalidParams.Add(request.NewErrParamRequired("SubnetId")) } @@ -49876,6 +54695,12 @@ func (s *CreateNatGatewayInput) SetClientToken(v string) *CreateNatGatewayInput return s } +// SetConnectivityType sets the ConnectivityType field's value. +func (s *CreateNatGatewayInput) SetConnectivityType(v string) *CreateNatGatewayInput { + s.ConnectivityType = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *CreateNatGatewayInput) SetDryRun(v bool) *CreateNatGatewayInput { s.DryRun = &v @@ -50180,10 +55005,164 @@ func (s *CreateNetworkAclOutput) SetNetworkAcl(v *NetworkAcl) *CreateNetworkAclO return s } +type CreateNetworkInsightsPathInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // The AWS resource that is the destination of the path. + // + // Destination is a required field + Destination *string `type:"string" required:"true"` + + // The IP address of the AWS resource that is the destination of the path. + DestinationIp *string `type:"string"` + + // The destination port. + DestinationPort *int64 `min:"1" type:"integer"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The protocol. + // + // Protocol is a required field + Protocol *string `type:"string" required:"true" enum:"Protocol"` + + // The AWS resource that is the source of the path. + // + // Source is a required field + Source *string `type:"string" required:"true"` + + // The IP address of the AWS resource that is the source of the path. + SourceIp *string `type:"string"` + + // The tags to add to the path. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s CreateNetworkInsightsPathInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkInsightsPathInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateNetworkInsightsPathInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateNetworkInsightsPathInput"} + if s.Destination == nil { + invalidParams.Add(request.NewErrParamRequired("Destination")) + } + if s.DestinationPort != nil && *s.DestinationPort < 1 { + invalidParams.Add(request.NewErrParamMinValue("DestinationPort", 1)) + } + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + if s.Source == nil { + invalidParams.Add(request.NewErrParamRequired("Source")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateNetworkInsightsPathInput) SetClientToken(v string) *CreateNetworkInsightsPathInput { + s.ClientToken = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *CreateNetworkInsightsPathInput) SetDestination(v string) *CreateNetworkInsightsPathInput { + s.Destination = &v + return s +} + +// SetDestinationIp sets the DestinationIp field's value. +func (s *CreateNetworkInsightsPathInput) SetDestinationIp(v string) *CreateNetworkInsightsPathInput { + s.DestinationIp = &v + return s +} + +// SetDestinationPort sets the DestinationPort field's value. +func (s *CreateNetworkInsightsPathInput) SetDestinationPort(v int64) *CreateNetworkInsightsPathInput { + s.DestinationPort = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateNetworkInsightsPathInput) SetDryRun(v bool) *CreateNetworkInsightsPathInput { + s.DryRun = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *CreateNetworkInsightsPathInput) SetProtocol(v string) *CreateNetworkInsightsPathInput { + s.Protocol = &v + return s +} + +// SetSource sets the Source field's value. +func (s *CreateNetworkInsightsPathInput) SetSource(v string) *CreateNetworkInsightsPathInput { + s.Source = &v + return s +} + +// SetSourceIp sets the SourceIp field's value. +func (s *CreateNetworkInsightsPathInput) SetSourceIp(v string) *CreateNetworkInsightsPathInput { + s.SourceIp = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateNetworkInsightsPathInput) SetTagSpecifications(v []*TagSpecification) *CreateNetworkInsightsPathInput { + s.TagSpecifications = v + return s +} + +type CreateNetworkInsightsPathOutput struct { + _ struct{} `type:"structure"` + + // Information about the path. + NetworkInsightsPath *NetworkInsightsPath `locationName:"networkInsightsPath" type:"structure"` +} + +// String returns the string representation +func (s CreateNetworkInsightsPathOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateNetworkInsightsPathOutput) GoString() string { + return s.String() +} + +// SetNetworkInsightsPath sets the NetworkInsightsPath field's value. +func (s *CreateNetworkInsightsPathOutput) SetNetworkInsightsPath(v *NetworkInsightsPath) *CreateNetworkInsightsPathOutput { + s.NetworkInsightsPath = v + return s +} + // Contains the parameters for CreateNetworkInterface. type CreateNetworkInterfaceInput struct { _ struct{} `type:"structure"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + // A description for the network interface. Description *string `locationName:"description" type:"string"` @@ -50198,7 +55177,10 @@ type CreateNetworkInterfaceInput struct { // Indicates the type of network interface. To create an Elastic Fabric Adapter // (EFA), specify efa. For more information, see Elastic Fabric Adapter (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon Elastic Compute Cloud User Guide. To create a trunk network + // interface, specify efa. For more information, see Network interface trunking + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/eni-trunking.html) in + // the Amazon Elastic Compute Cloud User Guide. InterfaceType *string `type:"string" enum:"NetworkInterfaceCreationType"` // The number of IPv6 addresses to assign to a network interface. Amazon EC2 @@ -50265,6 +55247,12 @@ func (s *CreateNetworkInterfaceInput) Validate() error { return nil } +// SetClientToken sets the ClientToken field's value. +func (s *CreateNetworkInterfaceInput) SetClientToken(v string) *CreateNetworkInterfaceInput { + s.ClientToken = &v + return s +} + // SetDescription sets the Description field's value. func (s *CreateNetworkInterfaceInput) SetDescription(v string) *CreateNetworkInterfaceInput { s.Description = &v @@ -50335,6 +55323,10 @@ func (s *CreateNetworkInterfaceInput) SetTagSpecifications(v []*TagSpecification type CreateNetworkInterfaceOutput struct { _ struct{} `type:"structure"` + // The token to use to retrieve the next page of results. This value is null + // when there are no more results to return. + ClientToken *string `locationName:"clientToken" type:"string"` + // Information about the network interface. NetworkInterface *NetworkInterface `locationName:"networkInterface" type:"structure"` } @@ -50349,6 +55341,12 @@ func (s CreateNetworkInterfaceOutput) GoString() string { return s.String() } +// SetClientToken sets the ClientToken field's value. +func (s *CreateNetworkInterfaceOutput) SetClientToken(v string) *CreateNetworkInterfaceOutput { + s.ClientToken = &v + return s +} + // SetNetworkInterface sets the NetworkInterface field's value. func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface) *CreateNetworkInterfaceOutput { s.NetworkInterface = v @@ -50359,10 +55357,10 @@ func (s *CreateNetworkInterfaceOutput) SetNetworkInterface(v *NetworkInterface) type CreateNetworkInterfacePermissionInput struct { _ struct{} `type:"structure"` - // The AWS account ID. + // The account ID. AwsAccountId *string `type:"string"` - // The AWS service. Currently not supported. + // The Amazon Web Service. Currently not supported. AwsService *string `type:"string"` // Checks whether you have the required permissions for the action, without @@ -50550,6 +55548,111 @@ func (s *CreatePlacementGroupOutput) SetPlacementGroup(v *PlacementGroup) *Creat return s } +type CreateReplaceRootVolumeTaskInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier you provide to ensure the idempotency of + // the request. If you do not specify a client token, a randomly generated token + // is used for the request to ensure idempotency. For more information, see + // Ensuring idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the instance for which to replace the root volume. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // The ID of the snapshot from which to restore the replacement root volume. + // If you want to restore the volume to the initial launch state, omit this + // parameter. + SnapshotId *string `type:"string"` + + // The tags to apply to the root volume replacement task. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s CreateReplaceRootVolumeTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateReplaceRootVolumeTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateReplaceRootVolumeTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateReplaceRootVolumeTaskInput"} + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *CreateReplaceRootVolumeTaskInput) SetClientToken(v string) *CreateReplaceRootVolumeTaskInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateReplaceRootVolumeTaskInput) SetDryRun(v bool) *CreateReplaceRootVolumeTaskInput { + s.DryRun = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *CreateReplaceRootVolumeTaskInput) SetInstanceId(v string) *CreateReplaceRootVolumeTaskInput { + s.InstanceId = &v + return s +} + +// SetSnapshotId sets the SnapshotId field's value. +func (s *CreateReplaceRootVolumeTaskInput) SetSnapshotId(v string) *CreateReplaceRootVolumeTaskInput { + s.SnapshotId = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateReplaceRootVolumeTaskInput) SetTagSpecifications(v []*TagSpecification) *CreateReplaceRootVolumeTaskInput { + s.TagSpecifications = v + return s +} + +type CreateReplaceRootVolumeTaskOutput struct { + _ struct{} `type:"structure"` + + // Information about the root volume replacement task. + ReplaceRootVolumeTask *ReplaceRootVolumeTask `locationName:"replaceRootVolumeTask" type:"structure"` +} + +// String returns the string representation +func (s CreateReplaceRootVolumeTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateReplaceRootVolumeTaskOutput) GoString() string { + return s.String() +} + +// SetReplaceRootVolumeTask sets the ReplaceRootVolumeTask field's value. +func (s *CreateReplaceRootVolumeTaskOutput) SetReplaceRootVolumeTask(v *ReplaceRootVolumeTask) *CreateReplaceRootVolumeTaskOutput { + s.ReplaceRootVolumeTask = v + return s +} + // Contains the parameters for CreateReservedInstancesListing. type CreateReservedInstancesListingInput struct { _ struct{} `type:"structure"` @@ -50661,6 +55764,119 @@ func (s *CreateReservedInstancesListingOutput) SetReservedInstancesListings(v [] return s } +type CreateRestoreImageTaskInput struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket that contains the stored AMI object. + // + // Bucket is a required field + Bucket *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The name for the restored AMI. The name must be unique for AMIs in the Region + // for this account. If you do not provide a name, the new AMI gets the same + // name as the original AMI. + Name *string `type:"string"` + + // The name of the stored AMI object in the bucket. + // + // ObjectKey is a required field + ObjectKey *string `type:"string" required:"true"` + + // The tags to apply to the AMI and snapshots on restoration. You can tag the + // AMI, the snapshots, or both. + // + // * To tag the AMI, the value for ResourceType must be image. + // + // * To tag the snapshots, the value for ResourceType must be snapshot. The + // same tag is applied to all of the snapshots that are created. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s CreateRestoreImageTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRestoreImageTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateRestoreImageTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateRestoreImageTaskInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.ObjectKey == nil { + invalidParams.Add(request.NewErrParamRequired("ObjectKey")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *CreateRestoreImageTaskInput) SetBucket(v string) *CreateRestoreImageTaskInput { + s.Bucket = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateRestoreImageTaskInput) SetDryRun(v bool) *CreateRestoreImageTaskInput { + s.DryRun = &v + return s +} + +// SetName sets the Name field's value. +func (s *CreateRestoreImageTaskInput) SetName(v string) *CreateRestoreImageTaskInput { + s.Name = &v + return s +} + +// SetObjectKey sets the ObjectKey field's value. +func (s *CreateRestoreImageTaskInput) SetObjectKey(v string) *CreateRestoreImageTaskInput { + s.ObjectKey = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateRestoreImageTaskInput) SetTagSpecifications(v []*TagSpecification) *CreateRestoreImageTaskInput { + s.TagSpecifications = v + return s +} + +type CreateRestoreImageTaskOutput struct { + _ struct{} `type:"structure"` + + // The AMI ID. + ImageId *string `locationName:"imageId" type:"string"` +} + +// String returns the string representation +func (s CreateRestoreImageTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateRestoreImageTaskOutput) GoString() string { + return s.String() +} + +// SetImageId sets the ImageId field's value. +func (s *CreateRestoreImageTaskOutput) SetImageId(v string) *CreateRestoreImageTaskOutput { + s.ImageId = &v + return s +} + type CreateRouteInput struct { _ struct{} `type:"structure"` @@ -51080,10 +56296,29 @@ type CreateSnapshotInput struct { // it is UnauthorizedOperation. DryRun *bool `locationName:"dryRun" type:"boolean"` + // The Amazon Resource Name (ARN) of the Outpost on which to create a local + // snapshot. + // + // * To create a snapshot of a volume in a Region, omit this parameter. The + // snapshot is created in the same Region as the volume. + // + // * To create a snapshot of a volume on an Outpost and store the snapshot + // in the Region, omit this parameter. The snapshot is created in the Region + // for the Outpost. + // + // * To create a snapshot of a volume on an Outpost and store the snapshot + // on an Outpost, specify the ARN of the destination Outpost. The snapshot + // must be created on the same Outpost as the volume. + // + // For more information, see Create local snapshots from volumes on an Outpost + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-snapshot) + // in the Amazon Elastic Compute Cloud User Guide. + OutpostArn *string `type:"string"` + // The tags to apply to the snapshot during creation. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` - // The ID of the EBS volume. + // The ID of the Amazon EBS volume. // // VolumeId is a required field VolumeId *string `type:"string" required:"true"` @@ -51124,6 +56359,12 @@ func (s *CreateSnapshotInput) SetDryRun(v bool) *CreateSnapshotInput { return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *CreateSnapshotInput) SetOutpostArn(v string) *CreateSnapshotInput { + s.OutpostArn = &v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateSnapshotInput) SetTagSpecifications(v []*TagSpecification) *CreateSnapshotInput { s.TagSpecifications = v @@ -51156,6 +56397,25 @@ type CreateSnapshotsInput struct { // InstanceSpecification is a required field InstanceSpecification *InstanceSpecification `type:"structure" required:"true"` + // The Amazon Resource Name (ARN) of the Outpost on which to create the local + // snapshots. + // + // * To create snapshots from an instance in a Region, omit this parameter. + // The snapshots are created in the same Region as the instance. + // + // * To create snapshots from an instance on an Outpost and store the snapshots + // in the Region, omit this parameter. The snapshots are created in the Region + // for the Outpost. + // + // * To create snapshots from an instance on an Outpost and store the snapshots + // on an Outpost, specify the ARN of the destination Outpost. The snapshots + // must be created on the same Outpost as the instance. + // + // For more information, see Create multi-volume local snapshots from instances + // on an Outpost (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#create-multivol-snapshot) + // in the Amazon Elastic Compute Cloud User Guide. + OutpostArn *string `type:"string"` + // Tags to apply to every snapshot specified by the instance. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } @@ -51207,6 +56467,12 @@ func (s *CreateSnapshotsInput) SetInstanceSpecification(v *InstanceSpecification return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *CreateSnapshotsInput) SetOutpostArn(v string) *CreateSnapshotsInput { + s.OutpostArn = &v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateSnapshotsInput) SetTagSpecifications(v []*TagSpecification) *CreateSnapshotsInput { s.TagSpecifications = v @@ -51323,6 +56589,104 @@ func (s *CreateSpotDatafeedSubscriptionOutput) SetSpotDatafeedSubscription(v *Sp return s } +type CreateStoreImageTaskInput struct { + _ struct{} `type:"structure"` + + // The name of the S3 bucket in which the AMI object will be stored. The bucket + // must be in the Region in which the request is being made. The AMI object + // appears in the bucket only after the upload task has completed. + // + // Bucket is a required field + Bucket *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AMI. + // + // ImageId is a required field + ImageId *string `type:"string" required:"true"` + + // The tags to apply to the AMI object that will be stored in the S3 bucket. + S3ObjectTags []*S3ObjectTag `locationName:"S3ObjectTag" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s CreateStoreImageTaskInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStoreImageTaskInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateStoreImageTaskInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateStoreImageTaskInput"} + if s.Bucket == nil { + invalidParams.Add(request.NewErrParamRequired("Bucket")) + } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBucket sets the Bucket field's value. +func (s *CreateStoreImageTaskInput) SetBucket(v string) *CreateStoreImageTaskInput { + s.Bucket = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateStoreImageTaskInput) SetDryRun(v bool) *CreateStoreImageTaskInput { + s.DryRun = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *CreateStoreImageTaskInput) SetImageId(v string) *CreateStoreImageTaskInput { + s.ImageId = &v + return s +} + +// SetS3ObjectTags sets the S3ObjectTags field's value. +func (s *CreateStoreImageTaskInput) SetS3ObjectTags(v []*S3ObjectTag) *CreateStoreImageTaskInput { + s.S3ObjectTags = v + return s +} + +type CreateStoreImageTaskOutput struct { + _ struct{} `type:"structure"` + + // The name of the stored AMI object in the S3 bucket. + ObjectKey *string `locationName:"objectKey" type:"string"` +} + +// String returns the string representation +func (s CreateStoreImageTaskOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateStoreImageTaskOutput) GoString() string { + return s.String() +} + +// SetObjectKey sets the ObjectKey field's value. +func (s *CreateStoreImageTaskOutput) SetObjectKey(v string) *CreateStoreImageTaskOutput { + s.ObjectKey = &v + return s +} + type CreateSubnetInput struct { _ struct{} `type:"structure"` @@ -52135,6 +57499,283 @@ func (s *CreateTrafficMirrorTargetOutput) SetTrafficMirrorTarget(v *TrafficMirro return s } +type CreateTransitGatewayConnectInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The Connect attachment options. + // + // Options is a required field + Options *CreateTransitGatewayConnectRequestOptions `type:"structure" required:"true"` + + // The tags to apply to the Connect attachment. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The ID of the transit gateway attachment. You can specify a VPC attachment + // or a AWS Direct Connect attachment. + // + // TransportTransitGatewayAttachmentId is a required field + TransportTransitGatewayAttachmentId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTransitGatewayConnectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayConnectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTransitGatewayConnectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayConnectInput"} + if s.Options == nil { + invalidParams.Add(request.NewErrParamRequired("Options")) + } + if s.TransportTransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransportTransitGatewayAttachmentId")) + } + if s.Options != nil { + if err := s.Options.Validate(); err != nil { + invalidParams.AddNested("Options", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTransitGatewayConnectInput) SetDryRun(v bool) *CreateTransitGatewayConnectInput { + s.DryRun = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *CreateTransitGatewayConnectInput) SetOptions(v *CreateTransitGatewayConnectRequestOptions) *CreateTransitGatewayConnectInput { + s.Options = v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayConnectInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayConnectInput { + s.TagSpecifications = v + return s +} + +// SetTransportTransitGatewayAttachmentId sets the TransportTransitGatewayAttachmentId field's value. +func (s *CreateTransitGatewayConnectInput) SetTransportTransitGatewayAttachmentId(v string) *CreateTransitGatewayConnectInput { + s.TransportTransitGatewayAttachmentId = &v + return s +} + +type CreateTransitGatewayConnectOutput struct { + _ struct{} `type:"structure"` + + // Information about the Connect attachment. + TransitGatewayConnect *TransitGatewayConnect `locationName:"transitGatewayConnect" type:"structure"` +} + +// String returns the string representation +func (s CreateTransitGatewayConnectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayConnectOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayConnect sets the TransitGatewayConnect field's value. +func (s *CreateTransitGatewayConnectOutput) SetTransitGatewayConnect(v *TransitGatewayConnect) *CreateTransitGatewayConnectOutput { + s.TransitGatewayConnect = v + return s +} + +type CreateTransitGatewayConnectPeerInput struct { + _ struct{} `type:"structure"` + + // The BGP options for the Connect peer. + BgpOptions *TransitGatewayConnectRequestBgpOptions `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The range of inside IP addresses that are used for BGP peering. You must + // specify a size /29 IPv4 CIDR block from the 169.254.0.0/16 range. The first + // address from the range must be configured on the appliance as the BGP IP + // address. You can also optionally specify a size /125 IPv6 CIDR block from + // the fd00::/8 range. + // + // InsideCidrBlocks is a required field + InsideCidrBlocks []*string `locationNameList:"item" type:"list" required:"true"` + + // The peer IP address (GRE outer IP address) on the appliance side of the Connect + // peer. + // + // PeerAddress is a required field + PeerAddress *string `type:"string" required:"true"` + + // The tags to apply to the Connect peer. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` + + // The peer IP address (GRE outer IP address) on the transit gateway side of + // the Connect peer, which must be specified from a transit gateway CIDR block. + // If not specified, Amazon automatically assigns the first available IP address + // from the transit gateway CIDR block. + TransitGatewayAddress *string `type:"string"` + + // The ID of the Connect attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s CreateTransitGatewayConnectPeerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayConnectPeerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTransitGatewayConnectPeerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayConnectPeerInput"} + if s.InsideCidrBlocks == nil { + invalidParams.Add(request.NewErrParamRequired("InsideCidrBlocks")) + } + if s.PeerAddress == nil { + invalidParams.Add(request.NewErrParamRequired("PeerAddress")) + } + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBgpOptions sets the BgpOptions field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetBgpOptions(v *TransitGatewayConnectRequestBgpOptions) *CreateTransitGatewayConnectPeerInput { + s.BgpOptions = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetDryRun(v bool) *CreateTransitGatewayConnectPeerInput { + s.DryRun = &v + return s +} + +// SetInsideCidrBlocks sets the InsideCidrBlocks field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetInsideCidrBlocks(v []*string) *CreateTransitGatewayConnectPeerInput { + s.InsideCidrBlocks = v + return s +} + +// SetPeerAddress sets the PeerAddress field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetPeerAddress(v string) *CreateTransitGatewayConnectPeerInput { + s.PeerAddress = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayConnectPeerInput { + s.TagSpecifications = v + return s +} + +// SetTransitGatewayAddress sets the TransitGatewayAddress field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetTransitGatewayAddress(v string) *CreateTransitGatewayConnectPeerInput { + s.TransitGatewayAddress = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *CreateTransitGatewayConnectPeerInput) SetTransitGatewayAttachmentId(v string) *CreateTransitGatewayConnectPeerInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type CreateTransitGatewayConnectPeerOutput struct { + _ struct{} `type:"structure"` + + // Information about the Connect peer. + TransitGatewayConnectPeer *TransitGatewayConnectPeer `locationName:"transitGatewayConnectPeer" type:"structure"` +} + +// String returns the string representation +func (s CreateTransitGatewayConnectPeerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayConnectPeerOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayConnectPeer sets the TransitGatewayConnectPeer field's value. +func (s *CreateTransitGatewayConnectPeerOutput) SetTransitGatewayConnectPeer(v *TransitGatewayConnectPeer) *CreateTransitGatewayConnectPeerOutput { + s.TransitGatewayConnectPeer = v + return s +} + +// The options for a Connect attachment. +type CreateTransitGatewayConnectRequestOptions struct { + _ struct{} `type:"structure"` + + // The tunnel protocol. + // + // Protocol is a required field + Protocol *string `type:"string" required:"true" enum:"ProtocolValue"` +} + +// String returns the string representation +func (s CreateTransitGatewayConnectRequestOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayConnectRequestOptions) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *CreateTransitGatewayConnectRequestOptions) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "CreateTransitGatewayConnectRequestOptions"} + if s.Protocol == nil { + invalidParams.Add(request.NewErrParamRequired("Protocol")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetProtocol sets the Protocol field's value. +func (s *CreateTransitGatewayConnectRequestOptions) SetProtocol(v string) *CreateTransitGatewayConnectRequestOptions { + s.Protocol = &v + return s +} + type CreateTransitGatewayInput struct { _ struct{} `type:"structure"` @@ -52197,6 +57838,9 @@ type CreateTransitGatewayMulticastDomainInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` + // The options for the transit gateway multicast domain. + Options *CreateTransitGatewayMulticastDomainRequestOptions `type:"structure"` + // The tags for the transit gateway multicast domain. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` @@ -52235,6 +57879,12 @@ func (s *CreateTransitGatewayMulticastDomainInput) SetDryRun(v bool) *CreateTran return s } +// SetOptions sets the Options field's value. +func (s *CreateTransitGatewayMulticastDomainInput) SetOptions(v *CreateTransitGatewayMulticastDomainRequestOptions) *CreateTransitGatewayMulticastDomainInput { + s.Options = v + return s +} + // SetTagSpecifications sets the TagSpecifications field's value. func (s *CreateTransitGatewayMulticastDomainInput) SetTagSpecifications(v []*TagSpecification) *CreateTransitGatewayMulticastDomainInput { s.TagSpecifications = v @@ -52270,6 +57920,51 @@ func (s *CreateTransitGatewayMulticastDomainOutput) SetTransitGatewayMulticastDo return s } +// The options for the transit gateway multicast domain. +type CreateTransitGatewayMulticastDomainRequestOptions struct { + _ struct{} `type:"structure"` + + // Indicates whether to automatically accept cross-account subnet associations + // that are associated with the transit gateway multicast domain. + AutoAcceptSharedAssociations *string `type:"string" enum:"AutoAcceptSharedAssociationsValue"` + + // Specify whether to enable Internet Group Management Protocol (IGMP) version + // 2 for the transit gateway multicast domain. + Igmpv2Support *string `type:"string" enum:"Igmpv2SupportValue"` + + // Specify whether to enable support for statically configuring multicast group + // sources for a domain. + StaticSourcesSupport *string `type:"string" enum:"StaticSourcesSupportValue"` +} + +// String returns the string representation +func (s CreateTransitGatewayMulticastDomainRequestOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s CreateTransitGatewayMulticastDomainRequestOptions) GoString() string { + return s.String() +} + +// SetAutoAcceptSharedAssociations sets the AutoAcceptSharedAssociations field's value. +func (s *CreateTransitGatewayMulticastDomainRequestOptions) SetAutoAcceptSharedAssociations(v string) *CreateTransitGatewayMulticastDomainRequestOptions { + s.AutoAcceptSharedAssociations = &v + return s +} + +// SetIgmpv2Support sets the Igmpv2Support field's value. +func (s *CreateTransitGatewayMulticastDomainRequestOptions) SetIgmpv2Support(v string) *CreateTransitGatewayMulticastDomainRequestOptions { + s.Igmpv2Support = &v + return s +} + +// SetStaticSourcesSupport sets the StaticSourcesSupport field's value. +func (s *CreateTransitGatewayMulticastDomainRequestOptions) SetStaticSourcesSupport(v string) *CreateTransitGatewayMulticastDomainRequestOptions { + s.StaticSourcesSupport = &v + return s +} + type CreateTransitGatewayOutput struct { _ struct{} `type:"structure"` @@ -52844,7 +58539,7 @@ type CreateTransitGatewayVpcAttachmentRequestOptions struct { // Enable or disable DNS support. The default is enable. DnsSupport *string `type:"string" enum:"DnsSupportValue"` - // Enable or disable IPv6 support. + // Enable or disable IPv6 support. The default is disable. Ipv6Support *string `type:"string" enum:"Ipv6SupportValue"` } @@ -52884,6 +58579,10 @@ type CreateVolumeInput struct { // AvailabilityZone is a required field AvailabilityZone *string `type:"string" required:"true"` + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -52913,21 +58612,20 @@ type CreateVolumeInput struct { // // * io2: 100-64,000 IOPS // - // For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built - // on the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. + // io1 and io2 volumes support up to 64,000 IOPS only on Instances built on + // the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). + // Other instance families support performance up to 32,000 IOPS. // // This parameter is required for io1 and io2 volumes. The default for gp3 volumes // is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard // volumes. Iops *int64 `type:"integer"` - // The identifier of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, - // your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted - // state must be true. + // The identifier of the Key Management Service (KMS) KMS key to use for Amazon + // EBS encryption. If this parameter is not specified, your KMS key for Amazon + // EBS is used. If KmsKeyId is specified, the encrypted state must be true. // - // You can specify the CMK using any of the following: + // You can specify the KMS key using any of the following: // // * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. // @@ -52937,16 +58635,16 @@ type CreateVolumeInput struct { // // * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. // - // AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, - // alias, or ARN that is not valid, the action can appear to complete, but eventually - // fails. + // Amazon Web Services authenticates the KMS key asynchronously. Therefore, + // if you specify an ID, alias, or ARN that is not valid, the action can appear + // to complete, but eventually fails. KmsKeyId *string `type:"string"` // Indicates whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, // you can attach the volume to up to 16 Instances built on the Nitro System // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) - // in the same Availability Zone. This parameter is supported with io1 volumes - // only. For more information, see Amazon EBS Multi-Attach (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) + // in the same Availability Zone. This parameter is supported with io1 and io2 + // volumes only. For more information, see Amazon EBS Multi-Attach (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) // in the Amazon Elastic Compute Cloud User Guide. MultiAttachEnabled *bool `type:"boolean"` @@ -53031,6 +58729,12 @@ func (s *CreateVolumeInput) SetAvailabilityZone(v string) *CreateVolumeInput { return s } +// SetClientToken sets the ClientToken field's value. +func (s *CreateVolumeInput) SetClientToken(v string) *CreateVolumeInput { + s.ClientToken = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *CreateVolumeInput) SetDryRun(v bool) *CreateVolumeInput { s.DryRun = &v @@ -53105,7 +58809,7 @@ type CreateVolumePermission struct { // The group to be added or removed. The possible value is all. Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` - // The AWS account ID to be added or removed. + // The ID of the account to be added or removed. UserId *string `locationName:"userId" type:"string"` } @@ -53135,10 +58839,10 @@ func (s *CreateVolumePermission) SetUserId(v string) *CreateVolumePermission { type CreateVolumePermissionModifications struct { _ struct{} `type:"structure"` - // Adds the specified AWS account ID or group to the list. + // Adds the specified account ID or group to the list. Add []*CreateVolumePermission `locationNameList:"item" type:"list"` - // Removes the specified AWS account ID or group from the list. + // Removes the specified account ID or group from the list. Remove []*CreateVolumePermission `locationNameList:"item" type:"list"` } @@ -55103,6 +60807,89 @@ func (s *DeleteFpgaImageOutput) SetReturn(v bool) *DeleteFpgaImageOutput { return s } +type DeleteInstanceEventWindowInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Specify true to force delete the event window. Use the force delete parameter + // if the event window is currently associated with targets. + ForceDelete *bool `type:"boolean"` + + // The ID of the event window. + // + // InstanceEventWindowId is a required field + InstanceEventWindowId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteInstanceEventWindowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceEventWindowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteInstanceEventWindowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteInstanceEventWindowInput"} + if s.InstanceEventWindowId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceEventWindowId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteInstanceEventWindowInput) SetDryRun(v bool) *DeleteInstanceEventWindowInput { + s.DryRun = &v + return s +} + +// SetForceDelete sets the ForceDelete field's value. +func (s *DeleteInstanceEventWindowInput) SetForceDelete(v bool) *DeleteInstanceEventWindowInput { + s.ForceDelete = &v + return s +} + +// SetInstanceEventWindowId sets the InstanceEventWindowId field's value. +func (s *DeleteInstanceEventWindowInput) SetInstanceEventWindowId(v string) *DeleteInstanceEventWindowInput { + s.InstanceEventWindowId = &v + return s +} + +type DeleteInstanceEventWindowOutput struct { + _ struct{} `type:"structure"` + + // The state of the event window. + InstanceEventWindowState *InstanceEventWindowStateChange `locationName:"instanceEventWindowState" type:"structure"` +} + +// String returns the string representation +func (s DeleteInstanceEventWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteInstanceEventWindowOutput) GoString() string { + return s.String() +} + +// SetInstanceEventWindowState sets the InstanceEventWindowState field's value. +func (s *DeleteInstanceEventWindowOutput) SetInstanceEventWindowState(v *InstanceEventWindowStateChange) *DeleteInstanceEventWindowOutput { + s.InstanceEventWindowState = v + return s +} + type DeleteInternetGatewayInput struct { _ struct{} `type:"structure"` @@ -55967,6 +61754,152 @@ func (s DeleteNetworkAclOutput) GoString() string { return s.String() } +type DeleteNetworkInsightsAnalysisInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the network insights analysis. + // + // NetworkInsightsAnalysisId is a required field + NetworkInsightsAnalysisId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteNetworkInsightsAnalysisInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkInsightsAnalysisInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkInsightsAnalysisInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInsightsAnalysisInput"} + if s.NetworkInsightsAnalysisId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInsightsAnalysisId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteNetworkInsightsAnalysisInput) SetDryRun(v bool) *DeleteNetworkInsightsAnalysisInput { + s.DryRun = &v + return s +} + +// SetNetworkInsightsAnalysisId sets the NetworkInsightsAnalysisId field's value. +func (s *DeleteNetworkInsightsAnalysisInput) SetNetworkInsightsAnalysisId(v string) *DeleteNetworkInsightsAnalysisInput { + s.NetworkInsightsAnalysisId = &v + return s +} + +type DeleteNetworkInsightsAnalysisOutput struct { + _ struct{} `type:"structure"` + + // The ID of the network insights analysis. + NetworkInsightsAnalysisId *string `locationName:"networkInsightsAnalysisId" type:"string"` +} + +// String returns the string representation +func (s DeleteNetworkInsightsAnalysisOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkInsightsAnalysisOutput) GoString() string { + return s.String() +} + +// SetNetworkInsightsAnalysisId sets the NetworkInsightsAnalysisId field's value. +func (s *DeleteNetworkInsightsAnalysisOutput) SetNetworkInsightsAnalysisId(v string) *DeleteNetworkInsightsAnalysisOutput { + s.NetworkInsightsAnalysisId = &v + return s +} + +type DeleteNetworkInsightsPathInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the path. + // + // NetworkInsightsPathId is a required field + NetworkInsightsPathId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteNetworkInsightsPathInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkInsightsPathInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteNetworkInsightsPathInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteNetworkInsightsPathInput"} + if s.NetworkInsightsPathId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInsightsPathId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteNetworkInsightsPathInput) SetDryRun(v bool) *DeleteNetworkInsightsPathInput { + s.DryRun = &v + return s +} + +// SetNetworkInsightsPathId sets the NetworkInsightsPathId field's value. +func (s *DeleteNetworkInsightsPathInput) SetNetworkInsightsPathId(v string) *DeleteNetworkInsightsPathInput { + s.NetworkInsightsPathId = &v + return s +} + +type DeleteNetworkInsightsPathOutput struct { + _ struct{} `type:"structure"` + + // The ID of the path. + NetworkInsightsPathId *string `locationName:"networkInsightsPathId" type:"string"` +} + +// String returns the string representation +func (s DeleteNetworkInsightsPathOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteNetworkInsightsPathOutput) GoString() string { + return s.String() +} + +// SetNetworkInsightsPathId sets the NetworkInsightsPathId field's value. +func (s *DeleteNetworkInsightsPathOutput) SetNetworkInsightsPathId(v string) *DeleteNetworkInsightsPathOutput { + s.NetworkInsightsPathId = &v + return s +} + // Contains the parameters for DeleteNetworkInterface. type DeleteNetworkInterfaceInput struct { _ struct{} `type:"structure"` @@ -56709,7 +62642,8 @@ type DeleteTagsInput struct { // an empty string. // // If you omit this parameter, we delete all user-defined tags for the specified - // resources. We do not delete AWS-generated tags (tags that have the aws: prefix). + // resources. We do not delete Amazon Web Services-generated tags (tags that + // have the aws: prefix). Tags []*Tag `locationName:"tag" locationNameList:"item" type:"list"` } @@ -57060,6 +62994,152 @@ func (s *DeleteTrafficMirrorTargetOutput) SetTrafficMirrorTargetId(v string) *De return s } +type DeleteTransitGatewayConnectInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the Connect attachment. + // + // TransitGatewayAttachmentId is a required field + TransitGatewayAttachmentId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTransitGatewayConnectInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayConnectInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTransitGatewayConnectInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayConnectInput"} + if s.TransitGatewayAttachmentId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayAttachmentId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayConnectInput) SetDryRun(v bool) *DeleteTransitGatewayConnectInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *DeleteTransitGatewayConnectInput) SetTransitGatewayAttachmentId(v string) *DeleteTransitGatewayConnectInput { + s.TransitGatewayAttachmentId = &v + return s +} + +type DeleteTransitGatewayConnectOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted Connect attachment. + TransitGatewayConnect *TransitGatewayConnect `locationName:"transitGatewayConnect" type:"structure"` +} + +// String returns the string representation +func (s DeleteTransitGatewayConnectOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayConnectOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayConnect sets the TransitGatewayConnect field's value. +func (s *DeleteTransitGatewayConnectOutput) SetTransitGatewayConnect(v *TransitGatewayConnect) *DeleteTransitGatewayConnectOutput { + s.TransitGatewayConnect = v + return s +} + +type DeleteTransitGatewayConnectPeerInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the Connect peer. + // + // TransitGatewayConnectPeerId is a required field + TransitGatewayConnectPeerId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DeleteTransitGatewayConnectPeerInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayConnectPeerInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeleteTransitGatewayConnectPeerInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeleteTransitGatewayConnectPeerInput"} + if s.TransitGatewayConnectPeerId == nil { + invalidParams.Add(request.NewErrParamRequired("TransitGatewayConnectPeerId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DeleteTransitGatewayConnectPeerInput) SetDryRun(v bool) *DeleteTransitGatewayConnectPeerInput { + s.DryRun = &v + return s +} + +// SetTransitGatewayConnectPeerId sets the TransitGatewayConnectPeerId field's value. +func (s *DeleteTransitGatewayConnectPeerInput) SetTransitGatewayConnectPeerId(v string) *DeleteTransitGatewayConnectPeerInput { + s.TransitGatewayConnectPeerId = &v + return s +} + +type DeleteTransitGatewayConnectPeerOutput struct { + _ struct{} `type:"structure"` + + // Information about the deleted Connect peer. + TransitGatewayConnectPeer *TransitGatewayConnectPeer `locationName:"transitGatewayConnectPeer" type:"structure"` +} + +// String returns the string representation +func (s DeleteTransitGatewayConnectPeerOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DeleteTransitGatewayConnectPeerOutput) GoString() string { + return s.String() +} + +// SetTransitGatewayConnectPeer sets the TransitGatewayConnectPeer field's value. +func (s *DeleteTransitGatewayConnectPeerOutput) SetTransitGatewayConnectPeer(v *TransitGatewayConnectPeer) *DeleteTransitGatewayConnectPeerOutput { + s.TransitGatewayConnectPeer = v + return s +} + type DeleteTransitGatewayInput struct { _ struct{} `type:"structure"` @@ -58662,6 +64742,115 @@ func (s *DescribeAccountAttributesOutput) SetAccountAttributes(v []*AccountAttri return s } +type DescribeAddressesAttributeInput struct { + _ struct{} `type:"structure"` + + // [EC2-VPC] The allocation IDs. + AllocationIds []*string `locationName:"AllocationId" locationNameList:"item" type:"list"` + + // The attribute of the IP address. + Attribute *string `type:"string" enum:"AddressAttributeName"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeAddressesAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAddressesAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeAddressesAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeAddressesAttributeInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllocationIds sets the AllocationIds field's value. +func (s *DescribeAddressesAttributeInput) SetAllocationIds(v []*string) *DescribeAddressesAttributeInput { + s.AllocationIds = v + return s +} + +// SetAttribute sets the Attribute field's value. +func (s *DescribeAddressesAttributeInput) SetAttribute(v string) *DescribeAddressesAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeAddressesAttributeInput) SetDryRun(v bool) *DescribeAddressesAttributeInput { + s.DryRun = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeAddressesAttributeInput) SetMaxResults(v int64) *DescribeAddressesAttributeInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAddressesAttributeInput) SetNextToken(v string) *DescribeAddressesAttributeInput { + s.NextToken = &v + return s +} + +type DescribeAddressesAttributeOutput struct { + _ struct{} `type:"structure"` + + // Information about the IP addresses. + Addresses []*AddressAttribute `locationName:"addressSet" locationNameList:"item" type:"list"` + + // The token to use 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"` +} + +// String returns the string representation +func (s DescribeAddressesAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeAddressesAttributeOutput) GoString() string { + return s.String() +} + +// SetAddresses sets the Addresses field's value. +func (s *DescribeAddressesAttributeOutput) SetAddresses(v []*AddressAttribute) *DescribeAddressesAttributeOutput { + s.Addresses = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeAddressesAttributeOutput) SetNextToken(v string) *DescribeAddressesAttributeOutput { + s.NextToken = &v + return s +} + type DescribeAddressesInput struct { _ struct{} `type:"structure"` @@ -58687,12 +64876,12 @@ type DescribeAddressesInput struct { // if any. // // * network-border-group - A unique set of Availability Zones, Local Zones, - // or Wavelength Zones from where AWS advertises IP addresses. + // or Wavelength Zones from where Amazon Web Services advertises IP addresses. // // * network-interface-id - [EC2-VPC] The ID of the network interface that // the address is associated with, if any. // - // * network-interface-owner-id - The AWS account ID of the owner. + // * network-interface-owner-id - The account ID of the owner. // // * private-ip-address - [EC2-VPC] The private IP address associated with // the Elastic IP address. @@ -59158,7 +65347,7 @@ type DescribeCapacityReservationsInput struct { // * instance-type - The type of instance for which the Capacity Reservation // reserves capacity. // - // * owner-id - The ID of the AWS account that owns the Capacity Reservation. + // * owner-id - The ID of the account that owns the Capacity Reservation. // // * availability-zone-id - The Availability Zone ID of the Capacity Reservation. // @@ -59170,20 +65359,26 @@ type DescribeCapacityReservationsInput struct { // * tenancy - Indicates the tenancy of the Capacity Reservation. A Capacity // Reservation can have one of the following tenancy settings: default - // The Capacity Reservation is created on hardware that is shared with other - // AWS accounts. dedicated - The Capacity Reservation is created on single-tenant - // hardware that is dedicated to a single AWS account. + // accounts. dedicated - The Capacity Reservation is created on single-tenant + // hardware that is dedicated to a single account. + // + // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost on which + // the Capacity Reservation was created. // // * state - The current state of the Capacity Reservation. A Capacity Reservation // can be in one of the following states: active- The Capacity Reservation // is active and the capacity is available for your use. expired - The Capacity // Reservation expired automatically at the date and time specified in your // request. The reserved capacity is no longer available for your use. cancelled - // - The Capacity Reservation was manually cancelled. The reserved capacity - // is no longer available for your use. pending - The Capacity Reservation - // request was successful but the capacity provisioning is still pending. - // failed - The Capacity Reservation request has failed. A request might - // fail due to invalid request parameters, capacity constraints, or instance - // limit constraints. Failed requests are retained for 60 minutes. + // - The Capacity Reservation was cancelled. The reserved capacity is no + // longer available for your use. pending - The Capacity Reservation request + // was successful but the capacity provisioning is still pending. failed + // - The Capacity Reservation request has failed. A request might fail due + // to invalid request parameters, capacity constraints, or instance limit + // constraints. Failed requests are retained for 60 minutes. + // + // * start-date - The date and time at which the Capacity Reservation was + // started. // // * end-date - The date and time at which the Capacity Reservation expires. // When a Capacity Reservation expires, the reserved capacity is released @@ -61004,11 +67199,11 @@ type DescribeFastSnapshotRestoreSuccessItem struct { // The time at which fast snapshot restores entered the optimizing state. OptimizingTime *time.Time `locationName:"optimizingTime" type:"timestamp"` - // The AWS owner alias that enabled fast snapshot restores on the snapshot. - // This is intended for future use. + // The Amazon Web Services owner alias that enabled fast snapshot restores on + // the snapshot. This is intended for future use. OwnerAlias *string `locationName:"ownerAlias" type:"string"` - // The ID of the AWS account that enabled fast snapshot restores on the snapshot. + // The ID of the account that enabled fast snapshot restores on the snapshot. OwnerId *string `locationName:"ownerId" type:"string"` // The ID of the snapshot. @@ -61116,8 +67311,8 @@ type DescribeFastSnapshotRestoresInput struct { // // * availability-zone: The Availability Zone of the snapshot. // - // * owner-id: The ID of the AWS account that enabled fast snapshot restore - // on the snapshot. + // * owner-id: The ID of the account that enabled fast snapshot restore on + // the snapshot. // // * snapshot-id: The ID of the snapshot. // @@ -62642,9 +68837,9 @@ type DescribeImageAttributeInput struct { // The AMI attribute. // - // Note: Depending on your account privileges, the blockDeviceMapping attribute - // may return a Client.AuthFailure error. If this happens, use DescribeImages - // to get information about the block device mapping for the AMI. + // Note: The blockDeviceMapping attribute is deprecated. Using this attribute + // returns the Client.AuthFailure error. To get information about the block + // device mappings for an AMI, use the DescribeImages action. // // Attribute is a required field Attribute *string `type:"string" required:"true" enum:"ImageAttributeName"` @@ -62712,6 +68907,9 @@ type DescribeImageAttributeOutput struct { // The block device mapping entries. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + // Describes a value for a resource attribute that is a String. + BootMode *AttributeValue `locationName:"bootMode" type:"structure"` + // A description for the AMI. Description *AttributeValue `locationName:"description" type:"structure"` @@ -62751,6 +68949,12 @@ func (s *DescribeImageAttributeOutput) SetBlockDeviceMappings(v []*BlockDeviceMa return s } +// SetBootMode sets the BootMode field's value. +func (s *DescribeImageAttributeOutput) SetBootMode(v *AttributeValue) *DescribeImageAttributeOutput { + s.BootMode = v + return s +} + // SetDescription sets the Description field's value. func (s *DescribeImageAttributeOutput) SetDescription(v *AttributeValue) *DescribeImageAttributeOutput { s.Description = v @@ -62847,13 +69051,13 @@ type DescribeImagesInput struct { // // * name - The name of the AMI (provided during image creation). // - // * owner-alias - The owner alias, from an Amazon-maintained list (amazon - // | aws-marketplace). This is not the user-configured AWS account alias - // set using the IAM console. We recommend that you use the related parameter - // instead of this filter. + // * owner-alias - The owner alias (amazon | aws-marketplace). The valid + // aliases are defined in an Amazon-maintained list. This is not the AWS + // account alias that can be set using the IAM console. We recommend that + // you use the Owner request parameter instead of this filter. // // * owner-id - The AWS account ID of the owner. We recommend that you use - // the related parameter instead of this filter. + // the Owner request parameter instead of this filter. // // * platform - The platform. To only list Windows-based AMIs, use windows. // @@ -62895,6 +69099,14 @@ type DescribeImagesInput struct { // Default: Describes all images available to you. ImageIds []*string `locationName:"ImageId" locationNameList:"ImageId" type:"list"` + // If true, all deprecated AMIs are included in the response. If false, no deprecated + // AMIs are included in the response. If no value is specified, the default + // value is false. + // + // If you are the AMI owner, all deprecated AMIs appear in the response regardless + // of the value (true or false) that you set for this parameter. + IncludeDeprecated *bool `type:"boolean"` + // Scopes the results to images with the specified owners. You can specify a // combination of AWS account IDs, self, amazon, and aws-marketplace. If you // omit this parameter, the results include all images for which you have launch @@ -62936,6 +69148,12 @@ func (s *DescribeImagesInput) SetImageIds(v []*string) *DescribeImagesInput { return s } +// SetIncludeDeprecated sets the IncludeDeprecated field's value. +func (s *DescribeImagesInput) SetIncludeDeprecated(v bool) *DescribeImagesInput { + s.IncludeDeprecated = &v + return s +} + // SetOwners sets the Owners field's value. func (s *DescribeImagesInput) SetOwners(v []*string) *DescribeImagesInput { s.Owners = v @@ -63242,8 +69460,8 @@ type DescribeInstanceAttributeOutput struct { // Indicates whether enhanced networking with ENA is enabled. EnaSupport *AttributeBooleanValue `locationName:"enaSupport" type:"structure"` - // To enable the instance for AWS Nitro Enclaves, set this parameter to true; - // otherwise, set it to false. + // To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter + // to true; otherwise, set it to false. EnclaveOptions *EnclaveOptions `locationName:"enclaveOptions" type:"structure"` // The security groups associated with the instance. @@ -63271,9 +69489,12 @@ type DescribeInstanceAttributeOutput struct { // The device name of the root device volume (for example, /dev/sda1). RootDeviceName *AttributeValue `locationName:"rootDeviceName" type:"structure"` - // Indicates whether source/destination checking is enabled. A value of true - // means that checking is enabled, and false means that checking is disabled. - // This value must be false for a NAT instance to perform NAT. + // Enable or disable source/destination checks, which ensure that the instance + // is either the source or the destination of any traffic that it receives. + // If the value is true, source/destination checks are enabled; otherwise, they + // are disabled. The default value is true. You must disable source/destination + // checks if the instance runs services such as network address translation, + // routing, or firewalls. SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` // Indicates whether enhanced networking with the Intel 82599 Virtual Function @@ -63556,6 +69777,150 @@ func (s *DescribeInstanceEventNotificationAttributesOutput) SetInstanceTagAttrib return s } +// Describe instance event windows by InstanceEventWindow. +type DescribeInstanceEventWindowsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + // + // * dedicated-host-id - The event windows associated with the specified + // Dedicated Host ID. + // + // * event-window-name - The event windows associated with the specified + // names. + // + // * instance-id - The event windows associated with the specified instance + // ID. + // + // * instance-tag - The event windows associated with the specified tag and + // value. + // + // * instance-tag-key - The event windows associated with the specified tag + // key, regardless of the value. + // + // * instance-tag-value - The event windows associated with the specified + // tag value, regardless of the key. + // + // * tag: - The key/value combination of a tag assigned to the event + // window. Use the tag key in the filter name and the tag value as the filter + // value. For example, to find all resources that have a tag with the key + // Owner and the value CMX, specify tag:Owner for the filter name and CMX + // for the filter value. + // + // * tag-key - The key of a tag assigned to the event window. Use this filter + // to find all event windows that have a tag with a specific key, regardless + // of the tag value. + // + // * tag-value - The value of a tag assigned to the event window. Use this + // filter to find all event windows that have a tag with a specific value, + // regardless of the tag key. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The IDs of the event windows. + InstanceEventWindowIds []*string `locationName:"InstanceEventWindowId" locationNameList:"InstanceEventWindowId" type:"list"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. This + // value can be between 20 and 500. You cannot specify this parameter and the + // event window IDs parameter in the same call. + MaxResults *int64 `min:"20" type:"integer"` + + // The token to request the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeInstanceEventWindowsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceEventWindowsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeInstanceEventWindowsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceEventWindowsInput"} + if s.MaxResults != nil && *s.MaxResults < 20 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 20)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeInstanceEventWindowsInput) SetDryRun(v bool) *DescribeInstanceEventWindowsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeInstanceEventWindowsInput) SetFilters(v []*Filter) *DescribeInstanceEventWindowsInput { + s.Filters = v + return s +} + +// SetInstanceEventWindowIds sets the InstanceEventWindowIds field's value. +func (s *DescribeInstanceEventWindowsInput) SetInstanceEventWindowIds(v []*string) *DescribeInstanceEventWindowsInput { + s.InstanceEventWindowIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeInstanceEventWindowsInput) SetMaxResults(v int64) *DescribeInstanceEventWindowsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstanceEventWindowsInput) SetNextToken(v string) *DescribeInstanceEventWindowsInput { + s.NextToken = &v + return s +} + +type DescribeInstanceEventWindowsOutput struct { + _ struct{} `type:"structure"` + + // Information about the event windows. + InstanceEventWindows []*InstanceEventWindow `locationName:"instanceEventWindowSet" locationNameList:"item" type:"list"` + + // The token to use 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"` +} + +// String returns the string representation +func (s DescribeInstanceEventWindowsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeInstanceEventWindowsOutput) GoString() string { + return s.String() +} + +// SetInstanceEventWindows sets the InstanceEventWindows field's value. +func (s *DescribeInstanceEventWindowsOutput) SetInstanceEventWindows(v []*InstanceEventWindow) *DescribeInstanceEventWindowsOutput { + s.InstanceEventWindows = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeInstanceEventWindowsOutput) SetNextToken(v string) *DescribeInstanceEventWindowsOutput { + s.NextToken = &v + return s +} + type DescribeInstanceStatusInput struct { _ struct{} `type:"structure"` @@ -63906,6 +70271,9 @@ type DescribeInstanceTypesInput struct { // // * memory-info.size-in-mib - The memory size. // + // * network-info.efa-info.maximum-efa-interfaces - The maximum number of + // Elastic Fabric Adapters (EFAs) per instance. + // // * network-info.efa-supported - Indicates whether the instance type supports // Elastic Fabric Adapter (EFA) (true | false). // @@ -63933,6 +70301,8 @@ type DescribeInstanceTypesInput struct { // * processor-info.sustained-clock-speed-in-ghz - The CPU clock speed, in // GHz. // + // * supported-boot-mode - The boot mode (legacy-bios | uefi). + // // * supported-root-device-type - The root device type (ebs | instance-store). // // * supported-usage-class - The usage class (on-demand | spot). @@ -63955,8 +70325,8 @@ type DescribeInstanceTypesInput struct { // can be configured for the instance type. For example, "1" or "1,2". Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` - // The instance types. For more information, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The instance types. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. InstanceTypes []*string `locationName:"InstanceType" type:"list"` // The maximum number of results to return for the request in a single page. @@ -64024,8 +70394,8 @@ func (s *DescribeInstanceTypesInput) SetNextToken(v string) *DescribeInstanceTyp type DescribeInstanceTypesOutput struct { _ struct{} `type:"structure"` - // The instance type. For more information, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. InstanceTypes []*InstanceTypeInfo `locationName:"instanceTypeSet" locationNameList:"item" type:"list"` // The token to use to retrieve the next page of results. This value is null @@ -64227,7 +70597,7 @@ type DescribeInstancesInput struct { // * network-interface.requester-id - The requester ID for the network interface. // // * network-interface.requester-managed - Indicates whether the network - // interface is being managed by AWS. + // interface is being managed by Amazon Web Services. // // * network-interface.status - The status of the network interface (available) // | in-use). @@ -64242,7 +70612,9 @@ type DescribeInstancesInput struct { // // * network-interface.vpc-id - The ID of the VPC for the network interface. // - // * owner-id - The AWS account ID of the instance owner. + // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost. + // + // * owner-id - The account ID of the instance owner. // // * placement-group-name - The name of the placement group for the instance. // @@ -64267,7 +70639,7 @@ type DescribeInstancesInput struct { // Similar to the state-reason-code filter. // // * requester-id - The ID of the entity that launched the instance on your - // behalf (for example, AWS Management Console, Auto Scaling, and so on). + // behalf (for example, Management Console, Auto Scaling, and so on). // // * reservation-id - The ID of the instance's reservation. A reservation // ID is created any time you launch an instance. A reservation ID has a @@ -64680,7 +71052,7 @@ type DescribeKeyPairsInput struct { // The key pair names. // - // Default: Describes all your key pairs. + // Default: Describes all of your key pairs. KeyNames []*string `locationName:"KeyName" locationNameList:"KeyName" type:"list"` // The IDs of the key pairs. @@ -66280,6 +72652,267 @@ func (s *DescribeNetworkAclsOutput) SetNextToken(v string) *DescribeNetworkAclsO return s } +type DescribeNetworkInsightsAnalysesInput struct { + _ struct{} `type:"structure"` + + // The time when the network insights analyses ended. + AnalysisEndTime *time.Time `type:"timestamp"` + + // The time when the network insights analyses started. + AnalysisStartTime *time.Time `type:"timestamp"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The filters. The following are possible values: + // + // * PathFound - A Boolean value that indicates whether a feasible path is + // found. + // + // * Status - The status of the analysis (running | succeeded | failed). + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The ID of the network insights analyses. You must specify either analysis + // IDs or a path ID. + NetworkInsightsAnalysisIds []*string `locationName:"NetworkInsightsAnalysisId" locationNameList:"item" type:"list"` + + // The ID of the path. You must specify either a path ID or analysis IDs. + NetworkInsightsPathId *string `type:"string"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeNetworkInsightsAnalysesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInsightsAnalysesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNetworkInsightsAnalysesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNetworkInsightsAnalysesInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAnalysisEndTime sets the AnalysisEndTime field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetAnalysisEndTime(v time.Time) *DescribeNetworkInsightsAnalysesInput { + s.AnalysisEndTime = &v + return s +} + +// SetAnalysisStartTime sets the AnalysisStartTime field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetAnalysisStartTime(v time.Time) *DescribeNetworkInsightsAnalysesInput { + s.AnalysisStartTime = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetDryRun(v bool) *DescribeNetworkInsightsAnalysesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetFilters(v []*Filter) *DescribeNetworkInsightsAnalysesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetMaxResults(v int64) *DescribeNetworkInsightsAnalysesInput { + s.MaxResults = &v + return s +} + +// SetNetworkInsightsAnalysisIds sets the NetworkInsightsAnalysisIds field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetNetworkInsightsAnalysisIds(v []*string) *DescribeNetworkInsightsAnalysesInput { + s.NetworkInsightsAnalysisIds = v + return s +} + +// SetNetworkInsightsPathId sets the NetworkInsightsPathId field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetNetworkInsightsPathId(v string) *DescribeNetworkInsightsAnalysesInput { + s.NetworkInsightsPathId = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInsightsAnalysesInput) SetNextToken(v string) *DescribeNetworkInsightsAnalysesInput { + s.NextToken = &v + return s +} + +type DescribeNetworkInsightsAnalysesOutput struct { + _ struct{} `type:"structure"` + + // Information about the network insights analyses. + NetworkInsightsAnalyses []*NetworkInsightsAnalysis `locationName:"networkInsightsAnalysisSet" locationNameList:"item" type:"list"` + + // The token to use 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"` +} + +// String returns the string representation +func (s DescribeNetworkInsightsAnalysesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInsightsAnalysesOutput) GoString() string { + return s.String() +} + +// SetNetworkInsightsAnalyses sets the NetworkInsightsAnalyses field's value. +func (s *DescribeNetworkInsightsAnalysesOutput) SetNetworkInsightsAnalyses(v []*NetworkInsightsAnalysis) *DescribeNetworkInsightsAnalysesOutput { + s.NetworkInsightsAnalyses = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInsightsAnalysesOutput) SetNextToken(v string) *DescribeNetworkInsightsAnalysesOutput { + s.NextToken = &v + return s +} + +type DescribeNetworkInsightsPathsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The filters. The following are possible values: + // + // * Destination - The ID of the resource. + // + // * DestinationPort - The destination port. + // + // * Name - The path name. + // + // * Protocol - The protocol. + // + // * Source - The ID of the resource. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The IDs of the paths. + NetworkInsightsPathIds []*string `locationName:"NetworkInsightsPathId" locationNameList:"item" type:"list"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeNetworkInsightsPathsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInsightsPathsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeNetworkInsightsPathsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeNetworkInsightsPathsInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeNetworkInsightsPathsInput) SetDryRun(v bool) *DescribeNetworkInsightsPathsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeNetworkInsightsPathsInput) SetFilters(v []*Filter) *DescribeNetworkInsightsPathsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeNetworkInsightsPathsInput) SetMaxResults(v int64) *DescribeNetworkInsightsPathsInput { + s.MaxResults = &v + return s +} + +// SetNetworkInsightsPathIds sets the NetworkInsightsPathIds field's value. +func (s *DescribeNetworkInsightsPathsInput) SetNetworkInsightsPathIds(v []*string) *DescribeNetworkInsightsPathsInput { + s.NetworkInsightsPathIds = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInsightsPathsInput) SetNextToken(v string) *DescribeNetworkInsightsPathsInput { + s.NextToken = &v + return s +} + +type DescribeNetworkInsightsPathsOutput struct { + _ struct{} `type:"structure"` + + // Information about the paths. + NetworkInsightsPaths []*NetworkInsightsPath `locationName:"networkInsightsPathSet" locationNameList:"item" type:"list"` + + // The token to use 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"` +} + +// String returns the string representation +func (s DescribeNetworkInsightsPathsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeNetworkInsightsPathsOutput) GoString() string { + return s.String() +} + +// SetNetworkInsightsPaths sets the NetworkInsightsPaths field's value. +func (s *DescribeNetworkInsightsPathsOutput) SetNetworkInsightsPaths(v []*NetworkInsightsPath) *DescribeNetworkInsightsPathsOutput { + s.NetworkInsightsPaths = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeNetworkInsightsPathsOutput) SetNextToken(v string) *DescribeNetworkInsightsPathsOutput { + s.NextToken = &v + return s +} + // Contains the parameters for DescribeNetworkInterfaceAttribute. type DescribeNetworkInterfaceAttributeInput struct { _ struct{} `type:"structure"` @@ -66412,9 +73045,9 @@ type DescribeNetworkInterfacePermissionsInput struct { // * network-interface-permission.network-interface-id - The ID of the network // interface. // - // * network-interface-permission.aws-account-id - The AWS account ID. + // * network-interface-permission.aws-account-id - The account ID. // - // * network-interface-permission.aws-service - The AWS service. + // * network-interface-permission.aws-service - The Amazon Web Service. // // * network-interface-permission.permission - The type of permission (INSTANCE-ATTACH // | EIP-ASSOCIATE). @@ -66587,19 +73220,19 @@ type DescribeNetworkInterfacesInput struct { // // * network-interface-id - The ID of the network interface. // - // * owner-id - The AWS account ID of the network interface owner. + // * owner-id - The account ID of the network interface owner. // // * private-ip-address - The private IPv4 address or addresses of the network // interface. // // * private-dns-name - The private DNS name of the network interface (IPv4). // - // * requester-id - The ID of the entity that launched the instance on your - // behalf (for example, AWS Management Console, Auto Scaling, and so on). + // * requester-id - The alias or account ID of the principal or service that + // created the network interface. // // * requester-managed - Indicates whether the network interface is being - // managed by an AWS service (for example, AWS Management Console, Auto Scaling, - // and so on). + // managed by an Amazon Web Service (for example, Management Console, Auto + // Scaling, and so on). // // * source-dest-check - Indicates whether the network interface performs // source/destination checking. A value of true means checking is enabled, @@ -67221,6 +73854,118 @@ func (s *DescribeRegionsOutput) SetRegions(v []*Region) *DescribeRegionsOutput { return s } +type DescribeReplaceRootVolumeTasksInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // Filter to use: + // + // * instance-id - The ID of the instance for which the root volume replacement + // task was created. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The ID of the root volume replacement task to view. + ReplaceRootVolumeTaskIds []*string `locationName:"ReplaceRootVolumeTaskId" locationNameList:"ReplaceRootVolumeTaskId" type:"list"` +} + +// String returns the string representation +func (s DescribeReplaceRootVolumeTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReplaceRootVolumeTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeReplaceRootVolumeTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeReplaceRootVolumeTasksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeReplaceRootVolumeTasksInput) SetDryRun(v bool) *DescribeReplaceRootVolumeTasksInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeReplaceRootVolumeTasksInput) SetFilters(v []*Filter) *DescribeReplaceRootVolumeTasksInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeReplaceRootVolumeTasksInput) SetMaxResults(v int64) *DescribeReplaceRootVolumeTasksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReplaceRootVolumeTasksInput) SetNextToken(v string) *DescribeReplaceRootVolumeTasksInput { + s.NextToken = &v + return s +} + +// SetReplaceRootVolumeTaskIds sets the ReplaceRootVolumeTaskIds field's value. +func (s *DescribeReplaceRootVolumeTasksInput) SetReplaceRootVolumeTaskIds(v []*string) *DescribeReplaceRootVolumeTasksInput { + s.ReplaceRootVolumeTaskIds = v + return s +} + +type DescribeReplaceRootVolumeTasksOutput struct { + _ struct{} `type:"structure"` + + // The token to use 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"` + + // Information about the root volume replacement task. + ReplaceRootVolumeTasks []*ReplaceRootVolumeTask `locationName:"replaceRootVolumeTaskSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeReplaceRootVolumeTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeReplaceRootVolumeTasksOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeReplaceRootVolumeTasksOutput) SetNextToken(v string) *DescribeReplaceRootVolumeTasksOutput { + s.NextToken = &v + return s +} + +// SetReplaceRootVolumeTasks sets the ReplaceRootVolumeTasks field's value. +func (s *DescribeReplaceRootVolumeTasksOutput) SetReplaceRootVolumeTasks(v []*ReplaceRootVolumeTask) *DescribeReplaceRootVolumeTasksOutput { + s.ReplaceRootVolumeTasks = v + return s +} + // Contains the parameters for DescribeReservedInstances. type DescribeReservedInstancesInput struct { _ struct{} `type:"structure"` @@ -67253,10 +73998,11 @@ type DescribeReservedInstancesInput struct { // will only be displayed to EC2-Classic account holders and are for use // with Amazon VPC (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | SUSE // Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise Linux - // (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL Server - // Standard | Windows with SQL Server Standard (Amazon VPC) | Windows with - // SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows with - // SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon VPC)). + // (Amazon VPC) | Red Hat Enterprise Linux with HA (Amazon VPC) | Windows + // | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with + // SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows + // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise + // | Windows with SQL Server Enterprise (Amazon VPC)). // // * reserved-instances-id - The ID of the Reserved Instance. // @@ -67546,19 +74292,19 @@ type DescribeReservedInstancesOfferingsInput struct { // // * marketplace - Set to true to show only Reserved Instance Marketplace // offerings. When this filter is not used, which is the default behavior, - // all offerings from both AWS and the Reserved Instance Marketplace are - // listed. + // all offerings from both Amazon Web Services and the Reserved Instance + // Marketplace are listed. // // * product-description - The Reserved Instance product platform description. // Instances that include (Amazon VPC) in the product platform description // will only be displayed to EC2-Classic account holders and are for use // with Amazon VPC. (Linux/UNIX | Linux/UNIX (Amazon VPC) | SUSE Linux | // SUSE Linux (Amazon VPC) | Red Hat Enterprise Linux | Red Hat Enterprise - // Linux (Amazon VPC) | Windows | Windows (Amazon VPC) | Windows with SQL - // Server Standard | Windows with SQL Server Standard (Amazon VPC) | Windows - // with SQL Server Web | Windows with SQL Server Web (Amazon VPC) | Windows - // with SQL Server Enterprise | Windows with SQL Server Enterprise (Amazon - // VPC)) + // Linux (Amazon VPC) | Red Hat Enterprise Linux with HA (Amazon VPC) | Windows + // | Windows (Amazon VPC) | Windows with SQL Server Standard | Windows with + // SQL Server Standard (Amazon VPC) | Windows with SQL Server Web | Windows + // with SQL Server Web (Amazon VPC) | Windows with SQL Server Enterprise + // | Windows with SQL Server Enterprise (Amazon VPC)) // // * reserved-instances-offering-id - The Reserved Instances offering ID. // @@ -67582,8 +74328,8 @@ type DescribeReservedInstancesOfferingsInput struct { InstanceTenancy *string `locationName:"instanceTenancy" type:"string" enum:"Tenancy"` // The instance type that the reservation will cover (for example, m1.small). - // For more information, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. InstanceType *string `type:"string" enum:"InstanceType"` // The maximum duration (in seconds) to filter when searching for offerings. @@ -68315,6 +75061,127 @@ func (s *DescribeSecurityGroupReferencesOutput) SetSecurityGroupReferenceSet(v [ return s } +type DescribeSecurityGroupRulesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + // + // * group-id - The ID of the security group. + // + // * security-group-rule-id - The ID of the security group rule. + // + // * tag: - The key/value combination of a tag assigned to the resource. + // Use the tag key in the filter name and the tag value as the filter value. + // For example, to find all resources that have a tag with the key Owner + // and the value TeamA, specify tag:Owner for the filter name and TeamA for + // the filter value. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another request with the returned NextToken value. + // This value can be between 5 and 1000. If this parameter is not specified, + // then all results are returned. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The IDs of the security group rules. + SecurityGroupRuleIds []*string `locationName:"SecurityGroupRuleId" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSecurityGroupRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeSecurityGroupRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeSecurityGroupRulesInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeSecurityGroupRulesInput) SetDryRun(v bool) *DescribeSecurityGroupRulesInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeSecurityGroupRulesInput) SetFilters(v []*Filter) *DescribeSecurityGroupRulesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeSecurityGroupRulesInput) SetMaxResults(v int64) *DescribeSecurityGroupRulesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSecurityGroupRulesInput) SetNextToken(v string) *DescribeSecurityGroupRulesInput { + s.NextToken = &v + return s +} + +// SetSecurityGroupRuleIds sets the SecurityGroupRuleIds field's value. +func (s *DescribeSecurityGroupRulesInput) SetSecurityGroupRuleIds(v []*string) *DescribeSecurityGroupRulesInput { + s.SecurityGroupRuleIds = v + return s +} + +type DescribeSecurityGroupRulesOutput struct { + _ struct{} `type:"structure"` + + // The token to use 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"` + + // Information about security group rules. + SecurityGroupRules []*SecurityGroupRule `locationName:"securityGroupRuleSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeSecurityGroupRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeSecurityGroupRulesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeSecurityGroupRulesOutput) SetNextToken(v string) *DescribeSecurityGroupRulesOutput { + s.NextToken = &v + return s +} + +// SetSecurityGroupRules sets the SecurityGroupRules field's value. +func (s *DescribeSecurityGroupRulesOutput) SetSecurityGroupRules(v []*SecurityGroupRule) *DescribeSecurityGroupRulesOutput { + s.SecurityGroupRules = v + return s +} + type DescribeSecurityGroupsInput struct { _ struct{} `type:"structure"` @@ -68340,7 +75207,7 @@ type DescribeSecurityGroupsInput struct { // been referenced in an outbound security group rule. // // * egress.ip-permission.group-name - The name of a security group that - // has been referenced in an outbound security group rule. + // is referenced in an outbound security group rule. // // * egress.ip-permission.ipv6-cidr - An IPv6 CIDR block for an outbound // security group rule. @@ -68349,13 +75216,13 @@ type DescribeSecurityGroupsInput struct { // a security group rule allows outbound access. // // * egress.ip-permission.protocol - The IP protocol for an outbound security - // group rule (tcp | udp | icmp or a protocol number). + // group rule (tcp | udp | icmp, a protocol number, or -1 for all protocols). // // * egress.ip-permission.to-port - For an outbound rule, the end of port // range for the TCP and UDP protocols, or an ICMP code. // - // * egress.ip-permission.user-id - The ID of an AWS account that has been - // referenced in an outbound security group rule. + // * egress.ip-permission.user-id - The ID of an Amazon Web Services account + // that has been referenced in an outbound security group rule. // // * group-id - The ID of the security group. // @@ -68370,8 +75237,8 @@ type DescribeSecurityGroupsInput struct { // * ip-permission.group-id - The ID of a security group that has been referenced // in an inbound security group rule. // - // * ip-permission.group-name - The name of a security group that has been - // referenced in an inbound security group rule. + // * ip-permission.group-name - The name of a security group that is referenced + // in an inbound security group rule. // // * ip-permission.ipv6-cidr - An IPv6 CIDR block for an inbound security // group rule. @@ -68380,15 +75247,16 @@ type DescribeSecurityGroupsInput struct { // security group rule allows inbound access. // // * ip-permission.protocol - The IP protocol for an inbound security group - // rule (tcp | udp | icmp or a protocol number). + // rule (tcp | udp | icmp, a protocol number, or -1 for all protocols). // // * ip-permission.to-port - For an inbound rule, the end of port range for // the TCP and UDP protocols, or an ICMP code. // - // * ip-permission.user-id - The ID of an AWS account that has been referenced - // in an inbound security group rule. + // * ip-permission.user-id - The ID of an Amazon Web Services account that + // has been referenced in an inbound security group rule. // - // * owner-id - The AWS account ID of the owner of the security group. + // * owner-id - The Amazon Web Services account ID of the owner of the security + // group. // // * tag: - The key/value combination of a tag assigned to the resource. // Use the tag key in the filter name and the tag value as the filter value. @@ -68406,7 +75274,7 @@ type DescribeSecurityGroupsInput struct { // The IDs of the security groups. Required for security groups in a nondefault // VPC. // - // Default: Describes all your security groups. + // Default: Describes all of your security groups. GroupIds []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` // [EC2-Classic and default VPC only] The names of the security groups. You @@ -68414,7 +75282,7 @@ type DescribeSecurityGroupsInput struct { // security groups in a nondefault VPC, use the group-name filter to describe // security groups by name. // - // Default: Describes all your security groups. + // Default: Describes all of your security groups. GroupNames []*string `locationName:"GroupName" locationNameList:"GroupName" type:"list"` // The maximum number of results to return in a single call. To retrieve the @@ -68641,11 +75509,11 @@ type DescribeSnapshotsInput struct { // * encrypted - Indicates whether the snapshot is encrypted (true | false) // // * owner-alias - The owner alias, from an Amazon-maintained list (amazon). - // This is not the user-configured AWS account alias set using the IAM console. + // This is not the user-configured account alias set using the IAM console. // We recommend that you use the related parameter instead of this filter. // - // * owner-id - The AWS account ID of the owner. We recommend that you use - // the related parameter instead of this filter. + // * owner-id - The account ID of the owner. We recommend that you use the + // related parameter instead of this filter. // // * progress - The progress of the snapshot, as a percentage (for example, // 80%). @@ -68690,10 +75558,10 @@ type DescribeSnapshotsInput struct { NextToken *string `type:"string"` // Scopes the results to snapshots with the specified owners. You can specify - // a combination of AWS account IDs, self, and amazon. + // a combination of account IDs, self, and amazon. OwnerIds []*string `locationName:"Owner" locationNameList:"Owner" type:"list"` - // The IDs of the AWS accounts that can create volumes from the snapshot. + // The IDs of the accounts that can create volumes from the snapshot. RestorableByUserIds []*string `locationName:"RestorableBy" type:"list"` // The snapshot IDs. @@ -69678,6 +76546,124 @@ func (s *DescribeStaleSecurityGroupsOutput) SetStaleSecurityGroupSet(v []*StaleS return s } +type DescribeStoreImageTasksInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The filters. + // + // * task-state - Returns tasks in a certain state (InProgress | Completed + // | Failed) + // + // * bucket - Returns task information for tasks that targeted a specific + // bucket. For the filter value, specify the bucket name. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The AMI IDs for which to show progress. Up to 20 AMI IDs can be included + // in a request. + ImageIds []*string `locationName:"ImageId" locationNameList:"item" type:"list"` + + // The maximum number of results to return in a single call. To retrieve the + // remaining results, make another call with the returned NextToken value. This + // value can be between 1 and 200. You cannot specify this parameter and the + // ImageIDs parameter in the same call. + MaxResults *int64 `min:"1" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeStoreImageTasksInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStoreImageTasksInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeStoreImageTasksInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeStoreImageTasksInput"} + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeStoreImageTasksInput) SetDryRun(v bool) *DescribeStoreImageTasksInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeStoreImageTasksInput) SetFilters(v []*Filter) *DescribeStoreImageTasksInput { + s.Filters = v + return s +} + +// SetImageIds sets the ImageIds field's value. +func (s *DescribeStoreImageTasksInput) SetImageIds(v []*string) *DescribeStoreImageTasksInput { + s.ImageIds = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeStoreImageTasksInput) SetMaxResults(v int64) *DescribeStoreImageTasksInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeStoreImageTasksInput) SetNextToken(v string) *DescribeStoreImageTasksInput { + s.NextToken = &v + return s +} + +type DescribeStoreImageTasksOutput struct { + _ struct{} `type:"structure"` + + // The token to use 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 information about the AMI store tasks. + StoreImageTaskResults []*StoreImageTaskResult `locationName:"storeImageTaskResultSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeStoreImageTasksOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeStoreImageTasksOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeStoreImageTasksOutput) SetNextToken(v string) *DescribeStoreImageTasksOutput { + s.NextToken = &v + return s +} + +// SetStoreImageTaskResults sets the StoreImageTaskResults field's value. +func (s *DescribeStoreImageTasksOutput) SetStoreImageTaskResults(v []*StoreImageTaskResult) *DescribeStoreImageTasksOutput { + s.StoreImageTaskResults = v + return s +} + type DescribeSubnetsInput struct { _ struct{} `type:"structure"` @@ -69714,6 +76700,8 @@ type DescribeSubnetsInput struct { // * ipv6-cidr-block-association.state - The state of an IPv6 CIDR block // associated with the subnet. // + // * outpost-arn - The Amazon Resource Name (ARN) of the Outpost. + // // * owner-id - The ID of the AWS account that owns the subnet. // // * state - The state of the subnet (pending | available). @@ -70323,7 +77311,7 @@ type DescribeTransitGatewayAttachmentsInput struct { // * resource-owner-id - The ID of the AWS account that owns the resource. // // * resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway - // | peering. + // | peering | connect. // // * state - The state of the attachment. Valid values are available | deleted // | deleting | failed | failing | initiatingRequest | modifying | pendingAcceptance @@ -70434,6 +77422,244 @@ func (s *DescribeTransitGatewayAttachmentsOutput) SetTransitGatewayAttachments(v return s } +type DescribeTransitGatewayConnectPeersInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. The possible values are: + // + // * state - The state of the Connect peer (pending | available | deleting + // | deleted). + // + // * transit-gateway-attachment-id - The ID of the attachment. + // + // * transit-gateway-connect-peer-id - The ID of the Connect peer. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The IDs of the Connect peers. + TransitGatewayConnectPeerIds []*string `locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayConnectPeersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayConnectPeersInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransitGatewayConnectPeersInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayConnectPeersInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTransitGatewayConnectPeersInput) SetDryRun(v bool) *DescribeTransitGatewayConnectPeersInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTransitGatewayConnectPeersInput) SetFilters(v []*Filter) *DescribeTransitGatewayConnectPeersInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTransitGatewayConnectPeersInput) SetMaxResults(v int64) *DescribeTransitGatewayConnectPeersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayConnectPeersInput) SetNextToken(v string) *DescribeTransitGatewayConnectPeersInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayConnectPeerIds sets the TransitGatewayConnectPeerIds field's value. +func (s *DescribeTransitGatewayConnectPeersInput) SetTransitGatewayConnectPeerIds(v []*string) *DescribeTransitGatewayConnectPeersInput { + s.TransitGatewayConnectPeerIds = v + return s +} + +type DescribeTransitGatewayConnectPeersOutput struct { + _ struct{} `type:"structure"` + + // The token to use 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"` + + // Information about the Connect peers. + TransitGatewayConnectPeers []*TransitGatewayConnectPeer `locationName:"transitGatewayConnectPeerSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayConnectPeersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayConnectPeersOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayConnectPeersOutput) SetNextToken(v string) *DescribeTransitGatewayConnectPeersOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayConnectPeers sets the TransitGatewayConnectPeers field's value. +func (s *DescribeTransitGatewayConnectPeersOutput) SetTransitGatewayConnectPeers(v []*TransitGatewayConnectPeer) *DescribeTransitGatewayConnectPeersOutput { + s.TransitGatewayConnectPeers = v + return s +} + +type DescribeTransitGatewayConnectsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. The possible values are: + // + // * options.protocol - The tunnel protocol (gre). + // + // * state - The state of the attachment (initiating | initiatingRequest + // | pendingAcceptance | rollingBack | pending | available | modifying | + // deleting | deleted | failed | rejected | rejecting | failing). + // + // * transit-gateway-attachment-id - The ID of the Connect attachment. + // + // * transit-gateway-id - The ID of the transit gateway. + // + // * transport-transit-gateway-attachment-id - The ID of the transit gateway + // attachment from which the Connect attachment was created. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` + + // The IDs of the attachments. + TransitGatewayAttachmentIds []*string `type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayConnectsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayConnectsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTransitGatewayConnectsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTransitGatewayConnectsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTransitGatewayConnectsInput) SetDryRun(v bool) *DescribeTransitGatewayConnectsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTransitGatewayConnectsInput) SetFilters(v []*Filter) *DescribeTransitGatewayConnectsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTransitGatewayConnectsInput) SetMaxResults(v int64) *DescribeTransitGatewayConnectsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayConnectsInput) SetNextToken(v string) *DescribeTransitGatewayConnectsInput { + s.NextToken = &v + return s +} + +// SetTransitGatewayAttachmentIds sets the TransitGatewayAttachmentIds field's value. +func (s *DescribeTransitGatewayConnectsInput) SetTransitGatewayAttachmentIds(v []*string) *DescribeTransitGatewayConnectsInput { + s.TransitGatewayAttachmentIds = v + return s +} + +type DescribeTransitGatewayConnectsOutput struct { + _ struct{} `type:"structure"` + + // The token to use 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"` + + // Information about the Connect attachments. + TransitGatewayConnects []*TransitGatewayConnect `locationName:"transitGatewayConnectSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s DescribeTransitGatewayConnectsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTransitGatewayConnectsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTransitGatewayConnectsOutput) SetNextToken(v string) *DescribeTransitGatewayConnectsOutput { + s.NextToken = &v + return s +} + +// SetTransitGatewayConnects sets the TransitGatewayConnects field's value. +func (s *DescribeTransitGatewayConnectsOutput) SetTransitGatewayConnects(v []*TransitGatewayConnect) *DescribeTransitGatewayConnectsOutput { + s.TransitGatewayConnects = v + return s +} + type DescribeTransitGatewayMulticastDomainsInput struct { _ struct{} `type:"structure"` @@ -71067,6 +78293,120 @@ func (s *DescribeTransitGatewaysOutput) SetTransitGateways(v []*TransitGateway) return s } +type DescribeTrunkInterfaceAssociationsInput struct { + _ struct{} `type:"structure"` + + // The IDs of the associations. + AssociationIds []*string `locationName:"AssociationId" locationNameList:"item" type:"list"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // One or more filters. + // + // * gre-key - The ID of a trunk interface association. + // + // * interface-protocol - The interface protocol. Valid values are VLAN and + // GRE. + Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` + + // The maximum number of results to return with a single call. To retrieve the + // remaining results, make another call with the returned nextToken value. + MaxResults *int64 `min:"5" type:"integer"` + + // The token for the next page of results. + NextToken *string `type:"string"` +} + +// String returns the string representation +func (s DescribeTrunkInterfaceAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrunkInterfaceAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DescribeTrunkInterfaceAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DescribeTrunkInterfaceAssociationsInput"} + if s.MaxResults != nil && *s.MaxResults < 5 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 5)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationIds sets the AssociationIds field's value. +func (s *DescribeTrunkInterfaceAssociationsInput) SetAssociationIds(v []*string) *DescribeTrunkInterfaceAssociationsInput { + s.AssociationIds = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DescribeTrunkInterfaceAssociationsInput) SetDryRun(v bool) *DescribeTrunkInterfaceAssociationsInput { + s.DryRun = &v + return s +} + +// SetFilters sets the Filters field's value. +func (s *DescribeTrunkInterfaceAssociationsInput) SetFilters(v []*Filter) *DescribeTrunkInterfaceAssociationsInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *DescribeTrunkInterfaceAssociationsInput) SetMaxResults(v int64) *DescribeTrunkInterfaceAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrunkInterfaceAssociationsInput) SetNextToken(v string) *DescribeTrunkInterfaceAssociationsInput { + s.NextToken = &v + return s +} + +type DescribeTrunkInterfaceAssociationsOutput struct { + _ struct{} `type:"structure"` + + // Information about the trunk associations. + InterfaceAssociations []*TrunkInterfaceAssociation `locationName:"interfaceAssociationSet" locationNameList:"item" type:"list"` + + // The token to use 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"` +} + +// String returns the string representation +func (s DescribeTrunkInterfaceAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DescribeTrunkInterfaceAssociationsOutput) GoString() string { + return s.String() +} + +// SetInterfaceAssociations sets the InterfaceAssociations field's value. +func (s *DescribeTrunkInterfaceAssociationsOutput) SetInterfaceAssociations(v []*TrunkInterfaceAssociation) *DescribeTrunkInterfaceAssociationsOutput { + s.InterfaceAssociations = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *DescribeTrunkInterfaceAssociationsOutput) SetNextToken(v string) *DescribeTrunkInterfaceAssociationsOutput { + s.NextToken = &v + return s +} + type DescribeVolumeAttributeInput struct { _ struct{} `type:"structure"` @@ -72323,6 +79663,8 @@ type DescribeVpcEndpointServicesInput struct { // // * service-name - The name of the service. // + // * service-type - The type of service (Interface | Gateway). + // // * tag: - The key/value combination of a tag assigned to the resource. // Use the tag key in the filter name and the tag value as the filter value. // For example, to find all resources that have a tag with the key Owner @@ -73789,11 +81131,11 @@ type DisableFastSnapshotRestoreSuccessItem struct { // The time at which fast snapshot restores entered the optimizing state. OptimizingTime *time.Time `locationName:"optimizingTime" type:"timestamp"` - // The AWS owner alias that enabled fast snapshot restores on the snapshot. - // This is intended for future use. + // The Amazon Web Services owner alias that enabled fast snapshot restores on + // the snapshot. This is intended for future use. OwnerAlias *string `locationName:"ownerAlias" type:"string"` - // The ID of the AWS account that enabled fast snapshot restores on the snapshot. + // The ID of the account that enabled fast snapshot restores on the snapshot. OwnerId *string `locationName:"ownerId" type:"string"` // The ID of the snapshot. @@ -73986,6 +81328,130 @@ func (s *DisableFastSnapshotRestoresOutput) SetUnsuccessful(v []*DisableFastSnap return s } +type DisableImageDeprecationInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AMI. + // + // ImageId is a required field + ImageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisableImageDeprecationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableImageDeprecationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisableImageDeprecationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisableImageDeprecationInput"} + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *DisableImageDeprecationInput) SetDryRun(v bool) *DisableImageDeprecationInput { + s.DryRun = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *DisableImageDeprecationInput) SetImageId(v string) *DisableImageDeprecationInput { + s.ImageId = &v + return s +} + +type DisableImageDeprecationOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s DisableImageDeprecationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableImageDeprecationOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *DisableImageDeprecationOutput) SetReturn(v bool) *DisableImageDeprecationOutput { + s.Return = &v + return s +} + +type DisableSerialConsoleAccessInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DisableSerialConsoleAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableSerialConsoleAccessInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *DisableSerialConsoleAccessInput) SetDryRun(v bool) *DisableSerialConsoleAccessInput { + s.DryRun = &v + return s +} + +type DisableSerialConsoleAccessOutput struct { + _ struct{} `type:"structure"` + + // If true, access to the EC2 serial console of all instances is enabled for + // your account. If false, access to the EC2 serial console of all instances + // is disabled for your account. + SerialConsoleAccessEnabled *bool `locationName:"serialConsoleAccessEnabled" type:"boolean"` +} + +// String returns the string representation +func (s DisableSerialConsoleAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisableSerialConsoleAccessOutput) GoString() string { + return s.String() +} + +// SetSerialConsoleAccessEnabled sets the SerialConsoleAccessEnabled field's value. +func (s *DisableSerialConsoleAccessOutput) SetSerialConsoleAccessEnabled(v bool) *DisableSerialConsoleAccessOutput { + s.SerialConsoleAccessEnabled = &v + return s +} + type DisableTransitGatewayRouteTablePropagationInput struct { _ struct{} `type:"structure"` @@ -74569,6 +82035,93 @@ func (s *DisassociateIamInstanceProfileOutput) SetIamInstanceProfileAssociation( return s } +type DisassociateInstanceEventWindowInput struct { + _ struct{} `type:"structure"` + + // One or more targets to disassociate from the specified event window. + // + // AssociationTarget is a required field + AssociationTarget *InstanceEventWindowDisassociationRequest `type:"structure" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the event window. + // + // InstanceEventWindowId is a required field + InstanceEventWindowId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s DisassociateInstanceEventWindowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateInstanceEventWindowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateInstanceEventWindowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateInstanceEventWindowInput"} + if s.AssociationTarget == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationTarget")) + } + if s.InstanceEventWindowId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceEventWindowId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationTarget sets the AssociationTarget field's value. +func (s *DisassociateInstanceEventWindowInput) SetAssociationTarget(v *InstanceEventWindowDisassociationRequest) *DisassociateInstanceEventWindowInput { + s.AssociationTarget = v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DisassociateInstanceEventWindowInput) SetDryRun(v bool) *DisassociateInstanceEventWindowInput { + s.DryRun = &v + return s +} + +// SetInstanceEventWindowId sets the InstanceEventWindowId field's value. +func (s *DisassociateInstanceEventWindowInput) SetInstanceEventWindowId(v string) *DisassociateInstanceEventWindowInput { + s.InstanceEventWindowId = &v + return s +} + +type DisassociateInstanceEventWindowOutput struct { + _ struct{} `type:"structure"` + + // Information about the event window. + InstanceEventWindow *InstanceEventWindow `locationName:"instanceEventWindow" type:"structure"` +} + +// String returns the string representation +func (s DisassociateInstanceEventWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateInstanceEventWindowOutput) GoString() string { + return s.String() +} + +// SetInstanceEventWindow sets the InstanceEventWindow field's value. +func (s *DisassociateInstanceEventWindowOutput) SetInstanceEventWindow(v *InstanceEventWindow) *DisassociateInstanceEventWindowOutput { + s.InstanceEventWindow = v + return s +} + type DisassociateRouteTableInput struct { _ struct{} `type:"structure"` @@ -74867,6 +82420,99 @@ func (s *DisassociateTransitGatewayRouteTableOutput) SetAssociation(v *TransitGa return s } +type DisassociateTrunkInterfaceInput struct { + _ struct{} `type:"structure"` + + // The ID ofthe association + // + // AssociationId is a required field + AssociationId *string `type:"string" required:"true"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s DisassociateTrunkInterfaceInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateTrunkInterfaceInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateTrunkInterfaceInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateTrunkInterfaceInput"} + if s.AssociationId == nil { + invalidParams.Add(request.NewErrParamRequired("AssociationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAssociationId sets the AssociationId field's value. +func (s *DisassociateTrunkInterfaceInput) SetAssociationId(v string) *DisassociateTrunkInterfaceInput { + s.AssociationId = &v + return s +} + +// SetClientToken sets the ClientToken field's value. +func (s *DisassociateTrunkInterfaceInput) SetClientToken(v string) *DisassociateTrunkInterfaceInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *DisassociateTrunkInterfaceInput) SetDryRun(v bool) *DisassociateTrunkInterfaceInput { + s.DryRun = &v + return s +} + +type DisassociateTrunkInterfaceOutput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html). + ClientToken *string `locationName:"clientToken" type:"string"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s DisassociateTrunkInterfaceOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s DisassociateTrunkInterfaceOutput) GoString() string { + return s.String() +} + +// SetClientToken sets the ClientToken field's value. +func (s *DisassociateTrunkInterfaceOutput) SetClientToken(v string) *DisassociateTrunkInterfaceOutput { + s.ClientToken = &v + return s +} + +// SetReturn sets the Return field's value. +func (s *DisassociateTrunkInterfaceOutput) SetReturn(v bool) *DisassociateTrunkInterfaceOutput { + s.Return = &v + return s +} + type DisassociateVpcCidrBlockInput struct { _ struct{} `type:"structure"` @@ -75291,15 +82937,15 @@ type EbsBlockDevice struct { // Indicates whether the EBS volume is deleted on instance termination. For // more information, see Preserving Amazon EBS volumes on instance termination // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html#preserving-volumes-on-termination) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. DeleteOnTermination *bool `locationName:"deleteOnTermination" type:"boolean"` // Indicates whether the encryption state of an EBS volume is changed while // being restored from a backing snapshot. The effect of setting the encryption // state to true depends on the volume origin (new or from a snapshot), starting // encryption state, ownership, and whether encryption by default is enabled. - // For more information, see Amazon EBS Encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters) - // in the Amazon Elastic Compute Cloud User Guide. + // For more information, see Amazon EBS encryption (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html#encryption-parameters) + // in the Amazon EC2 User Guide. // // In no case can you remove encryption from an encrypted volume. // @@ -75340,6 +82986,9 @@ type EbsBlockDevice struct { // and RequestSpotInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html). KmsKeyId *string `type:"string"` + // The ARN of the Outpost on which the snapshot is stored. + OutpostArn *string `locationName:"outpostArn" type:"string"` + // The ID of the snapshot. SnapshotId *string `locationName:"snapshotId" type:"string"` @@ -75361,16 +83010,14 @@ type EbsBlockDevice struct { // // * io1 and io2: 4-16,384 // - // * st1: 500-16,384 - // - // * sc1: 500-16,384 + // * st1 and sc1: 125-16,384 // // * standard: 1-1,024 VolumeSize *int64 `locationName:"volumeSize" type:"integer"` // The volume type. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. If the volume type is io1 - // or io2, you must specify the IOPS that the volume supports. + // in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must + // specify the IOPS that the volume supports. VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` } @@ -75408,6 +83055,12 @@ func (s *EbsBlockDevice) SetKmsKeyId(v string) *EbsBlockDevice { return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *EbsBlockDevice) SetOutpostArn(v string) *EbsBlockDevice { + s.OutpostArn = &v + return s +} + // SetSnapshotId sets the SnapshotId field's value. func (s *EbsBlockDevice) SetSnapshotId(v string) *EbsBlockDevice { s.SnapshotId = &v @@ -75440,8 +83093,8 @@ type EbsInfo struct { EbsOptimizedInfo *EbsOptimizedInfo `locationName:"ebsOptimizedInfo" type:"structure"` // Indicates whether the instance type is Amazon EBS-optimized. For more information, - // see Amazon EBS-Optimized Instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) - // in Amazon EC2 User Guide for Linux Instances. + // see Amazon EBS-optimized instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) + // in Amazon EC2 User Guide. EbsOptimizedSupport *string `locationName:"ebsOptimizedSupport" type:"string" enum:"EbsOptimizedSupport"` // Indicates whether Amazon EBS encryption is supported. @@ -75645,6 +83298,30 @@ func (s *EbsOptimizedInfo) SetMaximumThroughputInMBps(v float64) *EbsOptimizedIn return s } +// Describes the Elastic Fabric Adapters for the instance type. +type EfaInfo struct { + _ struct{} `type:"structure"` + + // The maximum number of Elastic Fabric Adapters for the instance type. + MaximumEfaInterfaces *int64 `locationName:"maximumEfaInterfaces" type:"integer"` +} + +// String returns the string representation +func (s EfaInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EfaInfo) GoString() string { + return s.String() +} + +// SetMaximumEfaInterfaces sets the MaximumEfaInterfaces field's value. +func (s *EfaInfo) SetMaximumEfaInterfaces(v int64) *EfaInfo { + s.MaximumEfaInterfaces = &v + return s +} + // Describes an egress-only internet gateway. type EgressOnlyInternetGateway struct { _ struct{} `type:"structure"` @@ -76185,11 +83862,11 @@ type EnableFastSnapshotRestoreSuccessItem struct { // The time at which fast snapshot restores entered the optimizing state. OptimizingTime *time.Time `locationName:"optimizingTime" type:"timestamp"` - // The AWS owner alias that enabled fast snapshot restores on the snapshot. - // This is intended for future use. + // The Amazon Web Services owner alias that enabled fast snapshot restores on + // the snapshot. This is intended for future use. OwnerAlias *string `locationName:"ownerAlias" type:"string"` - // The ID of the AWS account that enabled fast snapshot restores on the snapshot. + // The ID of the account that enabled fast snapshot restores on the snapshot. OwnerId *string `locationName:"ownerId" type:"string"` // The ID of the snapshot. @@ -76299,7 +83976,7 @@ type EnableFastSnapshotRestoresInput struct { DryRun *bool `type:"boolean"` // The IDs of one or more snapshots. For example, snap-1234567890abcdef0. You - // can specify a snapshot that was shared with you from another AWS account. + // can specify a snapshot that was shared with you from another account. // // SourceSnapshotIds is a required field SourceSnapshotIds []*string `locationName:"SourceSnapshotId" locationNameList:"SnapshotId" type:"list" required:"true"` @@ -76383,6 +84060,149 @@ func (s *EnableFastSnapshotRestoresOutput) SetUnsuccessful(v []*EnableFastSnapsh return s } +type EnableImageDeprecationInput struct { + _ struct{} `type:"structure"` + + // The date and time to deprecate the AMI, in UTC, in the following format: + // YYYY-MM-DDTHH:MM:SSZ. If you specify a value for seconds, Amazon EC2 rounds + // the seconds to the nearest minute. + // + // You can’t specify a date in the past. The upper limit for DeprecateAt is + // 10 years from now. + // + // DeprecateAt is a required field + DeprecateAt *time.Time `type:"timestamp" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the AMI. + // + // ImageId is a required field + ImageId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s EnableImageDeprecationInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableImageDeprecationInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *EnableImageDeprecationInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "EnableImageDeprecationInput"} + if s.DeprecateAt == nil { + invalidParams.Add(request.NewErrParamRequired("DeprecateAt")) + } + if s.ImageId == nil { + invalidParams.Add(request.NewErrParamRequired("ImageId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDeprecateAt sets the DeprecateAt field's value. +func (s *EnableImageDeprecationInput) SetDeprecateAt(v time.Time) *EnableImageDeprecationInput { + s.DeprecateAt = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *EnableImageDeprecationInput) SetDryRun(v bool) *EnableImageDeprecationInput { + s.DryRun = &v + return s +} + +// SetImageId sets the ImageId field's value. +func (s *EnableImageDeprecationInput) SetImageId(v string) *EnableImageDeprecationInput { + s.ImageId = &v + return s +} + +type EnableImageDeprecationOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, it returns an error. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s EnableImageDeprecationOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableImageDeprecationOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *EnableImageDeprecationOutput) SetReturn(v bool) *EnableImageDeprecationOutput { + s.Return = &v + return s +} + +type EnableSerialConsoleAccessInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s EnableSerialConsoleAccessInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableSerialConsoleAccessInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *EnableSerialConsoleAccessInput) SetDryRun(v bool) *EnableSerialConsoleAccessInput { + s.DryRun = &v + return s +} + +type EnableSerialConsoleAccessOutput struct { + _ struct{} `type:"structure"` + + // If true, access to the EC2 serial console of all instances is enabled for + // your account. If false, access to the EC2 serial console of all instances + // is disabled for your account. + SerialConsoleAccessEnabled *bool `locationName:"serialConsoleAccessEnabled" type:"boolean"` +} + +// String returns the string representation +func (s EnableSerialConsoleAccessOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s EnableSerialConsoleAccessOutput) GoString() string { + return s.String() +} + +// SetSerialConsoleAccessEnabled sets the SerialConsoleAccessEnabled field's value. +func (s *EnableSerialConsoleAccessOutput) SetSerialConsoleAccessEnabled(v bool) *EnableSerialConsoleAccessOutput { + s.SerialConsoleAccessEnabled = &v + return s +} + type EnableTransitGatewayRouteTablePropagationInput struct { _ struct{} `type:"structure"` @@ -76735,12 +84555,13 @@ func (s *EnableVpcClassicLinkOutput) SetReturn(v bool) *EnableVpcClassicLinkOutp return s } -// Indicates whether the instance is enabled for AWS Nitro Enclaves. +// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. type EnclaveOptions struct { _ struct{} `type:"structure"` - // If this parameter is set to true, the instance is enabled for AWS Nitro Enclaves; - // otherwise, it is not enabled for AWS Nitro Enclaves. + // If this parameter is set to true, the instance is enabled for Amazon Web + // Services Nitro Enclaves; otherwise, it is not enabled for Amazon Web Services + // Nitro Enclaves. Enabled *bool `locationName:"enabled" type:"boolean"` } @@ -76760,13 +84581,14 @@ func (s *EnclaveOptions) SetEnabled(v bool) *EnclaveOptions { return s } -// Indicates whether the instance is enabled for AWS Nitro Enclaves. For more -// information, see What is AWS Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) -// in the AWS Nitro Enclaves User Guide. +// Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. +// For more information, see What is Amazon Web Services Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) +// in the Amazon Web Services Nitro Enclaves User Guide. type EnclaveOptionsRequest struct { _ struct{} `type:"structure"` - // To enable the instance for AWS Nitro Enclaves, set this parameter to true. + // To enable the instance for Amazon Web Services Nitro Enclaves, set this parameter + // to true. Enabled *bool `type:"boolean"` } @@ -76891,6 +84713,431 @@ func (s *EventInformation) SetInstanceId(v string) *EventInformation { return s } +// Describes an explanation code for an unreachable path. For more information, +// see Reachability Analyzer explanation codes (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html). +type Explanation struct { + _ struct{} `type:"structure"` + + // The network ACL. + Acl *AnalysisComponent `locationName:"acl" type:"structure"` + + // The network ACL rule. + AclRule *AnalysisAclRule `locationName:"aclRule" type:"structure"` + + // The IPv4 address, in CIDR notation. + Address *string `locationName:"address" type:"string"` + + // The IPv4 addresses, in CIDR notation. + Addresses []*string `locationName:"addressSet" locationNameList:"item" type:"list"` + + // The resource to which the component is attached. + AttachedTo *AnalysisComponent `locationName:"attachedTo" type:"structure"` + + // The Availability Zones. + AvailabilityZones []*string `locationName:"availabilityZoneSet" locationNameList:"item" type:"list"` + + // The CIDR ranges. + Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` + + // The listener for a Classic Load Balancer. + ClassicLoadBalancerListener *AnalysisLoadBalancerListener `locationName:"classicLoadBalancerListener" type:"structure"` + + // The component. + Component *AnalysisComponent `locationName:"component" type:"structure"` + + // The customer gateway. + CustomerGateway *AnalysisComponent `locationName:"customerGateway" type:"structure"` + + // The destination. + Destination *AnalysisComponent `locationName:"destination" type:"structure"` + + // The destination VPC. + DestinationVpc *AnalysisComponent `locationName:"destinationVpc" type:"structure"` + + // The direction. The following are possible values: + // + // * egress + // + // * ingress + Direction *string `locationName:"direction" type:"string"` + + // The load balancer listener. + ElasticLoadBalancerListener *AnalysisComponent `locationName:"elasticLoadBalancerListener" type:"structure"` + + // The explanation code. + ExplanationCode *string `locationName:"explanationCode" type:"string"` + + // The route table. + IngressRouteTable *AnalysisComponent `locationName:"ingressRouteTable" type:"structure"` + + // The internet gateway. + InternetGateway *AnalysisComponent `locationName:"internetGateway" type:"structure"` + + // The Amazon Resource Name (ARN) of the load balancer. + LoadBalancerArn *string `locationName:"loadBalancerArn" min:"1" type:"string"` + + // The listener port of the load balancer. + LoadBalancerListenerPort *int64 `locationName:"loadBalancerListenerPort" min:"1" type:"integer"` + + // The target. + LoadBalancerTarget *AnalysisLoadBalancerTarget `locationName:"loadBalancerTarget" type:"structure"` + + // The target group. + LoadBalancerTargetGroup *AnalysisComponent `locationName:"loadBalancerTargetGroup" type:"structure"` + + // The target groups. + LoadBalancerTargetGroups []*AnalysisComponent `locationName:"loadBalancerTargetGroupSet" locationNameList:"item" type:"list"` + + // The target port. + LoadBalancerTargetPort *int64 `locationName:"loadBalancerTargetPort" min:"1" type:"integer"` + + // The missing component. + MissingComponent *string `locationName:"missingComponent" type:"string"` + + // The NAT gateway. + NatGateway *AnalysisComponent `locationName:"natGateway" type:"structure"` + + // The network interface. + NetworkInterface *AnalysisComponent `locationName:"networkInterface" type:"structure"` + + // The packet field. + PacketField *string `locationName:"packetField" type:"string"` + + // The port. + Port *int64 `locationName:"port" min:"1" type:"integer"` + + // The port ranges. + PortRanges []*PortRange `locationName:"portRangeSet" locationNameList:"item" type:"list"` + + // The prefix list. + PrefixList *AnalysisComponent `locationName:"prefixList" type:"structure"` + + // The protocols. + Protocols []*string `locationName:"protocolSet" locationNameList:"item" type:"list"` + + // The route table. + RouteTable *AnalysisComponent `locationName:"routeTable" type:"structure"` + + // The route table route. + RouteTableRoute *AnalysisRouteTableRoute `locationName:"routeTableRoute" type:"structure"` + + // The security group. + SecurityGroup *AnalysisComponent `locationName:"securityGroup" type:"structure"` + + // The security group rule. + SecurityGroupRule *AnalysisSecurityGroupRule `locationName:"securityGroupRule" type:"structure"` + + // The security groups. + SecurityGroups []*AnalysisComponent `locationName:"securityGroupSet" locationNameList:"item" type:"list"` + + // The source VPC. + SourceVpc *AnalysisComponent `locationName:"sourceVpc" type:"structure"` + + // The state. + State *string `locationName:"state" type:"string"` + + // The subnet. + Subnet *AnalysisComponent `locationName:"subnet" type:"structure"` + + // The route table for the subnet. + SubnetRouteTable *AnalysisComponent `locationName:"subnetRouteTable" type:"structure"` + + // The component VPC. + Vpc *AnalysisComponent `locationName:"vpc" type:"structure"` + + // The VPC endpoint. + VpcEndpoint *AnalysisComponent `locationName:"vpcEndpoint" type:"structure"` + + // The VPC peering connection. + VpcPeeringConnection *AnalysisComponent `locationName:"vpcPeeringConnection" type:"structure"` + + // The VPN connection. + VpnConnection *AnalysisComponent `locationName:"vpnConnection" type:"structure"` + + // The VPN gateway. + VpnGateway *AnalysisComponent `locationName:"vpnGateway" type:"structure"` +} + +// String returns the string representation +func (s Explanation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s Explanation) GoString() string { + return s.String() +} + +// SetAcl sets the Acl field's value. +func (s *Explanation) SetAcl(v *AnalysisComponent) *Explanation { + s.Acl = v + return s +} + +// SetAclRule sets the AclRule field's value. +func (s *Explanation) SetAclRule(v *AnalysisAclRule) *Explanation { + s.AclRule = v + return s +} + +// SetAddress sets the Address field's value. +func (s *Explanation) SetAddress(v string) *Explanation { + s.Address = &v + return s +} + +// SetAddresses sets the Addresses field's value. +func (s *Explanation) SetAddresses(v []*string) *Explanation { + s.Addresses = v + return s +} + +// SetAttachedTo sets the AttachedTo field's value. +func (s *Explanation) SetAttachedTo(v *AnalysisComponent) *Explanation { + s.AttachedTo = v + return s +} + +// SetAvailabilityZones sets the AvailabilityZones field's value. +func (s *Explanation) SetAvailabilityZones(v []*string) *Explanation { + s.AvailabilityZones = v + return s +} + +// SetCidrs sets the Cidrs field's value. +func (s *Explanation) SetCidrs(v []*string) *Explanation { + s.Cidrs = v + return s +} + +// SetClassicLoadBalancerListener sets the ClassicLoadBalancerListener field's value. +func (s *Explanation) SetClassicLoadBalancerListener(v *AnalysisLoadBalancerListener) *Explanation { + s.ClassicLoadBalancerListener = v + return s +} + +// SetComponent sets the Component field's value. +func (s *Explanation) SetComponent(v *AnalysisComponent) *Explanation { + s.Component = v + return s +} + +// SetCustomerGateway sets the CustomerGateway field's value. +func (s *Explanation) SetCustomerGateway(v *AnalysisComponent) *Explanation { + s.CustomerGateway = v + return s +} + +// SetDestination sets the Destination field's value. +func (s *Explanation) SetDestination(v *AnalysisComponent) *Explanation { + s.Destination = v + return s +} + +// SetDestinationVpc sets the DestinationVpc field's value. +func (s *Explanation) SetDestinationVpc(v *AnalysisComponent) *Explanation { + s.DestinationVpc = v + return s +} + +// SetDirection sets the Direction field's value. +func (s *Explanation) SetDirection(v string) *Explanation { + s.Direction = &v + return s +} + +// SetElasticLoadBalancerListener sets the ElasticLoadBalancerListener field's value. +func (s *Explanation) SetElasticLoadBalancerListener(v *AnalysisComponent) *Explanation { + s.ElasticLoadBalancerListener = v + return s +} + +// SetExplanationCode sets the ExplanationCode field's value. +func (s *Explanation) SetExplanationCode(v string) *Explanation { + s.ExplanationCode = &v + return s +} + +// SetIngressRouteTable sets the IngressRouteTable field's value. +func (s *Explanation) SetIngressRouteTable(v *AnalysisComponent) *Explanation { + s.IngressRouteTable = v + return s +} + +// SetInternetGateway sets the InternetGateway field's value. +func (s *Explanation) SetInternetGateway(v *AnalysisComponent) *Explanation { + s.InternetGateway = v + return s +} + +// SetLoadBalancerArn sets the LoadBalancerArn field's value. +func (s *Explanation) SetLoadBalancerArn(v string) *Explanation { + s.LoadBalancerArn = &v + return s +} + +// SetLoadBalancerListenerPort sets the LoadBalancerListenerPort field's value. +func (s *Explanation) SetLoadBalancerListenerPort(v int64) *Explanation { + s.LoadBalancerListenerPort = &v + return s +} + +// SetLoadBalancerTarget sets the LoadBalancerTarget field's value. +func (s *Explanation) SetLoadBalancerTarget(v *AnalysisLoadBalancerTarget) *Explanation { + s.LoadBalancerTarget = v + return s +} + +// SetLoadBalancerTargetGroup sets the LoadBalancerTargetGroup field's value. +func (s *Explanation) SetLoadBalancerTargetGroup(v *AnalysisComponent) *Explanation { + s.LoadBalancerTargetGroup = v + return s +} + +// SetLoadBalancerTargetGroups sets the LoadBalancerTargetGroups field's value. +func (s *Explanation) SetLoadBalancerTargetGroups(v []*AnalysisComponent) *Explanation { + s.LoadBalancerTargetGroups = v + return s +} + +// SetLoadBalancerTargetPort sets the LoadBalancerTargetPort field's value. +func (s *Explanation) SetLoadBalancerTargetPort(v int64) *Explanation { + s.LoadBalancerTargetPort = &v + return s +} + +// SetMissingComponent sets the MissingComponent field's value. +func (s *Explanation) SetMissingComponent(v string) *Explanation { + s.MissingComponent = &v + return s +} + +// SetNatGateway sets the NatGateway field's value. +func (s *Explanation) SetNatGateway(v *AnalysisComponent) *Explanation { + s.NatGateway = v + return s +} + +// SetNetworkInterface sets the NetworkInterface field's value. +func (s *Explanation) SetNetworkInterface(v *AnalysisComponent) *Explanation { + s.NetworkInterface = v + return s +} + +// SetPacketField sets the PacketField field's value. +func (s *Explanation) SetPacketField(v string) *Explanation { + s.PacketField = &v + return s +} + +// SetPort sets the Port field's value. +func (s *Explanation) SetPort(v int64) *Explanation { + s.Port = &v + return s +} + +// SetPortRanges sets the PortRanges field's value. +func (s *Explanation) SetPortRanges(v []*PortRange) *Explanation { + s.PortRanges = v + return s +} + +// SetPrefixList sets the PrefixList field's value. +func (s *Explanation) SetPrefixList(v *AnalysisComponent) *Explanation { + s.PrefixList = v + return s +} + +// SetProtocols sets the Protocols field's value. +func (s *Explanation) SetProtocols(v []*string) *Explanation { + s.Protocols = v + return s +} + +// SetRouteTable sets the RouteTable field's value. +func (s *Explanation) SetRouteTable(v *AnalysisComponent) *Explanation { + s.RouteTable = v + return s +} + +// SetRouteTableRoute sets the RouteTableRoute field's value. +func (s *Explanation) SetRouteTableRoute(v *AnalysisRouteTableRoute) *Explanation { + s.RouteTableRoute = v + return s +} + +// SetSecurityGroup sets the SecurityGroup field's value. +func (s *Explanation) SetSecurityGroup(v *AnalysisComponent) *Explanation { + s.SecurityGroup = v + return s +} + +// SetSecurityGroupRule sets the SecurityGroupRule field's value. +func (s *Explanation) SetSecurityGroupRule(v *AnalysisSecurityGroupRule) *Explanation { + s.SecurityGroupRule = v + return s +} + +// SetSecurityGroups sets the SecurityGroups field's value. +func (s *Explanation) SetSecurityGroups(v []*AnalysisComponent) *Explanation { + s.SecurityGroups = v + return s +} + +// SetSourceVpc sets the SourceVpc field's value. +func (s *Explanation) SetSourceVpc(v *AnalysisComponent) *Explanation { + s.SourceVpc = v + return s +} + +// SetState sets the State field's value. +func (s *Explanation) SetState(v string) *Explanation { + s.State = &v + return s +} + +// SetSubnet sets the Subnet field's value. +func (s *Explanation) SetSubnet(v *AnalysisComponent) *Explanation { + s.Subnet = v + return s +} + +// SetSubnetRouteTable sets the SubnetRouteTable field's value. +func (s *Explanation) SetSubnetRouteTable(v *AnalysisComponent) *Explanation { + s.SubnetRouteTable = v + return s +} + +// SetVpc sets the Vpc field's value. +func (s *Explanation) SetVpc(v *AnalysisComponent) *Explanation { + s.Vpc = v + return s +} + +// SetVpcEndpoint sets the VpcEndpoint field's value. +func (s *Explanation) SetVpcEndpoint(v *AnalysisComponent) *Explanation { + s.VpcEndpoint = v + return s +} + +// SetVpcPeeringConnection sets the VpcPeeringConnection field's value. +func (s *Explanation) SetVpcPeeringConnection(v *AnalysisComponent) *Explanation { + s.VpcPeeringConnection = v + return s +} + +// SetVpnConnection sets the VpnConnection field's value. +func (s *Explanation) SetVpnConnection(v *AnalysisComponent) *Explanation { + s.VpnConnection = v + return s +} + +// SetVpnGateway sets the VpnGateway field's value. +func (s *Explanation) SetVpnGateway(v *AnalysisComponent) *Explanation { + s.VpnGateway = v + return s +} + type ExportClientVpnClientCertificateRevocationListInput struct { _ struct{} `type:"structure"` @@ -77082,7 +85329,7 @@ type ExportImageInput struct { // S3ExportLocation is a required field S3ExportLocation *ExportTaskS3LocationRequest `type:"structure" required:"true"` - // The tags to apply to the image being exported. + // The tags to apply to the export image task during creation. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } @@ -77200,7 +85447,7 @@ type ExportImageOutput struct { // The status message for the export image task. StatusMessage *string `locationName:"statusMessage" type:"string"` - // Any tags assigned to the image being exported. + // Any tags assigned to the export image task. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -77300,7 +85547,7 @@ type ExportImageTask struct { // The status message for the export image task. StatusMessage *string `locationName:"statusMessage" type:"string"` - // Any tags assigned to the image being exported. + // Any tags assigned to the export image task. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -77362,7 +85609,7 @@ func (s *ExportImageTask) SetTags(v []*Tag) *ExportImageTask { return s } -// Describes an instance export task. +// Describes an export instance task. type ExportTask struct { _ struct{} `type:"structure"` @@ -77521,7 +85768,7 @@ func (s *ExportTaskS3LocationRequest) SetS3Prefix(v string) *ExportTaskS3Locatio return s } -// Describes the format and location for an instance export task. +// Describes the format and location for the export task. type ExportToS3Task struct { _ struct{} `type:"structure"` @@ -77574,7 +85821,7 @@ func (s *ExportToS3Task) SetS3Key(v string) *ExportToS3Task { return s } -// Describes an instance export task. +// Describes an export instance task. type ExportToS3TaskSpecification struct { _ struct{} `type:"structure"` @@ -77851,29 +86098,7 @@ func (s *FederatedAuthenticationRequest) SetSelfServiceSAMLProviderArn(v string) // A filter name and value pair that is used to return a more specific list // of results from a describe operation. Filters can be used to match a set -// of resources by specific criteria, such as tags, attributes, or IDs. The -// filters supported by a describe operation are documented with the describe -// operation. For example: -// -// * DescribeAvailabilityZones -// -// * DescribeImages -// -// * DescribeInstances -// -// * DescribeKeyPairs -// -// * DescribeSecurityGroups -// -// * DescribeSnapshots -// -// * DescribeSubnets -// -// * DescribeTags -// -// * DescribeVolumes -// -// * DescribeVpcs +// of resources by specific criteria, such as tags, attributes, or IDs. type Filter struct { _ struct{} `type:"structure"` @@ -77923,6 +86148,9 @@ type FleetData struct { // Constraints: Maximum 64 ASCII characters ClientToken *string `locationName:"clientToken" type:"string"` + // Reserved. + Context *string `locationName:"context" type:"string"` + // The creation date and time of the EC2 Fleet. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` @@ -77958,7 +86186,10 @@ type FleetData struct { // The allocation strategy of On-Demand Instances in an EC2 Fleet. OnDemandOptions *OnDemandOptions `locationName:"onDemandOptions" type:"structure"` - // Indicates whether EC2 Fleet should replace unhealthy instances. + // Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported + // only for fleets of type maintain. For more information, see EC2 Fleet health + // checks (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) + // in the Amazon EC2 User Guide. ReplaceUnhealthyInstances *bool `locationName:"replaceUnhealthyInstances" type:"boolean"` // The configuration of Spot Instances in an EC2 Fleet. @@ -78020,6 +86251,12 @@ func (s *FleetData) SetClientToken(v string) *FleetData { return s } +// SetContext sets the Context field's value. +func (s *FleetData) SetContext(v string) *FleetData { + s.Context = &v + return s +} + // SetCreateTime sets the CreateTime field's value. func (s *FleetData) SetCreateTime(v time.Time) *FleetData { s.CreateTime = &v @@ -78172,6 +86409,9 @@ type FleetLaunchTemplateConfigRequest struct { // Any parameters that you specify override the same parameters in the launch // template. + // + // For fleets of type request and maintain, a maximum of 300 items is allowed + // across all launch templates. Overrides []*FleetLaunchTemplateOverridesRequest `locationNameList:"item" type:"list"` } @@ -78228,12 +86468,21 @@ type FleetLaunchTemplateOverrides struct { // The location where the instance launched, if applicable. Placement *PlacementResponse `locationName:"placement" type:"structure"` - // The priority for the launch template override. If AllocationStrategy is set - // to prioritized, EC2 Fleet uses priority to determine which launch template - // override to use first in fulfilling On-Demand capacity. The highest priority - // is launched first. Valid values are whole numbers starting at 0. The lower - // the number, the higher the priority. If no number is set, the override has - // the lowest priority. + // The priority for the launch template override. The highest priority is launched + // first. + // + // If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses + // priority to determine which launch template override to use first in fulfilling + // On-Demand capacity. + // + // If the Spot AllocationStrategy is set to capacity-optimized-prioritized, + // EC2 Fleet uses priority on a best-effort basis to determine which launch + // template override to use in fulfilling Spot capacity, but optimizes for capacity + // first. + // + // Valid values are whole numbers starting at 0. The lower the number, the higher + // the priority. If no number is set, the override has the lowest priority. + // You can set the same priority for different launch template overrides. Priority *float64 `locationName:"priority" type:"double"` // The ID of the subnet in which to launch the instances. @@ -78311,12 +86560,21 @@ type FleetLaunchTemplateOverridesRequest struct { // The location where the instance launched, if applicable. Placement *Placement `type:"structure"` - // The priority for the launch template override. If AllocationStrategy is set - // to prioritized, EC2 Fleet uses priority to determine which launch template - // override to use first in fulfilling On-Demand capacity. The highest priority - // is launched first. Valid values are whole numbers starting at 0. The lower - // the number, the higher the priority. If no number is set, the launch template - // override has the lowest priority. + // The priority for the launch template override. The highest priority is launched + // first. + // + // If the On-Demand AllocationStrategy is set to prioritized, EC2 Fleet uses + // priority to determine which launch template override to use first in fulfilling + // On-Demand capacity. + // + // If the Spot AllocationStrategy is set to capacity-optimized-prioritized, + // EC2 Fleet uses priority on a best-effort basis to determine which launch + // template override to use in fulfilling Spot capacity, but optimizes for capacity + // first. + // + // Valid values are whole numbers starting at 0. The lower the number, the higher + // the priority. If no number is set, the launch template override has the lowest + // priority. You can set the same priority for different launch template overrides. Priority *float64 `type:"double"` // The IDs of the subnets in which to launch the instances. Separate multiple @@ -78452,7 +86710,7 @@ func (s *FleetLaunchTemplateSpecification) SetVersion(v string) *FleetLaunchTemp // that can be used by an EC2 Fleet to configure Amazon EC2 instances. For information // about launch templates, see Launching an instance from a launch template // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. type FleetLaunchTemplateSpecificationRequest struct { _ struct{} `type:"structure"` @@ -78550,7 +86808,7 @@ func (s *FleetSpotCapacityRebalance) SetReplacementStrategy(v string) *FleetSpot // The Spot Instance replacement strategy to use when Amazon EC2 emits a signal // that your Spot Instance is at an elevated risk of being interrupted. For // more information, see Capacity rebalancing (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-configuration-strategies.html#ec2-fleet-capacity-rebalance) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. type FleetSpotCapacityRebalanceRequest struct { _ struct{} `type:"structure"` @@ -79436,8 +87694,8 @@ type GetCapacityReservationUsageOutput struct { // and time specified in your request. The reserved capacity is no longer // available for your use. // - // * cancelled - The Capacity Reservation was manually cancelled. The reserved - // capacity is no longer available for your use. + // * cancelled - The Capacity Reservation was cancelled. The reserved capacity + // is no longer available for your use. // // * pending - The Capacity Reservation request was successful but the capacity // provisioning is still pending. @@ -79930,7 +88188,7 @@ func (s *GetEbsDefaultKmsKeyIdInput) SetDryRun(v bool) *GetEbsDefaultKmsKeyIdInp type GetEbsDefaultKmsKeyIdOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the default CMK for encryption by default. + // The Amazon Resource Name (ARN) of the default KMS key for encryption by default. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` } @@ -79999,6 +88257,113 @@ func (s *GetEbsEncryptionByDefaultOutput) SetEbsEncryptionByDefault(v bool) *Get return s } +type GetFlowLogsIntegrationTemplateInput struct { + _ struct{} `type:"structure"` + + // To store the CloudFormation template in Amazon S3, specify the location in + // Amazon S3. + // + // ConfigDeliveryS3DestinationArn is a required field + ConfigDeliveryS3DestinationArn *string `type:"string" required:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the flow log. + // + // FlowLogId is a required field + FlowLogId *string `type:"string" required:"true"` + + // Information about the service integration. + // + // IntegrateServices is a required field + IntegrateServices *IntegrateServices `locationName:"IntegrateService" type:"structure" required:"true"` +} + +// String returns the string representation +func (s GetFlowLogsIntegrationTemplateInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFlowLogsIntegrationTemplateInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetFlowLogsIntegrationTemplateInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetFlowLogsIntegrationTemplateInput"} + if s.ConfigDeliveryS3DestinationArn == nil { + invalidParams.Add(request.NewErrParamRequired("ConfigDeliveryS3DestinationArn")) + } + if s.FlowLogId == nil { + invalidParams.Add(request.NewErrParamRequired("FlowLogId")) + } + if s.IntegrateServices == nil { + invalidParams.Add(request.NewErrParamRequired("IntegrateServices")) + } + if s.IntegrateServices != nil { + if err := s.IntegrateServices.Validate(); err != nil { + invalidParams.AddNested("IntegrateServices", err.(request.ErrInvalidParams)) + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetConfigDeliveryS3DestinationArn sets the ConfigDeliveryS3DestinationArn field's value. +func (s *GetFlowLogsIntegrationTemplateInput) SetConfigDeliveryS3DestinationArn(v string) *GetFlowLogsIntegrationTemplateInput { + s.ConfigDeliveryS3DestinationArn = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *GetFlowLogsIntegrationTemplateInput) SetDryRun(v bool) *GetFlowLogsIntegrationTemplateInput { + s.DryRun = &v + return s +} + +// SetFlowLogId sets the FlowLogId field's value. +func (s *GetFlowLogsIntegrationTemplateInput) SetFlowLogId(v string) *GetFlowLogsIntegrationTemplateInput { + s.FlowLogId = &v + return s +} + +// SetIntegrateServices sets the IntegrateServices field's value. +func (s *GetFlowLogsIntegrationTemplateInput) SetIntegrateServices(v *IntegrateServices) *GetFlowLogsIntegrationTemplateInput { + s.IntegrateServices = v + return s +} + +type GetFlowLogsIntegrationTemplateOutput struct { + _ struct{} `type:"structure"` + + // The generated CloudFormation template. + Result *string `locationName:"result" type:"string"` +} + +// String returns the string representation +func (s GetFlowLogsIntegrationTemplateOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetFlowLogsIntegrationTemplateOutput) GoString() string { + return s.String() +} + +// SetResult sets the Result field's value. +func (s *GetFlowLogsIntegrationTemplateOutput) SetResult(v string) *GetFlowLogsIntegrationTemplateOutput { + s.Result = &v + return s +} + type GetGroupsForCapacityReservationInput struct { _ struct{} `type:"structure"` @@ -80763,6 +89128,57 @@ func (s *GetReservedInstancesExchangeQuoteOutput) SetValidationFailureReason(v s return s } +type GetSerialConsoleAccessStatusInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s GetSerialConsoleAccessStatusInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSerialConsoleAccessStatusInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *GetSerialConsoleAccessStatusInput) SetDryRun(v bool) *GetSerialConsoleAccessStatusInput { + s.DryRun = &v + return s +} + +type GetSerialConsoleAccessStatusOutput struct { + _ struct{} `type:"structure"` + + // If true, access to the EC2 serial console of all instances is enabled for + // your account. If false, access to the EC2 serial console of all instances + // is disabled for your account. + SerialConsoleAccessEnabled *bool `locationName:"serialConsoleAccessEnabled" type:"boolean"` +} + +// String returns the string representation +func (s GetSerialConsoleAccessStatusOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetSerialConsoleAccessStatusOutput) GoString() string { + return s.String() +} + +// SetSerialConsoleAccessEnabled sets the SerialConsoleAccessEnabled field's value. +func (s *GetSerialConsoleAccessStatusOutput) SetSerialConsoleAccessEnabled(v bool) *GetSerialConsoleAccessStatusOutput { + s.SerialConsoleAccessEnabled = &v + return s +} + type GetTransitGatewayAttachmentPropagationsInput struct { _ struct{} `type:"structure"` @@ -81145,7 +89561,7 @@ type GetTransitGatewayRouteTableAssociationsInput struct { // * resource-id - The ID of the resource. // // * resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway - // | peering. + // | peering | connect. // // * transit-gateway-attachment-id - The ID of the attachment. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -81266,7 +89682,7 @@ type GetTransitGatewayRouteTablePropagationsInput struct { // * resource-id - The ID of the resource. // // * resource-type - The resource type. Valid values are vpc | vpn | direct-connect-gateway - // | peering. + // | peering | connect. // // * transit-gateway-attachment-id - The ID of the attachment. Filters []*Filter `locationName:"Filter" locationNameList:"Filter" type:"list"` @@ -81518,7 +89934,7 @@ func (s *GroupIdentifier) SetGroupName(v string) *GroupIdentifier { // Indicates whether your instance is configured for hibernation. This parameter // is valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). // For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. type HibernationOptions struct { _ struct{} `type:"structure"` @@ -81546,7 +89962,7 @@ func (s *HibernationOptions) SetConfigured(v bool) *HibernationOptions { // Indicates whether your instance is configured for hibernation. This parameter // is valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). // For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) -// in the Amazon Elastic Compute Cloud User Guide. +// in the Amazon EC2 User Guide. type HibernationOptionsRequest struct { _ struct{} `type:"structure"` @@ -81673,10 +90089,9 @@ type Host struct { AllocationTime *time.Time `locationName:"allocationTime" type:"timestamp"` // Indicates whether the Dedicated Host supports multiple instance types of - // the same instance family, or a specific instance type only. one indicates - // that the Dedicated Host supports multiple instance types in the instance - // family. off indicates that the Dedicated Host supports a single instance - // type only. + // the same instance family. If the value is on, the Dedicated Host supports + // multiple instance types in the instance family. If the value is off, the + // Dedicated Host supports a single instance type only. AllowsMultipleInstanceTypes *string `locationName:"allowsMultipleInstanceTypes" type:"string" enum:"AllowsMultipleInstanceTypes"` // Whether auto-placement is on or off. @@ -81692,7 +90107,7 @@ type Host struct { AvailableCapacity *AvailableCapacity `locationName:"availableCapacity" type:"structure"` // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` // The ID of the Dedicated Host. @@ -81716,7 +90131,7 @@ type Host struct { // is true, the host is in a host resource group; otherwise, it is not. MemberOfServiceLinkedResourceGroup *bool `locationName:"memberOfServiceLinkedResourceGroup" type:"boolean"` - // The ID of the AWS account that owns the Dedicated Host. + // The ID of the account that owns the Dedicated Host. OwnerId *string `locationName:"ownerId" type:"string"` // The time that the Dedicated Host was released. @@ -81851,7 +90266,7 @@ type HostInstance struct { // The instance type (for example, m3.medium) of the running instance. InstanceType *string `locationName:"instanceType" type:"string"` - // The ID of the AWS account that owns the instance. + // The ID of the account that owns the instance. OwnerId *string `locationName:"ownerId" type:"string"` } @@ -82429,9 +90844,18 @@ type Image struct { // Any block device mapping entries. BlockDeviceMappings []*BlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + // The boot mode of the image. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) + // in the Amazon Elastic Compute Cloud User Guide. + BootMode *string `locationName:"bootMode" type:"string" enum:"BootModeValues"` + // The date and time the image was created. CreationDate *string `locationName:"creationDate" type:"string"` + // The date and time to deprecate the AMI, in UTC, in the following format: + // YYYY-MM-DDTHH:MM:SSZ. If you specified a value for seconds, Amazon EC2 rounds + // the seconds to the nearest minute. + DeprecationTime *string `locationName:"deprecationTime" type:"string"` + // The description of the AMI that was provided during image creation. Description *string `locationName:"description" type:"string"` @@ -82539,12 +90963,24 @@ func (s *Image) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Image { return s } +// SetBootMode sets the BootMode field's value. +func (s *Image) SetBootMode(v string) *Image { + s.BootMode = &v + return s +} + // SetCreationDate sets the CreationDate field's value. func (s *Image) SetCreationDate(v string) *Image { s.CreationDate = &v return s } +// SetDeprecationTime sets the DeprecationTime field's value. +func (s *Image) SetDeprecationTime(v string) *Image { + s.DeprecationTime = &v + return s +} + // SetDescription sets the Description field's value. func (s *Image) SetDescription(v string) *Image { s.Description = &v @@ -82695,7 +91131,7 @@ type ImageDiskContainer struct { // The format of the disk image being imported. // - // Valid values: OVA | VHD | VHDX |VMDK + // Valid values: OVA | VHD | VHDX | VMDK | RAW Format *string `type:"string"` // The ID of the EBS snapshot to be used for importing the snapshot. @@ -82938,7 +91374,7 @@ type ImportImageInput struct { // The name of the role to use when not using the default role, 'vmimport'. RoleName *string `type:"string"` - // The tags to apply to the image being imported. + // The tags to apply to the import image task during creation. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } @@ -83130,7 +91566,7 @@ type ImportImageOutput struct { // A detailed status message of the import task. StatusMessage *string `locationName:"statusMessage" type:"string"` - // Any tags assigned to the image being imported. + // Any tags assigned to the import image task. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -83828,7 +92264,7 @@ type ImportKeyPairOutput struct { // The MD5 public key fingerprint as specified in section 4 of RFC 4716. KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` - // The key pair name you provided. + // The key pair name that you provided. KeyName *string `locationName:"keyName" type:"string"` // The ID of the resulting key pair. @@ -83935,7 +92371,7 @@ type ImportSnapshotInput struct { // The name of the role to use when not using the default role, 'vmimport'. RoleName *string `type:"string"` - // The tags to apply to the snapshot being imported. + // The tags to apply to the import snapshot task during creation. TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` } @@ -84015,7 +92451,7 @@ type ImportSnapshotOutput struct { // Information about the import snapshot task. SnapshotTaskDetail *SnapshotTaskDetail `locationName:"snapshotTaskDetail" type:"structure"` - // Any tags assigned to the snapshot being imported. + // Any tags assigned to the import snapshot task. Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` } @@ -84364,6 +92800,10 @@ type Instance struct { // Any block device mapping entries for the instance. BlockDeviceMappings []*InstanceBlockDeviceMapping `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` + // The boot mode of the instance. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) + // in the Amazon EC2 User Guide. + BootMode *string `locationName:"bootMode" type:"string" enum:"BootModeValues"` + // The ID of the Capacity Reservation. CapacityReservationId *string `locationName:"capacityReservationId" type:"string"` @@ -84392,7 +92832,7 @@ type Instance struct { // Specifies whether enhanced networking with ENA is enabled. EnaSupport *bool `locationName:"enaSupport" type:"boolean"` - // Indicates whether the instance is enabled for AWS Nitro Enclaves. + // Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. EnclaveOptions *EnclaveOptions `locationName:"enclaveOptions" type:"structure"` // Indicates whether the instance is enabled for hibernation. @@ -84489,12 +92929,7 @@ type Instance struct { // The security groups for the instance. SecurityGroups []*GroupIdentifier `locationName:"groupSet" locationNameList:"item" type:"list"` - // Specifies whether to enable an instance launched in a VPC to perform NAT. - // This controls whether source/destination checking is enabled on the instance. - // A value of true means that checking is enabled, and false means that checking - // is disabled. The value must be false for the instance to perform NAT. For - // more information, see NAT Instances (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) - // in the Amazon Virtual Private Cloud User Guide. + // Indicates whether source/destination checking is enabled. SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` // If the request is a Spot Instance request, the ID of the request. @@ -84554,6 +92989,12 @@ func (s *Instance) SetBlockDeviceMappings(v []*InstanceBlockDeviceMapping) *Inst return s } +// SetBootMode sets the BootMode field's value. +func (s *Instance) SetBootMode(v string) *Instance { + s.BootMode = &v + return s +} + // SetCapacityReservationId sets the CapacityReservationId field's value. func (s *Instance) SetCapacityReservationId(v string) *Instance { s.CapacityReservationId = &v @@ -85056,6 +93497,352 @@ func (s *InstanceCreditSpecificationRequest) SetInstanceId(v string) *InstanceCr return s } +// The event window. +type InstanceEventWindow struct { + _ struct{} `type:"structure"` + + // One or more targets associated with the event window. + AssociationTarget *InstanceEventWindowAssociationTarget `locationName:"associationTarget" type:"structure"` + + // The cron expression defined for the event window. + CronExpression *string `locationName:"cronExpression" type:"string"` + + // The ID of the event window. + InstanceEventWindowId *string `locationName:"instanceEventWindowId" type:"string"` + + // The name of the event window. + Name *string `locationName:"name" type:"string"` + + // The current state of the event window. + State *string `locationName:"state" type:"string" enum:"InstanceEventWindowState"` + + // The instance tags associated with the event window. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // One or more time ranges defined for the event window. + TimeRanges []*InstanceEventWindowTimeRange `locationName:"timeRangeSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s InstanceEventWindow) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindow) GoString() string { + return s.String() +} + +// SetAssociationTarget sets the AssociationTarget field's value. +func (s *InstanceEventWindow) SetAssociationTarget(v *InstanceEventWindowAssociationTarget) *InstanceEventWindow { + s.AssociationTarget = v + return s +} + +// SetCronExpression sets the CronExpression field's value. +func (s *InstanceEventWindow) SetCronExpression(v string) *InstanceEventWindow { + s.CronExpression = &v + return s +} + +// SetInstanceEventWindowId sets the InstanceEventWindowId field's value. +func (s *InstanceEventWindow) SetInstanceEventWindowId(v string) *InstanceEventWindow { + s.InstanceEventWindowId = &v + return s +} + +// SetName sets the Name field's value. +func (s *InstanceEventWindow) SetName(v string) *InstanceEventWindow { + s.Name = &v + return s +} + +// SetState sets the State field's value. +func (s *InstanceEventWindow) SetState(v string) *InstanceEventWindow { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *InstanceEventWindow) SetTags(v []*Tag) *InstanceEventWindow { + s.Tags = v + return s +} + +// SetTimeRanges sets the TimeRanges field's value. +func (s *InstanceEventWindow) SetTimeRanges(v []*InstanceEventWindowTimeRange) *InstanceEventWindow { + s.TimeRanges = v + return s +} + +// One or more targets associated with the specified event window. Only one +// type of target (instance ID, instance tag, or Dedicated Host ID) can be associated +// with an event window. +type InstanceEventWindowAssociationRequest struct { + _ struct{} `type:"structure"` + + // The IDs of the Dedicated Hosts to associate with the event window. + DedicatedHostIds []*string `locationName:"DedicatedHostId" locationNameList:"item" type:"list"` + + // The IDs of the instances to associate with the event window. If the instance + // is on a Dedicated Host, you can't specify the Instance ID parameter; you + // must use the Dedicated Host ID parameter. + InstanceIds []*string `locationName:"InstanceId" locationNameList:"item" type:"list"` + + // The instance tags to associate with the event window. Any instances associated + // with the tags will be associated with the event window. + InstanceTags []*Tag `locationName:"InstanceTag" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s InstanceEventWindowAssociationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindowAssociationRequest) GoString() string { + return s.String() +} + +// SetDedicatedHostIds sets the DedicatedHostIds field's value. +func (s *InstanceEventWindowAssociationRequest) SetDedicatedHostIds(v []*string) *InstanceEventWindowAssociationRequest { + s.DedicatedHostIds = v + return s +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *InstanceEventWindowAssociationRequest) SetInstanceIds(v []*string) *InstanceEventWindowAssociationRequest { + s.InstanceIds = v + return s +} + +// SetInstanceTags sets the InstanceTags field's value. +func (s *InstanceEventWindowAssociationRequest) SetInstanceTags(v []*Tag) *InstanceEventWindowAssociationRequest { + s.InstanceTags = v + return s +} + +// One or more targets associated with the event window. +type InstanceEventWindowAssociationTarget struct { + _ struct{} `type:"structure"` + + // The IDs of the Dedicated Hosts associated with the event window. + DedicatedHostIds []*string `locationName:"dedicatedHostIdSet" locationNameList:"item" type:"list"` + + // The IDs of the instances associated with the event window. + InstanceIds []*string `locationName:"instanceIdSet" locationNameList:"item" type:"list"` + + // The instance tags associated with the event window. Any instances associated + // with the tags will be associated with the event window. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s InstanceEventWindowAssociationTarget) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindowAssociationTarget) GoString() string { + return s.String() +} + +// SetDedicatedHostIds sets the DedicatedHostIds field's value. +func (s *InstanceEventWindowAssociationTarget) SetDedicatedHostIds(v []*string) *InstanceEventWindowAssociationTarget { + s.DedicatedHostIds = v + return s +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *InstanceEventWindowAssociationTarget) SetInstanceIds(v []*string) *InstanceEventWindowAssociationTarget { + s.InstanceIds = v + return s +} + +// SetTags sets the Tags field's value. +func (s *InstanceEventWindowAssociationTarget) SetTags(v []*Tag) *InstanceEventWindowAssociationTarget { + s.Tags = v + return s +} + +// The targets to disassociate from the specified event window. +type InstanceEventWindowDisassociationRequest struct { + _ struct{} `type:"structure"` + + // The IDs of the Dedicated Hosts to disassociate from the event window. + DedicatedHostIds []*string `locationName:"DedicatedHostId" locationNameList:"item" type:"list"` + + // The IDs of the instances to disassociate from the event window. + InstanceIds []*string `locationName:"InstanceId" locationNameList:"item" type:"list"` + + // The instance tags to disassociate from the event window. Any instances associated + // with the tags will be disassociated from the event window. + InstanceTags []*Tag `locationName:"InstanceTag" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s InstanceEventWindowDisassociationRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindowDisassociationRequest) GoString() string { + return s.String() +} + +// SetDedicatedHostIds sets the DedicatedHostIds field's value. +func (s *InstanceEventWindowDisassociationRequest) SetDedicatedHostIds(v []*string) *InstanceEventWindowDisassociationRequest { + s.DedicatedHostIds = v + return s +} + +// SetInstanceIds sets the InstanceIds field's value. +func (s *InstanceEventWindowDisassociationRequest) SetInstanceIds(v []*string) *InstanceEventWindowDisassociationRequest { + s.InstanceIds = v + return s +} + +// SetInstanceTags sets the InstanceTags field's value. +func (s *InstanceEventWindowDisassociationRequest) SetInstanceTags(v []*Tag) *InstanceEventWindowDisassociationRequest { + s.InstanceTags = v + return s +} + +// The state of the event window. +type InstanceEventWindowStateChange struct { + _ struct{} `type:"structure"` + + // The ID of the event window. + InstanceEventWindowId *string `locationName:"instanceEventWindowId" type:"string"` + + // The current state of the event window. + State *string `locationName:"state" type:"string" enum:"InstanceEventWindowState"` +} + +// String returns the string representation +func (s InstanceEventWindowStateChange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindowStateChange) GoString() string { + return s.String() +} + +// SetInstanceEventWindowId sets the InstanceEventWindowId field's value. +func (s *InstanceEventWindowStateChange) SetInstanceEventWindowId(v string) *InstanceEventWindowStateChange { + s.InstanceEventWindowId = &v + return s +} + +// SetState sets the State field's value. +func (s *InstanceEventWindowStateChange) SetState(v string) *InstanceEventWindowStateChange { + s.State = &v + return s +} + +// The start day and time and the end day and time of the time range, in UTC. +type InstanceEventWindowTimeRange struct { + _ struct{} `type:"structure"` + + // The hour when the time range ends. + EndHour *int64 `locationName:"endHour" type:"integer"` + + // The day on which the time range ends. + EndWeekDay *string `locationName:"endWeekDay" type:"string" enum:"WeekDay"` + + // The hour when the time range begins. + StartHour *int64 `locationName:"startHour" type:"integer"` + + // The day on which the time range begins. + StartWeekDay *string `locationName:"startWeekDay" type:"string" enum:"WeekDay"` +} + +// String returns the string representation +func (s InstanceEventWindowTimeRange) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindowTimeRange) GoString() string { + return s.String() +} + +// SetEndHour sets the EndHour field's value. +func (s *InstanceEventWindowTimeRange) SetEndHour(v int64) *InstanceEventWindowTimeRange { + s.EndHour = &v + return s +} + +// SetEndWeekDay sets the EndWeekDay field's value. +func (s *InstanceEventWindowTimeRange) SetEndWeekDay(v string) *InstanceEventWindowTimeRange { + s.EndWeekDay = &v + return s +} + +// SetStartHour sets the StartHour field's value. +func (s *InstanceEventWindowTimeRange) SetStartHour(v int64) *InstanceEventWindowTimeRange { + s.StartHour = &v + return s +} + +// SetStartWeekDay sets the StartWeekDay field's value. +func (s *InstanceEventWindowTimeRange) SetStartWeekDay(v string) *InstanceEventWindowTimeRange { + s.StartWeekDay = &v + return s +} + +// The start day and time and the end day and time of the time range, in UTC. +type InstanceEventWindowTimeRangeRequest struct { + _ struct{} `type:"structure"` + + // The hour when the time range ends. + EndHour *int64 `type:"integer"` + + // The day on which the time range ends. + EndWeekDay *string `type:"string" enum:"WeekDay"` + + // The hour when the time range begins. + StartHour *int64 `type:"integer"` + + // The day on which the time range begins. + StartWeekDay *string `type:"string" enum:"WeekDay"` +} + +// String returns the string representation +func (s InstanceEventWindowTimeRangeRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InstanceEventWindowTimeRangeRequest) GoString() string { + return s.String() +} + +// SetEndHour sets the EndHour field's value. +func (s *InstanceEventWindowTimeRangeRequest) SetEndHour(v int64) *InstanceEventWindowTimeRangeRequest { + s.EndHour = &v + return s +} + +// SetEndWeekDay sets the EndWeekDay field's value. +func (s *InstanceEventWindowTimeRangeRequest) SetEndWeekDay(v string) *InstanceEventWindowTimeRangeRequest { + s.EndWeekDay = &v + return s +} + +// SetStartHour sets the StartHour field's value. +func (s *InstanceEventWindowTimeRangeRequest) SetStartHour(v int64) *InstanceEventWindowTimeRangeRequest { + s.StartHour = &v + return s +} + +// SetStartWeekDay sets the StartWeekDay field's value. +func (s *InstanceEventWindowTimeRangeRequest) SetStartWeekDay(v string) *InstanceEventWindowTimeRangeRequest { + s.StartWeekDay = &v + return s +} + // Describes an instance to export. type InstanceExportDetails struct { _ struct{} `type:"structure"` @@ -85397,7 +94184,7 @@ type InstanceNetworkInterface struct { // Describes the type of network interface. // - // Valid values: interface | efa + // Valid values: interface | efa | trunk InterfaceType *string `locationName:"interfaceType" type:"string"` // One or more IPv6 addresses associated with the network interface. @@ -85409,7 +94196,7 @@ type InstanceNetworkInterface struct { // The ID of the network interface. NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // The ID of the AWS account that created the network interface. + // The ID of the account that created the network interface. OwnerId *string `locationName:"ownerId" type:"string"` // The private DNS name. @@ -85421,7 +94208,7 @@ type InstanceNetworkInterface struct { // One or more private IPv4 addresses associated with the network interface. PrivateIpAddresses []*InstancePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` - // Indicates whether to validate network traffic to or from this network interface. + // Indicates whether source/destination checking is enabled. SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` // The status of the network interface. @@ -85668,7 +94455,8 @@ type InstanceNetworkInterfaceSpecification struct { // // You can only assign a carrier IP address to a network interface that is in // a subnet in a Wavelength Zone. For more information about carrier IP addresses, - // see Carrier IP addresses in the AWS Wavelength Developer Guide. + // see Carrier IP addresses in the Amazon Web Services Wavelength Developer + // Guide. AssociateCarrierIpAddress *bool `type:"boolean"` // Indicates whether to assign a public IPv4 address to an instance you launch @@ -85704,8 +94492,6 @@ type InstanceNetworkInterfaceSpecification struct { // see Elastic Fabric Adapter (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html) // in the Amazon Elastic Compute Cloud User Guide. // - // If you are not creating an EFA, specify interface or omit this parameter. - // // Valid values: interface | efa InterfaceType *string `type:"string"` @@ -86398,8 +95184,8 @@ type InstanceTypeInfo struct { // Indicates whether instance storage is supported. InstanceStorageSupported *bool `locationName:"instanceStorageSupported" type:"boolean"` - // The instance type. For more information, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // Describes the memory for the instance type. @@ -86414,6 +95200,10 @@ type InstanceTypeInfo struct { // Describes the processor. ProcessorInfo *ProcessorInfo `locationName:"processorInfo" type:"structure"` + // The supported boot modes. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) + // in the Amazon EC2 User Guide. + SupportedBootModes []*string `locationName:"supportedBootModes" locationNameList:"item" type:"list"` + // The supported root device types. SupportedRootDeviceTypes []*string `locationName:"supportedRootDeviceTypes" locationNameList:"item" type:"list"` @@ -86551,6 +95341,12 @@ func (s *InstanceTypeInfo) SetProcessorInfo(v *ProcessorInfo) *InstanceTypeInfo return s } +// SetSupportedBootModes sets the SupportedBootModes field's value. +func (s *InstanceTypeInfo) SetSupportedBootModes(v []*string) *InstanceTypeInfo { + s.SupportedBootModes = v + return s +} + // SetSupportedRootDeviceTypes sets the SupportedRootDeviceTypes field's value. func (s *InstanceTypeInfo) SetSupportedRootDeviceTypes(v []*string) *InstanceTypeInfo { s.SupportedRootDeviceTypes = v @@ -86579,8 +95375,8 @@ func (s *InstanceTypeInfo) SetVCpuInfo(v *VCpuInfo) *InstanceTypeInfo { type InstanceTypeOffering struct { _ struct{} `type:"structure"` - // The instance type. For more information, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // The identifier for the location. This depends on the location type. For example, @@ -86624,10 +95420,10 @@ func (s *InstanceTypeOffering) SetLocationType(v string) *InstanceTypeOffering { type InstanceUsage struct { _ struct{} `type:"structure"` - // The ID of the AWS account that is making use of the Capacity Reservation. + // The ID of the account that is making use of the Capacity Reservation. AccountId *string `locationName:"accountId" type:"string"` - // The number of instances the AWS account currently has in the Capacity Reservation. + // The number of instances the account currently has in the Capacity Reservation. UsedInstanceCount *int64 `locationName:"usedInstanceCount" type:"integer"` } @@ -86653,6 +95449,53 @@ func (s *InstanceUsage) SetUsedInstanceCount(v int64) *InstanceUsage { return s } +// Describes service integrations with VPC Flow logs. +type IntegrateServices struct { + _ struct{} `type:"structure"` + + // Information about the integration with Amazon Athena. + AthenaIntegrations []*AthenaIntegration `locationName:"AthenaIntegration" locationNameList:"item" min:"1" type:"list"` +} + +// String returns the string representation +func (s IntegrateServices) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s IntegrateServices) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *IntegrateServices) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "IntegrateServices"} + if s.AthenaIntegrations != nil && len(s.AthenaIntegrations) < 1 { + invalidParams.Add(request.NewErrParamMinLen("AthenaIntegrations", 1)) + } + if s.AthenaIntegrations != nil { + for i, v := range s.AthenaIntegrations { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AthenaIntegrations", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAthenaIntegrations sets the AthenaIntegrations field's value. +func (s *IntegrateServices) SetAthenaIntegrations(v []*AthenaIntegration) *IntegrateServices { + s.AthenaIntegrations = v + return s +} + // Describes an internet gateway. type InternetGateway struct { _ struct{} `type:"structure"` @@ -86773,7 +95616,7 @@ type IpPermission struct { // types, you must specify all codes. ToPort *int64 `locationName:"toPort" type:"integer"` - // The security group and AWS account ID pairs. + // The security group and Amazon Web Services account ID pairs. UserIdGroupPairs []*UserIdGroupPair `locationName:"groups" locationNameList:"item" type:"list"` } @@ -87018,9 +95861,9 @@ type KeyPairInfo struct { _ struct{} `type:"structure"` // If you used CreateKeyPair to create the key pair, this is the SHA-1 digest - // of the DER encoded private key. If you used ImportKeyPair to provide AWS - // the public key, this is the MD5 public key fingerprint as specified in section - // 4 of RFC4716. + // of the DER encoded private key. If you used ImportKeyPair to provide Amazon + // Web Services the public key, this is the MD5 public key fingerprint as specified + // in section 4 of RFC4716. KeyFingerprint *string `locationName:"keyFingerprint" type:"string"` // The name of the key pair. @@ -87108,6 +95951,8 @@ type LaunchPermission struct { Group *string `locationName:"group" type:"string" enum:"PermissionGroup"` // The AWS account ID. + // + // Constraints: Up to 10 000 account IDs can be specified in a single request. UserId *string `locationName:"userId" type:"string"` } @@ -87448,8 +96293,7 @@ type LaunchTemplateBlockDeviceMapping struct { // Information about the block device for an EBS volume. Ebs *LaunchTemplateEbsBlockDevice `locationName:"ebs" type:"structure"` - // Suppresses the specified device included in the block device mapping of the - // AMI. + // To omit the device from the block device mapping, specify an empty string. NoDevice *string `locationName:"noDevice" type:"string"` // The virtual device name (ephemeralN). @@ -87501,8 +96345,7 @@ type LaunchTemplateBlockDeviceMappingRequest struct { // launched. Ebs *LaunchTemplateEbsBlockDeviceRequest `type:"structure"` - // Suppresses the specified device included in the block device mapping of the - // AMI. + // To omit the device from the block device mapping, specify an empty string. NoDevice *string `type:"string"` // The virtual device name (ephemeralN). Instance store volumes are numbered @@ -87867,9 +96710,8 @@ type LaunchTemplateEbsBlockDeviceRequest struct { // on the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). // Other instance families guarantee performance up to 32,000 IOPS. // - // This parameter is required for io1 and io2 volumes. The default for gp3 volumes - // is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard - // volumes. + // This parameter is supported for io1, io2, and gp3 volumes only. This parameter + // is not supported for gp2, st1, sc1, or standard volumes. Iops *int64 `type:"integer"` // The ARN of the symmetric AWS Key Management Service (AWS KMS) CMK used for @@ -87885,11 +96727,8 @@ type LaunchTemplateEbsBlockDeviceRequest struct { Throughput *int64 `type:"integer"` // The size of the volume, in GiBs. You must specify either a snapshot ID or - // a volume size. If you specify a snapshot, the default is the snapshot size. - // You can specify a volume size that is equal to or larger than the snapshot - // size. - // - // The following are the supported volumes sizes for each volume type: + // a volume size. The following are the supported volumes sizes for each volume + // type: // // * gp2 and gp3: 1-16,384 // @@ -87900,8 +96739,7 @@ type LaunchTemplateEbsBlockDeviceRequest struct { // * standard: 1-1,024 VolumeSize *int64 `type:"integer"` - // The volume type. The default is gp2. For more information, see Amazon EBS - // volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // The volume type. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. VolumeType *string `type:"string" enum:"VolumeType"` } @@ -88814,12 +97652,20 @@ type LaunchTemplateOverrides struct { // The instance type. InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` - // The priority for the launch template override. If OnDemandAllocationStrategy - // is set to prioritized, Spot Fleet uses priority to determine which launch - // template override to use first in fulfilling On-Demand capacity. The highest - // priority is launched first. Valid values are whole numbers starting at 0. - // The lower the number, the higher the priority. If no number is set, the launch - // template override has the lowest priority. + // The priority for the launch template override. The highest priority is launched + // first. + // + // If OnDemandAllocationStrategy is set to prioritized, Spot Fleet uses priority + // to determine which launch template override to use first in fulfilling On-Demand + // capacity. + // + // If the Spot AllocationStrategy is set to capacityOptimizedPrioritized, Spot + // Fleet uses priority on a best-effort basis to determine which launch template + // override to use in fulfilling Spot capacity, but optimizes for capacity first. + // + // Valid values are whole numbers starting at 0. The lower the number, the higher + // the priority. If no number is set, the launch template override has the lowest + // priority. You can set the same priority for different launch template overrides. Priority *float64 `locationName:"priority" type:"double"` // The maximum price per unit hour that you are willing to pay for a Spot Instance. @@ -90318,6 +99164,88 @@ func (s *MemoryInfo) SetSizeInMiB(v int64) *MemoryInfo { return s } +type ModifyAddressAttributeInput struct { + _ struct{} `type:"structure"` + + // [EC2-VPC] The allocation ID. + // + // AllocationId is a required field + AllocationId *string `type:"string" required:"true"` + + // The domain name to modify for the IP address. + DomainName *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s ModifyAddressAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyAddressAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyAddressAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyAddressAttributeInput"} + if s.AllocationId == nil { + invalidParams.Add(request.NewErrParamRequired("AllocationId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllocationId sets the AllocationId field's value. +func (s *ModifyAddressAttributeInput) SetAllocationId(v string) *ModifyAddressAttributeInput { + s.AllocationId = &v + return s +} + +// SetDomainName sets the DomainName field's value. +func (s *ModifyAddressAttributeInput) SetDomainName(v string) *ModifyAddressAttributeInput { + s.DomainName = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyAddressAttributeInput) SetDryRun(v bool) *ModifyAddressAttributeInput { + s.DryRun = &v + return s +} + +type ModifyAddressAttributeOutput struct { + _ struct{} `type:"structure"` + + // Information about the Elastic IP address. + Address *AddressAttribute `locationName:"address" type:"structure"` +} + +// String returns the string representation +func (s ModifyAddressAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyAddressAttributeOutput) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *ModifyAddressAttributeOutput) SetAddress(v *AddressAttribute) *ModifyAddressAttributeOutput { + s.Address = v + return s +} + type ModifyAvailabilityZoneGroupInput struct { _ struct{} `type:"structure"` @@ -90412,6 +99340,9 @@ func (s *ModifyAvailabilityZoneGroupOutput) SetReturn(v bool) *ModifyAvailabilit type ModifyCapacityReservationInput struct { _ struct{} `type:"structure"` + // Reserved. Capacity Reservations you have created are accepted by default. + Accept *bool `type:"boolean"` + // The ID of the Capacity Reservation. // // CapacityReservationId is a required field @@ -90473,6 +99404,12 @@ func (s *ModifyCapacityReservationInput) Validate() error { return nil } +// SetAccept sets the Accept field's value. +func (s *ModifyCapacityReservationInput) SetAccept(v bool) *ModifyCapacityReservationInput { + s.Accept = &v + return s +} + // SetCapacityReservationId sets the CapacityReservationId field's value. func (s *ModifyCapacityReservationInput) SetCapacityReservationId(v string) *ModifyCapacityReservationInput { s.CapacityReservationId = &v @@ -90808,12 +99745,11 @@ type ModifyEbsDefaultKmsKeyIdInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` - // The identifier of the AWS Key Management Service (AWS KMS) customer master - // key (CMK) to use for Amazon EBS encryption. If this parameter is not specified, - // your AWS managed CMK for EBS is used. If KmsKeyId is specified, the encrypted - // state must be true. + // The identifier of the Key Management Service (KMS) KMS key to use for Amazon + // EBS encryption. If this parameter is not specified, your KMS key for Amazon + // EBS is used. If KmsKeyId is specified, the encrypted state must be true. // - // You can specify the CMK using any of the following: + // You can specify the KMS key using any of the following: // // * Key ID. For example, 1234abcd-12ab-34cd-56ef-1234567890ab. // @@ -90823,11 +99759,11 @@ type ModifyEbsDefaultKmsKeyIdInput struct { // // * Alias ARN. For example, arn:aws:kms:us-east-1:012345678910:alias/ExampleAlias. // - // AWS authenticates the CMK asynchronously. Therefore, if you specify an ID, - // alias, or ARN that is not valid, the action can appear to complete, but eventually - // fails. + // Amazon Web Services authenticates the KMS key asynchronously. Therefore, + // if you specify an ID, alias, or ARN that is not valid, the action can appear + // to complete, but eventually fails. // - // Amazon EBS does not support asymmetric CMKs. + // Amazon EBS does not support asymmetric KMS keys. // // KmsKeyId is a required field KmsKeyId *string `type:"string" required:"true"` @@ -90871,7 +99807,7 @@ func (s *ModifyEbsDefaultKmsKeyIdInput) SetKmsKeyId(v string) *ModifyEbsDefaultK type ModifyEbsDefaultKmsKeyIdOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the default CMK for encryption by default. + // The Amazon Resource Name (ARN) of the default KMS key for encryption by default. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` } @@ -90894,6 +99830,9 @@ func (s *ModifyEbsDefaultKmsKeyIdOutput) SetKmsKeyId(v string) *ModifyEbsDefault type ModifyFleetInput struct { _ struct{} `type:"structure"` + // Reserved. + Context *string `type:"string"` + // Checks whether you have the required permissions for the action, without // actually making the request, and provides an error response. If you have // the required permissions, the error response is DryRunOperation. Otherwise, @@ -90955,6 +99894,12 @@ func (s *ModifyFleetInput) Validate() error { return nil } +// SetContext sets the Context field's value. +func (s *ModifyFleetInput) SetContext(v string) *ModifyFleetInput { + s.Context = &v + return s +} + // SetDryRun sets the DryRun field's value. func (s *ModifyFleetInput) SetDryRun(v bool) *ModifyFleetInput { s.DryRun = &v @@ -91168,8 +100113,8 @@ type ModifyHostsInput struct { HostIds []*string `locationName:"hostId" locationNameList:"item" type:"list" required:"true"` // Indicates whether to enable or disable host recovery for the Dedicated Host. - // For more information, see Host Recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) - // in the Amazon Elastic Compute Cloud User Guide. + // For more information, see Host recovery (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/dedicated-hosts-recovery.html) + // in the Amazon EC2 User Guide. HostRecovery *string `type:"string" enum:"HostRecovery"` // Specifies the instance family to be supported by the Dedicated Host. Specify @@ -91600,7 +100545,7 @@ type ModifyInstanceAttributeInput struct { // To add instance store volumes to an Amazon EBS-backed instance, you must // add them when you launch the instance. For more information, see Updating // the block device mapping when launching an instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html#Using_OverridingAMIBDM) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. BlockDeviceMappings []*InstanceBlockDeviceMappingSpecification `locationName:"blockDeviceMapping" locationNameList:"item" type:"list"` // If the value is true, you can't terminate the instance using the Amazon EC2 @@ -91627,9 +100572,10 @@ type ModifyInstanceAttributeInput struct { // a PV instance can make it unreachable. EnaSupport *AttributeBooleanValue `locationName:"enaSupport" type:"structure"` - // [EC2-VPC] Changes the security groups of the instance. You must specify at - // least one security group, even if it's just the default security group for - // the VPC. You must specify the security group ID, not the security group name. + // [EC2-VPC] Replaces the security groups of the instance with the specified + // security groups. You must specify at least one security group, even if it's + // just the default security group for the VPC. You must specify the security + // group ID, not the security group name. Groups []*string `locationName:"GroupId" locationNameList:"groupId" type:"list"` // The ID of the instance. @@ -91642,8 +100588,9 @@ type ModifyInstanceAttributeInput struct { InstanceInitiatedShutdownBehavior *AttributeValue `locationName:"instanceInitiatedShutdownBehavior" type:"structure"` // Changes the instance type to the specified value. For more information, see - // Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html). - // If the instance type is not valid, the error returned is InvalidInstanceAttributeValue. + // Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) + // in the Amazon EC2 User Guide. If the instance type is not valid, the error + // returned is InvalidInstanceAttributeValue. InstanceType *AttributeValue `locationName:"instanceType" type:"structure"` // Changes the instance's kernel to the specified value. We recommend that you @@ -91656,9 +100603,12 @@ type ModifyInstanceAttributeInput struct { // PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedKernels.html). Ramdisk *AttributeValue `locationName:"ramdisk" type:"structure"` - // Specifies whether source/destination checking is enabled. A value of true - // means that checking is enabled, and false means that checking is disabled. - // This value must be false for a NAT instance to perform NAT. + // Enable or disable source/destination checks, which ensure that the instance + // is either the source or the destination of any traffic that it receives. + // If the value is true, source/destination checks are enabled; otherwise, they + // are disabled. The default value is true. You must disable source/destination + // checks if the instance runs services such as network address translation, + // routing, or firewalls. SourceDestCheck *AttributeBooleanValue `type:"structure"` // Set to simple to enable enhanced networking with the Intel 82599 Virtual @@ -91672,9 +100622,9 @@ type ModifyInstanceAttributeInput struct { SriovNetSupport *AttributeValue `locationName:"sriovNetSupport" type:"structure"` // Changes the instance's user data to the specified value. If you are using - // an AWS SDK or command line tool, base64-encoding is performed for you, and - // you can load the text from a file. Otherwise, you must provide base64-encoded - // text. + // an Amazon Web Services SDK or command line tool, base64-encoding is performed + // for you, and you can load the text from a file. Otherwise, you must provide + // base64-encoded text. UserData *BlobAttributeValue `locationName:"userData" type:"structure"` // A new value for the attribute. Use only with the kernel, ramdisk, userData, @@ -92098,6 +101048,126 @@ func (s *ModifyInstanceEventStartTimeOutput) SetEvent(v *InstanceStatusEvent) *M return s } +type ModifyInstanceEventWindowInput struct { + _ struct{} `type:"structure"` + + // The cron expression of the event window, for example, * 0-4,20-23 * * 1,5. + // + // Constraints: + // + // * Only hour and day of the week values are supported. + // + // * For day of the week values, you can specify either integers 0 through + // 6, or alternative single values SUN through SAT. + // + // * The minute, month, and year must be specified by *. + // + // * The hour value must be one or a multiple range, for example, 0-4 or + // 0-4,20-23. + // + // * Each hour range must be >= 2 hours, for example, 0-2 or 20-23. + // + // * The event window must be >= 4 hours. The combined total time ranges + // in the event window must be >= 4 hours. + // + // For more information about cron expressions, see cron (https://en.wikipedia.org/wiki/Cron) + // on the Wikipedia website. + CronExpression *string `type:"string"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the event window. + // + // InstanceEventWindowId is a required field + InstanceEventWindowId *string `type:"string" required:"true"` + + // The name of the event window. + Name *string `type:"string"` + + // The time ranges of the event window. + TimeRanges []*InstanceEventWindowTimeRangeRequest `locationName:"TimeRange" type:"list"` +} + +// String returns the string representation +func (s ModifyInstanceEventWindowInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstanceEventWindowInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifyInstanceEventWindowInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifyInstanceEventWindowInput"} + if s.InstanceEventWindowId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceEventWindowId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetCronExpression sets the CronExpression field's value. +func (s *ModifyInstanceEventWindowInput) SetCronExpression(v string) *ModifyInstanceEventWindowInput { + s.CronExpression = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifyInstanceEventWindowInput) SetDryRun(v bool) *ModifyInstanceEventWindowInput { + s.DryRun = &v + return s +} + +// SetInstanceEventWindowId sets the InstanceEventWindowId field's value. +func (s *ModifyInstanceEventWindowInput) SetInstanceEventWindowId(v string) *ModifyInstanceEventWindowInput { + s.InstanceEventWindowId = &v + return s +} + +// SetName sets the Name field's value. +func (s *ModifyInstanceEventWindowInput) SetName(v string) *ModifyInstanceEventWindowInput { + s.Name = &v + return s +} + +// SetTimeRanges sets the TimeRanges field's value. +func (s *ModifyInstanceEventWindowInput) SetTimeRanges(v []*InstanceEventWindowTimeRangeRequest) *ModifyInstanceEventWindowInput { + s.TimeRanges = v + return s +} + +type ModifyInstanceEventWindowOutput struct { + _ struct{} `type:"structure"` + + // Information about the event window. + InstanceEventWindow *InstanceEventWindow `locationName:"instanceEventWindow" type:"structure"` +} + +// String returns the string representation +func (s ModifyInstanceEventWindowOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifyInstanceEventWindowOutput) GoString() string { + return s.String() +} + +// SetInstanceEventWindow sets the InstanceEventWindow field's value. +func (s *ModifyInstanceEventWindowOutput) SetInstanceEventWindow(v *InstanceEventWindow) *ModifyInstanceEventWindowOutput { + s.InstanceEventWindow = v + return s +} + type ModifyInstanceMetadataOptionsInput struct { _ struct{} `type:"structure"` @@ -92607,11 +101677,12 @@ type ModifyNetworkInterfaceAttributeInput struct { // NetworkInterfaceId is a required field NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string" required:"true"` - // Indicates whether source/destination checking is enabled. A value of true - // means checking is enabled, and false means checking is disabled. This value - // must be false for a NAT instance to perform NAT. For more information, see - // NAT Instances (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html) - // in the Amazon Virtual Private Cloud User Guide. + // Enable or disable source/destination checks, which ensure that the instance + // is either the source or the destination of any traffic that it receives. + // If the value is true, source/destination checks are enabled; otherwise, they + // are disabled. The default value is true. You must disable source/destination + // checks if the instance runs services such as network address translation, + // routing, or firewalls. SourceDestCheck *AttributeBooleanValue `locationName:"sourceDestCheck" type:"structure"` } @@ -92775,6 +101846,93 @@ func (s *ModifyReservedInstancesOutput) SetReservedInstancesModificationId(v str return s } +type ModifySecurityGroupRulesInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The ID of the security group. + // + // GroupId is a required field + GroupId *string `type:"string" required:"true"` + + // Information about the security group properties to update. + // + // SecurityGroupRules is a required field + SecurityGroupRules []*SecurityGroupRuleUpdate `locationName:"SecurityGroupRule" locationNameList:"item" type:"list" required:"true"` +} + +// String returns the string representation +func (s ModifySecurityGroupRulesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySecurityGroupRulesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ModifySecurityGroupRulesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ModifySecurityGroupRulesInput"} + if s.GroupId == nil { + invalidParams.Add(request.NewErrParamRequired("GroupId")) + } + if s.SecurityGroupRules == nil { + invalidParams.Add(request.NewErrParamRequired("SecurityGroupRules")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDryRun sets the DryRun field's value. +func (s *ModifySecurityGroupRulesInput) SetDryRun(v bool) *ModifySecurityGroupRulesInput { + s.DryRun = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *ModifySecurityGroupRulesInput) SetGroupId(v string) *ModifySecurityGroupRulesInput { + s.GroupId = &v + return s +} + +// SetSecurityGroupRules sets the SecurityGroupRules field's value. +func (s *ModifySecurityGroupRulesInput) SetSecurityGroupRules(v []*SecurityGroupRuleUpdate) *ModifySecurityGroupRulesInput { + s.SecurityGroupRules = v + return s +} + +type ModifySecurityGroupRulesOutput struct { + _ struct{} `type:"structure"` + + // Returns true if the request succeeds; otherwise, returns an error. + Return *bool `locationName:"return" type:"boolean"` +} + +// String returns the string representation +func (s ModifySecurityGroupRulesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ModifySecurityGroupRulesOutput) GoString() string { + return s.String() +} + +// SetReturn sets the Return field's value. +func (s *ModifySecurityGroupRulesOutput) SetReturn(v bool) *ModifySecurityGroupRulesOutput { + s.Return = &v + return s +} + type ModifySnapshotAttributeInput struct { _ struct{} `type:"structure"` @@ -92889,6 +102047,9 @@ func (s ModifySnapshotAttributeOutput) GoString() string { type ModifySpotFleetRequestInput struct { _ struct{} `type:"structure"` + // Reserved. + Context *string `type:"string"` + // Indicates whether running Spot Instances should be terminated if the target // capacity of the Spot Fleet request is decreased below the current size of // the Spot Fleet. @@ -92945,6 +102106,12 @@ func (s *ModifySpotFleetRequestInput) Validate() error { return nil } +// SetContext sets the Context field's value. +func (s *ModifySpotFleetRequestInput) SetContext(v string) *ModifySpotFleetRequestInput { + s.Context = &v + return s +} + // SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. func (s *ModifySpotFleetRequestInput) SetExcessCapacityTerminationPolicy(v string) *ModifySpotFleetRequestInput { s.ExcessCapacityTerminationPolicy = &v @@ -93580,6 +102747,10 @@ func (s *ModifyTransitGatewayInput) SetTransitGatewayId(v string) *ModifyTransit type ModifyTransitGatewayOptions struct { _ struct{} `type:"structure"` + // Adds IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size /24 + // CIDR block or larger for IPv4, or a size /64 CIDR block or larger for IPv6. + AddTransitGatewayCidrBlocks []*string `locationNameList:"item" type:"list"` + // The ID of the default association route table. AssociationDefaultRouteTableId *string `type:"string"` @@ -93600,6 +102771,9 @@ type ModifyTransitGatewayOptions struct { // The ID of the default propagation route table. PropagationDefaultRouteTableId *string `type:"string"` + // Removes CIDR blocks for the transit gateway. + RemoveTransitGatewayCidrBlocks []*string `locationNameList:"item" type:"list"` + // Enable or disable Equal Cost Multipath Protocol support. VpnEcmpSupport *string `type:"string" enum:"VpnEcmpSupportValue"` } @@ -93614,6 +102788,12 @@ func (s ModifyTransitGatewayOptions) GoString() string { return s.String() } +// SetAddTransitGatewayCidrBlocks sets the AddTransitGatewayCidrBlocks field's value. +func (s *ModifyTransitGatewayOptions) SetAddTransitGatewayCidrBlocks(v []*string) *ModifyTransitGatewayOptions { + s.AddTransitGatewayCidrBlocks = v + return s +} + // SetAssociationDefaultRouteTableId sets the AssociationDefaultRouteTableId field's value. func (s *ModifyTransitGatewayOptions) SetAssociationDefaultRouteTableId(v string) *ModifyTransitGatewayOptions { s.AssociationDefaultRouteTableId = &v @@ -93650,6 +102830,12 @@ func (s *ModifyTransitGatewayOptions) SetPropagationDefaultRouteTableId(v string return s } +// SetRemoveTransitGatewayCidrBlocks sets the RemoveTransitGatewayCidrBlocks field's value. +func (s *ModifyTransitGatewayOptions) SetRemoveTransitGatewayCidrBlocks(v []*string) *ModifyTransitGatewayOptions { + s.RemoveTransitGatewayCidrBlocks = v + return s +} + // SetVpnEcmpSupport sets the VpnEcmpSupport field's value. func (s *ModifyTransitGatewayOptions) SetVpnEcmpSupport(v string) *ModifyTransitGatewayOptions { s.VpnEcmpSupport = &v @@ -94024,9 +103210,17 @@ type ModifyVolumeInput struct { // // * io2: 100-64,000 IOPS // - // Default: If no IOPS value is specified, the existing value is retained. + // Default: The existing value is retained if you keep the same volume type. + // If you change the volume type to io1, io2, or gp3, the default is 3,000. Iops *int64 `type:"integer"` + // Specifies whether to enable Amazon EBS Multi-Attach. If you enable Multi-Attach, + // you can attach the volume to up to 16 Nitro-based instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances) + // in the same Availability Zone. This parameter is supported with io1 and io2 + // volumes only. For more information, see Amazon EBS Multi-Attach (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-volumes-multi.html) + // in the Amazon Elastic Compute Cloud User Guide. + MultiAttachEnabled *bool `type:"boolean"` + // The target size of the volume, in GiB. The target volume size must be greater // than or equal to the existing size of the volume. // @@ -94040,13 +103234,14 @@ type ModifyVolumeInput struct { // // * standard: 1-1,024 // - // Default: If no size is specified, the existing size is retained. + // Default: The existing size is retained. Size *int64 `type:"integer"` // The target throughput of the volume, in MiB/s. This parameter is valid only // for gp3 volumes. The maximum value is 1,000. // - // Default: If no throughput value is specified, the existing value is retained. + // Default: The existing value is retained if the source and target volume type + // is gp3. Otherwise, the default value is 125. // // Valid Range: Minimum value of 125. Maximum value of 1000. Throughput *int64 `type:"integer"` @@ -94060,7 +103255,7 @@ type ModifyVolumeInput struct { // EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) // in the Amazon Elastic Compute Cloud User Guide. // - // Default: If no type is specified, the existing type is retained. + // Default: The existing type is retained. VolumeType *string `type:"string" enum:"VolumeType"` } @@ -94099,6 +103294,12 @@ func (s *ModifyVolumeInput) SetIops(v int64) *ModifyVolumeInput { return s } +// SetMultiAttachEnabled sets the MultiAttachEnabled field's value. +func (s *ModifyVolumeInput) SetMultiAttachEnabled(v bool) *ModifyVolumeInput { + s.MultiAttachEnabled = &v + return s +} + // SetSize sets the Size field's value. func (s *ModifyVolumeInput) SetSize(v int64) *ModifyVolumeInput { s.Size = &v @@ -95792,6 +104993,9 @@ func (s *MovingAddressStatus) SetPublicIp(v string) *MovingAddressStatus { type NatGateway struct { _ struct{} `type:"structure"` + // Indicates whether the NAT gateway supports public or private connectivity. + ConnectivityType *string `locationName:"connectivityType" type:"string" enum:"ConnectivityType"` + // The date and time the NAT gateway was created. CreateTime *time.Time `locationName:"createTime" type:"timestamp"` @@ -95876,6 +105080,12 @@ func (s NatGateway) GoString() string { return s.String() } +// SetConnectivityType sets the ConnectivityType field's value. +func (s *NatGateway) SetConnectivityType(v string) *NatGateway { + s.ConnectivityType = &v + return s +} + // SetCreateTime sets the CreateTime field's value. func (s *NatGateway) SetCreateTime(v time.Time) *NatGateway { s.CreateTime = &v @@ -95946,17 +105156,18 @@ func (s *NatGateway) SetVpcId(v string) *NatGateway { type NatGatewayAddress struct { _ struct{} `type:"structure"` - // The allocation ID of the Elastic IP address that's associated with the NAT - // gateway. + // [Public NAT gateway only] The allocation ID of the Elastic IP address that's + // associated with the NAT gateway. AllocationId *string `locationName:"allocationId" type:"string"` // The ID of the network interface associated with the NAT gateway. NetworkInterfaceId *string `locationName:"networkInterfaceId" type:"string"` - // The private IP address associated with the Elastic IP address. + // The private IP address associated with the NAT gateway. PrivateIp *string `locationName:"privateIp" type:"string"` - // The Elastic IP address associated with the NAT gateway. + // [Public NAT gateway only] The Elastic IP address associated with the NAT + // gateway. PublicIp *string `locationName:"publicIp" type:"string"` } @@ -96252,6 +105463,9 @@ type NetworkInfo struct { // The index of the default network card, starting at 0. DefaultNetworkCardIndex *int64 `locationName:"defaultNetworkCardIndex" type:"integer"` + // Describes the Elastic Fabric Adapters for the instance type. + EfaInfo *EfaInfo `locationName:"efaInfo" type:"structure"` + // Indicates whether Elastic Fabric Adapter (EFA) is supported. EfaSupported *bool `locationName:"efaSupported" type:"boolean"` @@ -96297,6 +105511,12 @@ func (s *NetworkInfo) SetDefaultNetworkCardIndex(v int64) *NetworkInfo { return s } +// SetEfaInfo sets the EfaInfo field's value. +func (s *NetworkInfo) SetEfaInfo(v *EfaInfo) *NetworkInfo { + s.EfaInfo = v + return s +} + // SetEfaSupported sets the EfaSupported field's value. func (s *NetworkInfo) SetEfaSupported(v bool) *NetworkInfo { s.EfaSupported = &v @@ -96351,6 +105571,244 @@ func (s *NetworkInfo) SetNetworkPerformance(v string) *NetworkInfo { return s } +// Describes a network insights analysis. +type NetworkInsightsAnalysis struct { + _ struct{} `type:"structure"` + + // Potential intermediate components. + AlternatePathHints []*AlternatePathHint `locationName:"alternatePathHintSet" locationNameList:"item" type:"list"` + + // The explanations. For more information, see Reachability Analyzer explanation + // codes (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html). + Explanations []*Explanation `locationName:"explanationSet" locationNameList:"item" type:"list"` + + // The Amazon Resource Names (ARN) of the AWS resources that the path must traverse. + FilterInArns []*string `locationName:"filterInArnSet" locationNameList:"item" type:"list"` + + // The components in the path from source to destination. + ForwardPathComponents []*PathComponent `locationName:"forwardPathComponentSet" locationNameList:"item" type:"list"` + + // The Amazon Resource Name (ARN) of the network insights analysis. + NetworkInsightsAnalysisArn *string `locationName:"networkInsightsAnalysisArn" min:"1" type:"string"` + + // The ID of the network insights analysis. + NetworkInsightsAnalysisId *string `locationName:"networkInsightsAnalysisId" type:"string"` + + // The ID of the path. + NetworkInsightsPathId *string `locationName:"networkInsightsPathId" type:"string"` + + // Indicates whether the destination is reachable from the source. + NetworkPathFound *bool `locationName:"networkPathFound" type:"boolean"` + + // The components in the path from destination to source. + ReturnPathComponents []*PathComponent `locationName:"returnPathComponentSet" locationNameList:"item" type:"list"` + + // The time the analysis started. + StartDate *time.Time `locationName:"startDate" type:"timestamp"` + + // The status of the network insights analysis. + Status *string `locationName:"status" type:"string" enum:"AnalysisStatus"` + + // The status message, if the status is failed. + StatusMessage *string `locationName:"statusMessage" type:"string"` + + // The tags. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s NetworkInsightsAnalysis) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInsightsAnalysis) GoString() string { + return s.String() +} + +// SetAlternatePathHints sets the AlternatePathHints field's value. +func (s *NetworkInsightsAnalysis) SetAlternatePathHints(v []*AlternatePathHint) *NetworkInsightsAnalysis { + s.AlternatePathHints = v + return s +} + +// SetExplanations sets the Explanations field's value. +func (s *NetworkInsightsAnalysis) SetExplanations(v []*Explanation) *NetworkInsightsAnalysis { + s.Explanations = v + return s +} + +// SetFilterInArns sets the FilterInArns field's value. +func (s *NetworkInsightsAnalysis) SetFilterInArns(v []*string) *NetworkInsightsAnalysis { + s.FilterInArns = v + return s +} + +// SetForwardPathComponents sets the ForwardPathComponents field's value. +func (s *NetworkInsightsAnalysis) SetForwardPathComponents(v []*PathComponent) *NetworkInsightsAnalysis { + s.ForwardPathComponents = v + return s +} + +// SetNetworkInsightsAnalysisArn sets the NetworkInsightsAnalysisArn field's value. +func (s *NetworkInsightsAnalysis) SetNetworkInsightsAnalysisArn(v string) *NetworkInsightsAnalysis { + s.NetworkInsightsAnalysisArn = &v + return s +} + +// SetNetworkInsightsAnalysisId sets the NetworkInsightsAnalysisId field's value. +func (s *NetworkInsightsAnalysis) SetNetworkInsightsAnalysisId(v string) *NetworkInsightsAnalysis { + s.NetworkInsightsAnalysisId = &v + return s +} + +// SetNetworkInsightsPathId sets the NetworkInsightsPathId field's value. +func (s *NetworkInsightsAnalysis) SetNetworkInsightsPathId(v string) *NetworkInsightsAnalysis { + s.NetworkInsightsPathId = &v + return s +} + +// SetNetworkPathFound sets the NetworkPathFound field's value. +func (s *NetworkInsightsAnalysis) SetNetworkPathFound(v bool) *NetworkInsightsAnalysis { + s.NetworkPathFound = &v + return s +} + +// SetReturnPathComponents sets the ReturnPathComponents field's value. +func (s *NetworkInsightsAnalysis) SetReturnPathComponents(v []*PathComponent) *NetworkInsightsAnalysis { + s.ReturnPathComponents = v + return s +} + +// SetStartDate sets the StartDate field's value. +func (s *NetworkInsightsAnalysis) SetStartDate(v time.Time) *NetworkInsightsAnalysis { + s.StartDate = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *NetworkInsightsAnalysis) SetStatus(v string) *NetworkInsightsAnalysis { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *NetworkInsightsAnalysis) SetStatusMessage(v string) *NetworkInsightsAnalysis { + s.StatusMessage = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *NetworkInsightsAnalysis) SetTags(v []*Tag) *NetworkInsightsAnalysis { + s.Tags = v + return s +} + +// Describes a path. +type NetworkInsightsPath struct { + _ struct{} `type:"structure"` + + // The time stamp when the path was created. + CreatedDate *time.Time `locationName:"createdDate" type:"timestamp"` + + // The AWS resource that is the destination of the path. + Destination *string `locationName:"destination" type:"string"` + + // The IP address of the AWS resource that is the destination of the path. + DestinationIp *string `locationName:"destinationIp" type:"string"` + + // The destination port. + DestinationPort *int64 `locationName:"destinationPort" type:"integer"` + + // The Amazon Resource Name (ARN) of the path. + NetworkInsightsPathArn *string `locationName:"networkInsightsPathArn" min:"1" type:"string"` + + // The ID of the path. + NetworkInsightsPathId *string `locationName:"networkInsightsPathId" type:"string"` + + // The protocol. + Protocol *string `locationName:"protocol" type:"string" enum:"Protocol"` + + // The AWS resource that is the source of the path. + Source *string `locationName:"source" type:"string"` + + // The IP address of the AWS resource that is the source of the path. + SourceIp *string `locationName:"sourceIp" type:"string"` + + // The tags associated with the path. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s NetworkInsightsPath) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s NetworkInsightsPath) GoString() string { + return s.String() +} + +// SetCreatedDate sets the CreatedDate field's value. +func (s *NetworkInsightsPath) SetCreatedDate(v time.Time) *NetworkInsightsPath { + s.CreatedDate = &v + return s +} + +// SetDestination sets the Destination field's value. +func (s *NetworkInsightsPath) SetDestination(v string) *NetworkInsightsPath { + s.Destination = &v + return s +} + +// SetDestinationIp sets the DestinationIp field's value. +func (s *NetworkInsightsPath) SetDestinationIp(v string) *NetworkInsightsPath { + s.DestinationIp = &v + return s +} + +// SetDestinationPort sets the DestinationPort field's value. +func (s *NetworkInsightsPath) SetDestinationPort(v int64) *NetworkInsightsPath { + s.DestinationPort = &v + return s +} + +// SetNetworkInsightsPathArn sets the NetworkInsightsPathArn field's value. +func (s *NetworkInsightsPath) SetNetworkInsightsPathArn(v string) *NetworkInsightsPath { + s.NetworkInsightsPathArn = &v + return s +} + +// SetNetworkInsightsPathId sets the NetworkInsightsPathId field's value. +func (s *NetworkInsightsPath) SetNetworkInsightsPathId(v string) *NetworkInsightsPath { + s.NetworkInsightsPathId = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *NetworkInsightsPath) SetProtocol(v string) *NetworkInsightsPath { + s.Protocol = &v + return s +} + +// SetSource sets the Source field's value. +func (s *NetworkInsightsPath) SetSource(v string) *NetworkInsightsPath { + s.Source = &v + return s +} + +// SetSourceIp sets the SourceIp field's value. +func (s *NetworkInsightsPath) SetSourceIp(v string) *NetworkInsightsPath { + s.SourceIp = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *NetworkInsightsPath) SetTags(v []*Tag) *NetworkInsightsPath { + s.Tags = v + return s +} + // Describes a network interface. type NetworkInterface struct { _ struct{} `type:"structure"` @@ -96386,7 +105844,7 @@ type NetworkInterface struct { // The Amazon Resource Name (ARN) of the Outpost. OutpostArn *string `locationName:"outpostArn" type:"string"` - // The AWS account ID of the owner of the network interface. + // The account ID of the owner of the network interface. OwnerId *string `locationName:"ownerId" type:"string"` // The private DNS name. @@ -96398,14 +105856,14 @@ type NetworkInterface struct { // The private IPv4 addresses associated with the network interface. PrivateIpAddresses []*NetworkInterfacePrivateIpAddress `locationName:"privateIpAddressesSet" locationNameList:"item" type:"list"` - // The ID of the entity that launched the instance on your behalf (for example, - // AWS Management Console or Auto Scaling). + // The alias or account ID of the principal or service that created the network + // interface. RequesterId *string `locationName:"requesterId" type:"string"` - // Indicates whether the network interface is being managed by AWS. + // Indicates whether the network interface is being managed by Amazon Web Services. RequesterManaged *bool `locationName:"requesterManaged" type:"boolean"` - // Indicates whether traffic to or from the instance is validated. + // Indicates whether source/destination checking is enabled. SourceDestCheck *bool `locationName:"sourceDestCheck" type:"boolean"` // The status of the network interface. @@ -96659,7 +106117,7 @@ type NetworkInterfaceAttachment struct { // The ID of the instance. InstanceId *string `locationName:"instanceId" type:"string"` - // The AWS account ID of the owner of the instance. + // The account ID of the owner of the instance. InstanceOwnerId *string `locationName:"instanceOwnerId" type:"string"` // The index of the network card. @@ -96788,10 +106246,10 @@ func (s *NetworkInterfaceIpv6Address) SetIpv6Address(v string) *NetworkInterface type NetworkInterfacePermission struct { _ struct{} `type:"structure"` - // The AWS account ID. + // The account ID. AwsAccountId *string `locationName:"awsAccountId" type:"string"` - // The AWS service. + // The Amazon Web Service. AwsService *string `locationName:"awsService" type:"string"` // The ID of the network interface. @@ -97127,6 +106585,120 @@ func (s *OnDemandOptionsRequest) SetSingleInstanceType(v bool) *OnDemandOptionsR return s } +// Describes a path component. +type PathComponent struct { + _ struct{} `type:"structure"` + + // The network ACL rule. + AclRule *AnalysisAclRule `locationName:"aclRule" type:"structure"` + + // The component. + Component *AnalysisComponent `locationName:"component" type:"structure"` + + // The destination VPC. + DestinationVpc *AnalysisComponent `locationName:"destinationVpc" type:"structure"` + + // The inbound header. + InboundHeader *AnalysisPacketHeader `locationName:"inboundHeader" type:"structure"` + + // The outbound header. + OutboundHeader *AnalysisPacketHeader `locationName:"outboundHeader" type:"structure"` + + // The route table route. + RouteTableRoute *AnalysisRouteTableRoute `locationName:"routeTableRoute" type:"structure"` + + // The security group rule. + SecurityGroupRule *AnalysisSecurityGroupRule `locationName:"securityGroupRule" type:"structure"` + + // The sequence number. + SequenceNumber *int64 `locationName:"sequenceNumber" type:"integer"` + + // The source VPC. + SourceVpc *AnalysisComponent `locationName:"sourceVpc" type:"structure"` + + // The subnet. + Subnet *AnalysisComponent `locationName:"subnet" type:"structure"` + + // The component VPC. + Vpc *AnalysisComponent `locationName:"vpc" type:"structure"` +} + +// String returns the string representation +func (s PathComponent) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PathComponent) GoString() string { + return s.String() +} + +// SetAclRule sets the AclRule field's value. +func (s *PathComponent) SetAclRule(v *AnalysisAclRule) *PathComponent { + s.AclRule = v + return s +} + +// SetComponent sets the Component field's value. +func (s *PathComponent) SetComponent(v *AnalysisComponent) *PathComponent { + s.Component = v + return s +} + +// SetDestinationVpc sets the DestinationVpc field's value. +func (s *PathComponent) SetDestinationVpc(v *AnalysisComponent) *PathComponent { + s.DestinationVpc = v + return s +} + +// SetInboundHeader sets the InboundHeader field's value. +func (s *PathComponent) SetInboundHeader(v *AnalysisPacketHeader) *PathComponent { + s.InboundHeader = v + return s +} + +// SetOutboundHeader sets the OutboundHeader field's value. +func (s *PathComponent) SetOutboundHeader(v *AnalysisPacketHeader) *PathComponent { + s.OutboundHeader = v + return s +} + +// SetRouteTableRoute sets the RouteTableRoute field's value. +func (s *PathComponent) SetRouteTableRoute(v *AnalysisRouteTableRoute) *PathComponent { + s.RouteTableRoute = v + return s +} + +// SetSecurityGroupRule sets the SecurityGroupRule field's value. +func (s *PathComponent) SetSecurityGroupRule(v *AnalysisSecurityGroupRule) *PathComponent { + s.SecurityGroupRule = v + return s +} + +// SetSequenceNumber sets the SequenceNumber field's value. +func (s *PathComponent) SetSequenceNumber(v int64) *PathComponent { + s.SequenceNumber = &v + return s +} + +// SetSourceVpc sets the SourceVpc field's value. +func (s *PathComponent) SetSourceVpc(v *AnalysisComponent) *PathComponent { + s.SourceVpc = v + return s +} + +// SetSubnet sets the Subnet field's value. +func (s *PathComponent) SetSubnet(v *AnalysisComponent) *PathComponent { + s.Subnet = v + return s +} + +// SetVpc sets the Vpc field's value. +func (s *PathComponent) SetVpc(v *AnalysisComponent) *PathComponent { + s.Vpc = v + return s +} + // Describes the data that identifies an Amazon FPGA image (AFI) on the PCI // bus. type PciId struct { @@ -97922,11 +107494,11 @@ func (s *PortRange) SetTo(v int64) *PortRange { return s } -// Describes prefixes for AWS services. +// Describes prefixes for Amazon Web Services services. type PrefixList struct { _ struct{} `type:"structure"` - // The IP address range of the AWS service. + // The IP address range of the Amazon Web Service. Cidrs []*string `locationName:"cidrSet" locationNameList:"item" type:"list"` // The ID of the prefix. @@ -98470,6 +108042,9 @@ type ProvisionByoipCidrInput struct { // it is UnauthorizedOperation. DryRun *bool `type:"boolean"` + // Reserved. + MultiRegion *bool `type:"boolean"` + // The tags to apply to the address pool. PoolTagSpecifications []*TagSpecification `locationName:"PoolTagSpecification" locationNameList:"item" type:"list"` @@ -98532,6 +108107,12 @@ func (s *ProvisionByoipCidrInput) SetDryRun(v bool) *ProvisionByoipCidrInput { return s } +// SetMultiRegion sets the MultiRegion field's value. +func (s *ProvisionByoipCidrInput) SetMultiRegion(v bool) *ProvisionByoipCidrInput { + s.MultiRegion = &v + return s +} + // SetPoolTagSpecifications sets the PoolTagSpecifications field's value. func (s *ProvisionByoipCidrInput) SetPoolTagSpecifications(v []*TagSpecification) *ProvisionByoipCidrInput { s.PoolTagSpecifications = v @@ -98639,6 +108220,48 @@ func (s *ProvisionedBandwidth) SetStatus(v string) *ProvisionedBandwidth { return s } +// The status of an updated pointer (PTR) record for an Elastic IP address. +type PtrUpdateStatus struct { + _ struct{} `type:"structure"` + + // The reason for the PTR record update. + Reason *string `locationName:"reason" type:"string"` + + // The status of the PTR record update. + Status *string `locationName:"status" type:"string"` + + // The value for the PTR record update. + Value *string `locationName:"value" type:"string"` +} + +// String returns the string representation +func (s PtrUpdateStatus) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PtrUpdateStatus) GoString() string { + return s.String() +} + +// SetReason sets the Reason field's value. +func (s *PtrUpdateStatus) SetReason(v string) *PtrUpdateStatus { + s.Reason = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *PtrUpdateStatus) SetStatus(v string) *PtrUpdateStatus { + s.Status = &v + return s +} + +// SetValue sets the Value field's value. +func (s *PtrUpdateStatus) SetValue(v string) *PtrUpdateStatus { + s.Value = &v + return s +} + // Describes an IPv4 address pool. type PublicIpv4Pool struct { _ struct{} `type:"structure"` @@ -98648,7 +108271,7 @@ type PublicIpv4Pool struct { // The name of the location from which the address pool is advertised. A network // border group is a unique set of Availability Zones or Local Zones from where - // AWS advertises public IP addresses. + // Amazon Web Services advertises public IP addresses. NetworkBorderGroup *string `locationName:"networkBorderGroup" type:"string"` // The address ranges. @@ -98863,7 +108486,7 @@ type PurchaseHostReservationInput struct { _ struct{} `type:"structure"` // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `type:"string"` // The currency in which the totalUpfrontPrice, LimitPrice, and totalHourlyPrice @@ -98958,7 +108581,7 @@ type PurchaseHostReservationOutput struct { _ struct{} `type:"structure"` // Unique, case-sensitive identifier that you provide to ensure the idempotency - // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + // of the request. For more information, see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` // The currency in which the totalUpfrontPrice and totalHourlyPrice amounts @@ -99158,7 +108781,10 @@ func (s *PurchaseReservedInstancesOfferingInput) SetReservedInstancesOfferingId( type PurchaseReservedInstancesOfferingOutput struct { _ struct{} `type:"structure"` - // The IDs of the purchased Reserved Instances. + // The IDs of the purchased Reserved Instances. If your purchase crosses into + // a discounted pricing tier, the final Reserved Instances IDs might change. + // For more information, see Crossing pricing tiers (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts-reserved-instances-application.html#crossing-pricing-tiers) + // in the Amazon Elastic Compute Cloud User Guide. ReservedInstancesId *string `locationName:"reservedInstancesId" type:"string"` } @@ -99373,6 +108999,66 @@ func (s *RecurringCharge) SetFrequency(v string) *RecurringCharge { return s } +// Describes the security group that is referenced in the security group rule. +type ReferencedSecurityGroup struct { + _ struct{} `type:"structure"` + + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` + + // The status of a VPC peering connection, if applicable. + PeeringStatus *string `locationName:"peeringStatus" type:"string"` + + // The account ID. + UserId *string `locationName:"userId" type:"string"` + + // The ID of the VPC. + VpcId *string `locationName:"vpcId" type:"string"` + + // The ID of the VPC peering connection. + VpcPeeringConnectionId *string `locationName:"vpcPeeringConnectionId" type:"string"` +} + +// String returns the string representation +func (s ReferencedSecurityGroup) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReferencedSecurityGroup) GoString() string { + return s.String() +} + +// SetGroupId sets the GroupId field's value. +func (s *ReferencedSecurityGroup) SetGroupId(v string) *ReferencedSecurityGroup { + s.GroupId = &v + return s +} + +// SetPeeringStatus sets the PeeringStatus field's value. +func (s *ReferencedSecurityGroup) SetPeeringStatus(v string) *ReferencedSecurityGroup { + s.PeeringStatus = &v + return s +} + +// SetUserId sets the UserId field's value. +func (s *ReferencedSecurityGroup) SetUserId(v string) *ReferencedSecurityGroup { + s.UserId = &v + return s +} + +// SetVpcId sets the VpcId field's value. +func (s *ReferencedSecurityGroup) SetVpcId(v string) *ReferencedSecurityGroup { + s.VpcId = &v + return s +} + +// SetVpcPeeringConnectionId sets the VpcPeeringConnectionId field's value. +func (s *ReferencedSecurityGroup) SetVpcPeeringConnectionId(v string) *ReferencedSecurityGroup { + s.VpcPeeringConnectionId = &v + return s +} + // Describes a Region. type Region struct { _ struct{} `type:"structure"` @@ -99432,8 +109118,21 @@ type RegisterImageInput struct { BillingProducts []*string `locationName:"BillingProduct" locationNameList:"item" type:"list"` // The block device mapping entries. + // + // If you specify an EBS volume using the ID of an EBS snapshot, you can't specify + // the encryption state of the volume. + // + // If you create an AMI on an Outpost, then all backing snapshots must be on + // the same Outpost or in the Region of that Outpost. AMIs on an Outpost that + // include local snapshots can be used to launch instances on the same Outpost + // only. For more information, Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html#ami) + // in the Amazon Elastic Compute Cloud User Guide. BlockDeviceMappings []*BlockDeviceMapping `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` + // The boot mode of the AMI. For more information, see Boot modes (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ami-boot.html) + // in the Amazon Elastic Compute Cloud User Guide. + BootMode *string `type:"string" enum:"BootModeValues"` + // A description for your AMI. Description *string `locationName:"description" type:"string"` @@ -99531,6 +109230,12 @@ func (s *RegisterImageInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *Re return s } +// SetBootMode sets the BootMode field's value. +func (s *RegisterImageInput) SetBootMode(v string) *RegisterImageInput { + s.BootMode = &v + return s +} + // SetDescription sets the Description field's value. func (s *RegisterImageInput) SetDescription(v string) *RegisterImageInput { s.Description = &v @@ -99864,6 +109569,82 @@ func (s *RegisterTransitGatewayMulticastGroupSourcesOutput) SetRegisteredMultica return s } +type RejectTransitGatewayMulticastDomainAssociationsInput struct { + _ struct{} `type:"structure"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The IDs of the subnets to associate with the transit gateway multicast domain. + SubnetIds []*string `locationNameList:"item" type:"list"` + + // The ID of the transit gateway attachment. + TransitGatewayAttachmentId *string `type:"string"` + + // The ID of the transit gateway multicast domain. + TransitGatewayMulticastDomainId *string `type:"string"` +} + +// String returns the string representation +func (s RejectTransitGatewayMulticastDomainAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectTransitGatewayMulticastDomainAssociationsInput) GoString() string { + return s.String() +} + +// SetDryRun sets the DryRun field's value. +func (s *RejectTransitGatewayMulticastDomainAssociationsInput) SetDryRun(v bool) *RejectTransitGatewayMulticastDomainAssociationsInput { + s.DryRun = &v + return s +} + +// SetSubnetIds sets the SubnetIds field's value. +func (s *RejectTransitGatewayMulticastDomainAssociationsInput) SetSubnetIds(v []*string) *RejectTransitGatewayMulticastDomainAssociationsInput { + s.SubnetIds = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *RejectTransitGatewayMulticastDomainAssociationsInput) SetTransitGatewayAttachmentId(v string) *RejectTransitGatewayMulticastDomainAssociationsInput { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayMulticastDomainId sets the TransitGatewayMulticastDomainId field's value. +func (s *RejectTransitGatewayMulticastDomainAssociationsInput) SetTransitGatewayMulticastDomainId(v string) *RejectTransitGatewayMulticastDomainAssociationsInput { + s.TransitGatewayMulticastDomainId = &v + return s +} + +type RejectTransitGatewayMulticastDomainAssociationsOutput struct { + _ struct{} `type:"structure"` + + // Describes the multicast domain associations. + Associations *TransitGatewayMulticastDomainAssociations `locationName:"associations" type:"structure"` +} + +// String returns the string representation +func (s RejectTransitGatewayMulticastDomainAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RejectTransitGatewayMulticastDomainAssociationsOutput) GoString() string { + return s.String() +} + +// SetAssociations sets the Associations field's value. +func (s *RejectTransitGatewayMulticastDomainAssociationsOutput) SetAssociations(v *TransitGatewayMulticastDomainAssociations) *RejectTransitGatewayMulticastDomainAssociationsOutput { + s.Associations = v + return s +} + type RejectTransitGatewayPeeringAttachmentInput struct { _ struct{} `type:"structure"` @@ -100684,6 +110465,94 @@ func (s ReplaceNetworkAclEntryOutput) GoString() string { return s.String() } +// Information about a root volume replacement task. +type ReplaceRootVolumeTask struct { + _ struct{} `type:"structure"` + + // The time the task completed. + CompleteTime *string `locationName:"completeTime" type:"string"` + + // The ID of the instance for which the root volume replacement task was created. + InstanceId *string `locationName:"instanceId" type:"string"` + + // The ID of the root volume replacement task. + ReplaceRootVolumeTaskId *string `locationName:"replaceRootVolumeTaskId" type:"string"` + + // The time the task was started. + StartTime *string `locationName:"startTime" type:"string"` + + // The tags assigned to the task. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The state of the task. The task can be in one of the following states: + // + // * pending - the replacement volume is being created. + // + // * in-progress - the original volume is being detached and the replacement + // volume is being attached. + // + // * succeeded - the replacement volume has been successfully attached to + // the instance and the instance is available. + // + // * failing - the replacement task is in the process of failing. + // + // * failed - the replacement task has failed but the original root volume + // is still attached. + // + // * failing-detached - the replacement task is in the process of failing. + // The instance might have no root volume attached. + // + // * failed-detached - the replacement task has failed and the instance has + // no root volume attached. + TaskState *string `locationName:"taskState" type:"string" enum:"ReplaceRootVolumeTaskState"` +} + +// String returns the string representation +func (s ReplaceRootVolumeTask) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplaceRootVolumeTask) GoString() string { + return s.String() +} + +// SetCompleteTime sets the CompleteTime field's value. +func (s *ReplaceRootVolumeTask) SetCompleteTime(v string) *ReplaceRootVolumeTask { + s.CompleteTime = &v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *ReplaceRootVolumeTask) SetInstanceId(v string) *ReplaceRootVolumeTask { + s.InstanceId = &v + return s +} + +// SetReplaceRootVolumeTaskId sets the ReplaceRootVolumeTaskId field's value. +func (s *ReplaceRootVolumeTask) SetReplaceRootVolumeTaskId(v string) *ReplaceRootVolumeTask { + s.ReplaceRootVolumeTaskId = &v + return s +} + +// SetStartTime sets the StartTime field's value. +func (s *ReplaceRootVolumeTask) SetStartTime(v string) *ReplaceRootVolumeTask { + s.StartTime = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ReplaceRootVolumeTask) SetTags(v []*Tag) *ReplaceRootVolumeTask { + s.Tags = v + return s +} + +// SetTaskState sets the TaskState field's value. +func (s *ReplaceRootVolumeTask) SetTaskState(v string) *ReplaceRootVolumeTask { + s.TaskState = &v + return s +} + type ReplaceRouteInput struct { _ struct{} `type:"structure"` @@ -101273,7 +111142,7 @@ type RequestLaunchTemplateData struct { // in the Amazon Elastic Compute Cloud User Guide. HibernationOptions *LaunchTemplateHibernationOptionsRequest `type:"structure"` - // The IAM instance profile. + // The name or Amazon Resource Name (ARN) of an IAM instance profile. IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest `type:"structure"` // The ID of the AMI. @@ -101667,20 +111536,7 @@ type RequestSpotInstancesInput struct { // Default: Instances are launched in any available Availability Zone. AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - // The required duration for the Spot Instances (also known as Spot blocks), - // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, - // or 360). - // - // The duration period starts as soon as your Spot Instance receives its instance - // ID. At the end of the duration period, Amazon EC2 marks the Spot Instance - // for termination and provides a Spot Instance termination notice, which gives - // the instance a two-minute warning before it terminates. - // - // You can't specify an Availability Zone group or a launch group if you specify - // a duration. - // - // New accounts or accounts with no previous billing history with AWS are not - // eligible for Spot Instances with a defined duration (also known as Spot blocks). + // Deprecated. BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` // Unique, case-sensitive identifier that you provide to ensure the idempotency @@ -101937,9 +111793,7 @@ type RequestSpotLaunchSpecification struct { // you can specify the names or the IDs of the security groups. SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"item" type:"list"` - // The IDs of the subnets in which to launch the instance. To specify multiple - // subnets, separate them using commas; for example, "subnet-1234abcdeexample1, - // subnet-0987cdef6example2". + // The ID of the subnet in which to launch the instance. SubnetId *string `locationName:"subnetId" type:"string"` // The Base64-encoded user data for the instance. User data is limited to 16 @@ -102080,11 +111934,11 @@ type Reservation struct { // The instances. Instances []*Instance `locationName:"instancesSet" locationNameList:"item" type:"list"` - // The ID of the AWS account that owns the reservation. + // The ID of the account that owns the reservation. OwnerId *string `locationName:"ownerId" type:"string"` // The ID of the requester that launched the instances on your behalf (for example, - // AWS Management Console or Auto Scaling). + // Management Console or Auto Scaling). RequesterId *string `locationName:"requesterId" type:"string"` // The ID of the reservation. @@ -102773,8 +112627,8 @@ type ReservedInstancesOffering struct { InstanceType *string `locationName:"instanceType" type:"string" enum:"InstanceType"` // Indicates whether the offering is available through the Reserved Instance - // Marketplace (resale) or AWS. If it's a Reserved Instance Marketplace offering, - // this is true. + // Marketplace (resale) or Amazon Web Services. If it's a Reserved Instance + // Marketplace offering, this is true. Marketplace *bool `locationName:"marketplace" type:"boolean"` // If convertible it can be exchanged for Reserved Instances of the same or @@ -102906,6 +112760,93 @@ func (s *ReservedInstancesOffering) SetUsagePrice(v float64) *ReservedInstancesO return s } +type ResetAddressAttributeInput struct { + _ struct{} `type:"structure"` + + // [EC2-VPC] The allocation ID. + // + // AllocationId is a required field + AllocationId *string `type:"string" required:"true"` + + // The attribute of the IP address. + // + // Attribute is a required field + Attribute *string `type:"string" required:"true" enum:"AddressAttributeName"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` +} + +// String returns the string representation +func (s ResetAddressAttributeInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetAddressAttributeInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ResetAddressAttributeInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ResetAddressAttributeInput"} + if s.AllocationId == nil { + invalidParams.Add(request.NewErrParamRequired("AllocationId")) + } + if s.Attribute == nil { + invalidParams.Add(request.NewErrParamRequired("Attribute")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAllocationId sets the AllocationId field's value. +func (s *ResetAddressAttributeInput) SetAllocationId(v string) *ResetAddressAttributeInput { + s.AllocationId = &v + return s +} + +// SetAttribute sets the Attribute field's value. +func (s *ResetAddressAttributeInput) SetAttribute(v string) *ResetAddressAttributeInput { + s.Attribute = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *ResetAddressAttributeInput) SetDryRun(v bool) *ResetAddressAttributeInput { + s.DryRun = &v + return s +} + +type ResetAddressAttributeOutput struct { + _ struct{} `type:"structure"` + + // Information about the IP address. + Address *AddressAttribute `locationName:"address" type:"structure"` +} + +// String returns the string representation +func (s ResetAddressAttributeOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResetAddressAttributeOutput) GoString() string { + return s.String() +} + +// SetAddress sets the Address field's value. +func (s *ResetAddressAttributeOutput) SetAddress(v *AddressAttribute) *ResetAddressAttributeOutput { + s.Address = v + return s +} + type ResetEbsDefaultKmsKeyIdInput struct { _ struct{} `type:"structure"` @@ -102935,7 +112876,8 @@ func (s *ResetEbsDefaultKmsKeyIdInput) SetDryRun(v bool) *ResetEbsDefaultKmsKeyI type ResetEbsDefaultKmsKeyIdOutput struct { _ struct{} `type:"structure"` - // The Amazon Resource Name (ARN) of the default CMK for EBS encryption by default. + // The Amazon Resource Name (ARN) of the default KMS key for EBS encryption + // by default. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` } @@ -103968,6 +113910,9 @@ type RevokeSecurityGroupEgressInput struct { // number. IpProtocol *string `locationName:"ipProtocol" type:"string"` + // The IDs of the security group rules. + SecurityGroupRuleIds []*string `locationName:"SecurityGroupRuleId" locationNameList:"item" type:"list"` + // Not supported. Use a set of IP permissions to specify a destination security // group. SourceSecurityGroupName *string `locationName:"sourceSecurityGroupName" type:"string"` @@ -104039,6 +113984,12 @@ func (s *RevokeSecurityGroupEgressInput) SetIpProtocol(v string) *RevokeSecurity return s } +// SetSecurityGroupRuleIds sets the SecurityGroupRuleIds field's value. +func (s *RevokeSecurityGroupEgressInput) SetSecurityGroupRuleIds(v []*string) *RevokeSecurityGroupEgressInput { + s.SecurityGroupRuleIds = v + return s +} + // SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. func (s *RevokeSecurityGroupEgressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupEgressInput { s.SourceSecurityGroupName = &v @@ -104124,6 +114075,9 @@ type RevokeSecurityGroupIngressInput struct { // Use -1 to specify all. IpProtocol *string `type:"string"` + // The IDs of the security group rules. + SecurityGroupRuleIds []*string `locationName:"SecurityGroupRuleId" locationNameList:"item" type:"list"` + // [EC2-Classic, default VPC] The name of the source security group. You can't // specify this parameter in combination with the following parameters: the // CIDR IP address range, the start of the port range, the IP protocol, and @@ -104132,12 +114086,12 @@ type RevokeSecurityGroupIngressInput struct { // use a set of IP permissions instead. SourceSecurityGroupName *string `type:"string"` - // [EC2-Classic] The AWS account ID of the source security group, if the source - // security group is in a different account. You can't specify this parameter - // in combination with the following parameters: the CIDR IP address range, - // the IP protocol, the start of the port range, and the end of the port range. - // To revoke a specific rule for an IP protocol and port range, use a set of - // IP permissions instead. + // [EC2-Classic] The Amazon Web Services account ID of the source security group, + // if the source security group is in a different account. You can't specify + // this parameter in combination with the following parameters: the CIDR IP + // address range, the IP protocol, the start of the port range, and the end + // of the port range. To revoke a specific rule for an IP protocol and port + // range, use a set of IP permissions instead. SourceSecurityGroupOwnerId *string `type:"string"` // The end of port range for the TCP and UDP protocols, or an ICMP code number. @@ -104197,6 +114151,12 @@ func (s *RevokeSecurityGroupIngressInput) SetIpProtocol(v string) *RevokeSecurit return s } +// SetSecurityGroupRuleIds sets the SecurityGroupRuleIds field's value. +func (s *RevokeSecurityGroupIngressInput) SetSecurityGroupRuleIds(v []*string) *RevokeSecurityGroupIngressInput { + s.SecurityGroupRuleIds = v + return s +} + // SetSourceSecurityGroupName sets the SourceSecurityGroupName field's value. func (s *RevokeSecurityGroupIngressInput) SetSourceSecurityGroupName(v string) *RevokeSecurityGroupIngressInput { s.SourceSecurityGroupName = &v @@ -104614,14 +114574,14 @@ type RunInstancesInput struct { // The CPU options for the instance. For more information, see Optimizing CPU // options (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. CpuOptions *CpuOptionsRequest `type:"structure"` // The credit option for CPU usage of the burstable performance instance. Valid // values are standard and unlimited. To change this attribute after launch, // use ModifyInstanceCreditSpecification (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyInstanceCreditSpecification.html). // For more information, see Burstable performance instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-performance-instances.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. // // Default: standard (T2 instances) or unlimited (T3/T3a instances) CreditSpecification *CreditSpecificationRequest `type:"structure"` @@ -104653,7 +114613,7 @@ type RunInstancesInput struct { // An elastic GPU to associate with the instance. An Elastic GPU is a GPU resource // that you can attach to your Windows instance to accelerate the graphics performance // of your applications. For more information, see Amazon EC2 Elastic GPUs (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/elastic-graphics.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. ElasticGpuSpecification []*ElasticGpuSpecification `locationNameList:"item" type:"list"` // An elastic inference accelerator to associate with the instance. Elastic @@ -104663,21 +114623,23 @@ type RunInstancesInput struct { // You cannot specify accelerators from different generations in the same request. ElasticInferenceAccelerators []*ElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"` - // Indicates whether the instance is enabled for AWS Nitro Enclaves. For more - // information, see What is AWS Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) - // in the AWS Nitro Enclaves User Guide. + // Indicates whether the instance is enabled for Amazon Web Services Nitro Enclaves. + // For more information, see What is Amazon Web Services Nitro Enclaves? (https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html) + // in the Amazon Web Services Nitro Enclaves User Guide. // - // You can't enable AWS Nitro Enclaves and hibernation on the same instance. + // You can't enable Amazon Web Services Nitro Enclaves and hibernation on the + // same instance. EnclaveOptions *EnclaveOptionsRequest `type:"structure"` // Indicates whether an instance is enabled for hibernation. For more information, // see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. // - // You can't enable hibernation and AWS Nitro Enclaves on the same instance. + // You can't enable hibernation and Amazon Web Services Nitro Enclaves on the + // same instance. HibernationOptions *HibernationOptionsRequest `type:"structure"` - // The IAM instance profile. + // The name or Amazon Resource Name (ARN) of an IAM instance profile. IamInstanceProfile *IamInstanceProfileSpecification `locationName:"iamInstanceProfile" type:"structure"` // The ID of the AMI. An AMI ID is required to launch an instance and must be @@ -104697,7 +114659,7 @@ type RunInstancesInput struct { InstanceMarketOptions *InstanceMarketOptionsRequest `type:"structure"` // The instance type. For more information, see Instance types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. // // Default: m1.small InstanceType *string `type:"string" enum:"InstanceType"` @@ -104725,7 +114687,7 @@ type RunInstancesInput struct { // // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more // information, see PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. KernelId *string `type:"string"` // The name of the key pair. You can create a key pair using CreateKeyPair (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateKeyPair.html) @@ -104796,12 +114758,12 @@ type RunInstancesInput struct { // The ID of the RAM disk to select. Some kernels require additional drivers // at launch. Check the kernel requirements for information about whether you - // need to specify a RAM disk. To find kernel requirements, go to the AWS Resource - // Center and search for the kernel ID. + // need to specify a RAM disk. To find kernel requirements, go to the Amazon + // Web Services Resource Center and search for the kernel ID. // // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more // information, see PV-GRUB (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. RamdiskId *string `type:"string"` // The IDs of the security groups. You can create a security group using CreateSecurityGroup @@ -105275,6 +115237,47 @@ func (s *RunScheduledInstancesOutput) SetInstanceIdSet(v []*string) *RunSchedule return s } +// The tags to apply to the AMI object that will be stored in the S3 bucket. +// For more information, see Categorizing your storage using tags (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html) +// in the Amazon Simple Storage Service User Guide. +type S3ObjectTag struct { + _ struct{} `type:"structure"` + + // The key of the tag. + // + // Constraints: Tag keys are case-sensitive and can be up to 128 Unicode characters + // in length. May not begin with aws:. + Key *string `type:"string"` + + // The value of the tag. + // + // Constraints: Tag values are case-sensitive and can be up to 256 Unicode characters + // in length. + Value *string `type:"string"` +} + +// String returns the string representation +func (s S3ObjectTag) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s S3ObjectTag) GoString() string { + return s.String() +} + +// SetKey sets the Key field's value. +func (s *S3ObjectTag) SetKey(v string) *S3ObjectTag { + s.Key = &v + return s +} + +// SetValue sets the Value field's value. +func (s *S3ObjectTag) SetValue(v string) *S3ObjectTag { + s.Value = &v + return s +} + // Describes the storage parameters for S3 and S3 buckets for an instance store-backed // AMI. type S3Storage struct { @@ -105768,8 +115771,7 @@ type ScheduledInstancesBlockDeviceMapping struct { // launched. Ebs *ScheduledInstancesEbs `type:"structure"` - // Suppresses the specified device included in the block device mapping of the - // AMI. + // To omit the device from the block device mapping, specify an empty string. NoDevice *string `type:"string"` // The virtual device name (ephemeralN). Instance store volumes are numbered @@ -105833,10 +115835,11 @@ type ScheduledInstancesEbs struct { // The number of I/O operations per second (IOPS) to provision for an io1 or // io2 volume, with a maximum ratio of 50 IOPS/GiB for io1, and 500 IOPS/GiB // for io2. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum - // IOPS of 64,000 is guaranteed only on Nitro-based instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). + // IOPS of 64,000 is guaranteed only on instances built on the Nitro System + // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). // Other instance families guarantee performance up to 32,000 IOPS. For more - // information, see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. + // information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) + // in the Amazon EC2 User Guide. // // This parameter is valid only for Provisioned IOPS SSD (io1 and io2) volumes. Iops *int64 `type:"integer"` @@ -106612,7 +116615,7 @@ type SearchTransitGatewayRoutesInput struct { // * attachment.resource-id - The resource id of the transit gateway attachment. // // * attachment.resource-type - The attachment resource type. Valid values - // are vpc | vpn | direct-connect-gateway | peering. + // are vpc | vpn | direct-connect-gateway | peering | connect. // // * prefix-list-id - The ID of the prefix list. // @@ -106730,7 +116733,7 @@ func (s *SearchTransitGatewayRoutesOutput) SetRoutes(v []*TransitGatewayRoute) * return s } -// Describes a security group +// Describes a security group. type SecurityGroup struct { _ struct{} `type:"structure"` @@ -106749,7 +116752,7 @@ type SecurityGroup struct { // [VPC only] The outbound rules associated with the security group. IpPermissionsEgress []*IpPermission `locationName:"ipPermissionsEgress" locationNameList:"item" type:"list"` - // The AWS account ID of the owner of the security group. + // The Amazon Web Services account ID of the owner of the security group. OwnerId *string `locationName:"ownerId" type:"string"` // Any tags assigned to the security group. @@ -106892,6 +116895,325 @@ func (s *SecurityGroupReference) SetVpcPeeringConnectionId(v string) *SecurityGr return s } +// Describes a security group rule. +type SecurityGroupRule struct { + _ struct{} `type:"structure"` + + // The IPv4 CIDR range. + CidrIpv4 *string `locationName:"cidrIpv4" type:"string"` + + // The IPv6 CIDR range. + CidrIpv6 *string `locationName:"cidrIpv6" type:"string"` + + // The security group rule description. + Description *string `locationName:"description" type:"string"` + + // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 + // type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 + // types, you must specify all codes. + FromPort *int64 `locationName:"fromPort" type:"integer"` + + // The ID of the security group. + GroupId *string `locationName:"groupId" type:"string"` + + // The ID of the account that owns the security group. + GroupOwnerId *string `locationName:"groupOwnerId" type:"string"` + + // The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers + // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). + // + // Use -1 to specify all protocols. + IpProtocol *string `locationName:"ipProtocol" type:"string"` + + // Indicates whether the security group rule is an outbound rule. + IsEgress *bool `locationName:"isEgress" type:"boolean"` + + // The ID of the prefix list. + PrefixListId *string `locationName:"prefixListId" type:"string"` + + // Describes the security group that is referenced in the rule. + ReferencedGroupInfo *ReferencedSecurityGroup `locationName:"referencedGroupInfo" type:"structure"` + + // The ID of the security group rule. + SecurityGroupRuleId *string `locationName:"securityGroupRuleId" type:"string"` + + // The tags applied to the security group rule. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. + // A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 + // types, you must specify all codes. + ToPort *int64 `locationName:"toPort" type:"integer"` +} + +// String returns the string representation +func (s SecurityGroupRule) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroupRule) GoString() string { + return s.String() +} + +// SetCidrIpv4 sets the CidrIpv4 field's value. +func (s *SecurityGroupRule) SetCidrIpv4(v string) *SecurityGroupRule { + s.CidrIpv4 = &v + return s +} + +// SetCidrIpv6 sets the CidrIpv6 field's value. +func (s *SecurityGroupRule) SetCidrIpv6(v string) *SecurityGroupRule { + s.CidrIpv6 = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *SecurityGroupRule) SetDescription(v string) *SecurityGroupRule { + s.Description = &v + return s +} + +// SetFromPort sets the FromPort field's value. +func (s *SecurityGroupRule) SetFromPort(v int64) *SecurityGroupRule { + s.FromPort = &v + return s +} + +// SetGroupId sets the GroupId field's value. +func (s *SecurityGroupRule) SetGroupId(v string) *SecurityGroupRule { + s.GroupId = &v + return s +} + +// SetGroupOwnerId sets the GroupOwnerId field's value. +func (s *SecurityGroupRule) SetGroupOwnerId(v string) *SecurityGroupRule { + s.GroupOwnerId = &v + return s +} + +// SetIpProtocol sets the IpProtocol field's value. +func (s *SecurityGroupRule) SetIpProtocol(v string) *SecurityGroupRule { + s.IpProtocol = &v + return s +} + +// SetIsEgress sets the IsEgress field's value. +func (s *SecurityGroupRule) SetIsEgress(v bool) *SecurityGroupRule { + s.IsEgress = &v + return s +} + +// SetPrefixListId sets the PrefixListId field's value. +func (s *SecurityGroupRule) SetPrefixListId(v string) *SecurityGroupRule { + s.PrefixListId = &v + return s +} + +// SetReferencedGroupInfo sets the ReferencedGroupInfo field's value. +func (s *SecurityGroupRule) SetReferencedGroupInfo(v *ReferencedSecurityGroup) *SecurityGroupRule { + s.ReferencedGroupInfo = v + return s +} + +// SetSecurityGroupRuleId sets the SecurityGroupRuleId field's value. +func (s *SecurityGroupRule) SetSecurityGroupRuleId(v string) *SecurityGroupRule { + s.SecurityGroupRuleId = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *SecurityGroupRule) SetTags(v []*Tag) *SecurityGroupRule { + s.Tags = v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *SecurityGroupRule) SetToPort(v int64) *SecurityGroupRule { + s.ToPort = &v + return s +} + +// Describes the description of a security group rule. +// +// You can use this when you want to update the security group rule description +// for either an inbound or outbound rule. +type SecurityGroupRuleDescription struct { + _ struct{} `type:"structure"` + + // The description of the security group rule. + Description *string `type:"string"` + + // The ID of the security group rule. + SecurityGroupRuleId *string `type:"string"` +} + +// String returns the string representation +func (s SecurityGroupRuleDescription) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroupRuleDescription) GoString() string { + return s.String() +} + +// SetDescription sets the Description field's value. +func (s *SecurityGroupRuleDescription) SetDescription(v string) *SecurityGroupRuleDescription { + s.Description = &v + return s +} + +// SetSecurityGroupRuleId sets the SecurityGroupRuleId field's value. +func (s *SecurityGroupRuleDescription) SetSecurityGroupRuleId(v string) *SecurityGroupRuleDescription { + s.SecurityGroupRuleId = &v + return s +} + +// Describes a security group rule. +// +// You must specify exactly one of the following parameters, based on the rule +// type: +// +// * CidrIpv4 +// +// * CidrIpv6 +// +// * PrefixListId +// +// * ReferencedGroupId +// +// When you modify a rule, you cannot change the rule type. For example, if +// the rule uses an IPv4 address range, you must use CidrIpv4 to specify a new +// IPv4 address range. +type SecurityGroupRuleRequest struct { + _ struct{} `type:"structure"` + + // The IPv4 CIDR range. To specify a single IPv4 address, use the /32 prefix + // length. + CidrIpv4 *string `type:"string"` + + // The IPv6 CIDR range. To specify a single IPv6 address, use the /128 prefix + // length. + CidrIpv6 *string `type:"string"` + + // The description of the security group rule. + Description *string `type:"string"` + + // The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 + // type. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 + // types, you must specify all codes. + FromPort *int64 `type:"integer"` + + // The IP protocol name (tcp, udp, icmp, icmpv6) or number (see Protocol Numbers + // (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). + // + // Use -1 to specify all protocols. + IpProtocol *string `type:"string"` + + // The ID of the prefix list. + PrefixListId *string `type:"string"` + + // The ID of the security group that is referenced in the security group rule. + ReferencedGroupId *string `type:"string"` + + // The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. + // A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 + // types, you must specify all codes. + ToPort *int64 `type:"integer"` +} + +// String returns the string representation +func (s SecurityGroupRuleRequest) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroupRuleRequest) GoString() string { + return s.String() +} + +// SetCidrIpv4 sets the CidrIpv4 field's value. +func (s *SecurityGroupRuleRequest) SetCidrIpv4(v string) *SecurityGroupRuleRequest { + s.CidrIpv4 = &v + return s +} + +// SetCidrIpv6 sets the CidrIpv6 field's value. +func (s *SecurityGroupRuleRequest) SetCidrIpv6(v string) *SecurityGroupRuleRequest { + s.CidrIpv6 = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *SecurityGroupRuleRequest) SetDescription(v string) *SecurityGroupRuleRequest { + s.Description = &v + return s +} + +// SetFromPort sets the FromPort field's value. +func (s *SecurityGroupRuleRequest) SetFromPort(v int64) *SecurityGroupRuleRequest { + s.FromPort = &v + return s +} + +// SetIpProtocol sets the IpProtocol field's value. +func (s *SecurityGroupRuleRequest) SetIpProtocol(v string) *SecurityGroupRuleRequest { + s.IpProtocol = &v + return s +} + +// SetPrefixListId sets the PrefixListId field's value. +func (s *SecurityGroupRuleRequest) SetPrefixListId(v string) *SecurityGroupRuleRequest { + s.PrefixListId = &v + return s +} + +// SetReferencedGroupId sets the ReferencedGroupId field's value. +func (s *SecurityGroupRuleRequest) SetReferencedGroupId(v string) *SecurityGroupRuleRequest { + s.ReferencedGroupId = &v + return s +} + +// SetToPort sets the ToPort field's value. +func (s *SecurityGroupRuleRequest) SetToPort(v int64) *SecurityGroupRuleRequest { + s.ToPort = &v + return s +} + +// Describes an update to a security group rule. +type SecurityGroupRuleUpdate struct { + _ struct{} `type:"structure"` + + // Information about the security group rule. + SecurityGroupRule *SecurityGroupRuleRequest `type:"structure"` + + // The ID of the security group rule. + SecurityGroupRuleId *string `type:"string"` +} + +// String returns the string representation +func (s SecurityGroupRuleUpdate) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s SecurityGroupRuleUpdate) GoString() string { + return s.String() +} + +// SetSecurityGroupRule sets the SecurityGroupRule field's value. +func (s *SecurityGroupRuleUpdate) SetSecurityGroupRule(v *SecurityGroupRuleRequest) *SecurityGroupRuleUpdate { + s.SecurityGroupRule = v + return s +} + +// SetSecurityGroupRuleId sets the SecurityGroupRuleId field's value. +func (s *SecurityGroupRuleUpdate) SetSecurityGroupRuleId(v string) *SecurityGroupRuleUpdate { + s.SecurityGroupRuleId = &v + return s +} + type SendDiagnosticInterruptInput struct { _ struct{} `type:"structure"` @@ -107358,16 +117680,20 @@ type Snapshot struct { // Indicates whether the snapshot is encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` - // The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used to protect the volume encryption - // key for the parent volume. + // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key + // that was used to protect the volume encryption key for the parent volume. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` - // The AWS owner alias, from an Amazon-maintained list (amazon). This is not - // the user-configured AWS account alias set using the IAM console. + // The ARN of the Outpost on which the snapshot is stored. For more information, + // see Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) + // in the Amazon Elastic Compute Cloud User Guide. + OutpostArn *string `locationName:"outpostArn" type:"string"` + + // The Amazon Web Services owner alias, from an Amazon-maintained list (amazon). + // This is not the user-configured account alias set using the IAM console. OwnerAlias *string `locationName:"ownerAlias" type:"string"` - // The AWS account ID of the EBS snapshot owner. + // The ID of the account that owns the EBS snapshot. OwnerId *string `locationName:"ownerId" type:"string"` // The progress of the snapshot, as a percentage. @@ -107384,9 +117710,9 @@ type Snapshot struct { State *string `locationName:"status" type:"string" enum:"SnapshotState"` // Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy - // operation fails (for example, if the proper AWS Key Management Service (AWS - // KMS) permissions are not obtained) this field displays error state details - // to help you diagnose why the error occurred. This parameter is only returned + // operation fails (for example, if the proper Key Management Service (KMS) + // permissions are not obtained) this field displays error state details to + // help you diagnose why the error occurred. This parameter is only returned // by DescribeSnapshots. StateMessage *string `locationName:"statusMessage" type:"string"` @@ -107436,6 +117762,12 @@ func (s *Snapshot) SetKmsKeyId(v string) *Snapshot { return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *Snapshot) SetOutpostArn(v string) *Snapshot { + s.OutpostArn = &v + return s +} + // SetOwnerAlias sets the OwnerAlias field's value. func (s *Snapshot) SetOwnerAlias(v string) *Snapshot { s.OwnerAlias = &v @@ -107610,7 +117942,7 @@ type SnapshotDiskContainer struct { // The format of the disk image being imported. // - // Valid values: VHD | VMDK + // Valid values: VHD | VMDK | RAW Format *string `type:"string"` // The URL to the Amazon S3-based disk image being imported. It can either be @@ -107666,6 +117998,11 @@ type SnapshotInfo struct { // Indicates whether the snapshot is encrypted. Encrypted *bool `locationName:"encrypted" type:"boolean"` + // The ARN of the Outpost on which the snapshot is stored. For more information, + // see Amazon EBS local snapshots on Outposts (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshots-outposts.html) + // in the Amazon Elastic Compute Cloud User Guide. + OutpostArn *string `locationName:"outpostArn" type:"string"` + // Account id used when creating this snapshot. OwnerId *string `locationName:"ownerId" type:"string"` @@ -107714,6 +118051,12 @@ func (s *SnapshotInfo) SetEncrypted(v bool) *SnapshotInfo { return s } +// SetOutpostArn sets the OutpostArn field's value. +func (s *SnapshotInfo) SetOutpostArn(v string) *SnapshotInfo { + s.OutpostArn = &v + return s +} + // SetOwnerId sets the OwnerId field's value. func (s *SnapshotInfo) SetOwnerId(v string) *SnapshotInfo { s.OwnerId = &v @@ -107923,7 +118266,7 @@ type SpotDatafeedSubscription struct { // The fault codes for the Spot Instance request, if any. Fault *SpotInstanceStateFault `locationName:"fault" type:"structure"` - // The AWS account ID of the account. + // The account ID of the account. OwnerId *string `locationName:"ownerId" type:"string"` // The prefix for the data feed files. @@ -108029,8 +118372,8 @@ type SpotFleetLaunchSpecification struct { // The ID of the RAM disk. Some kernels require additional drivers at launch. // Check the kernel requirements for information about whether you need to specify - // a RAM disk. To find kernel requirements, refer to the AWS Resource Center - // and search for the kernel ID. + // a RAM disk. To find kernel requirements, refer to the Amazon Web Services + // Resource Center and search for the kernel ID. RamdiskId *string `locationName:"ramdiskId" type:"string"` // One or more security groups. When requesting instances in a VPC, you must @@ -108296,9 +118639,16 @@ type SpotFleetRequestConfigData struct { // If the allocation strategy is diversified, Spot Fleet launches instances // from all the Spot Instance pools that you specify. // - // If the allocation strategy is capacityOptimized, Spot Fleet launches instances - // from Spot Instance pools with optimal capacity for the number of instances - // that are launching. + // If the allocation strategy is capacityOptimized (recommended), Spot Fleet + // launches instances from Spot Instance pools with optimal capacity for the + // number of instances that are launching. To give certain instance types a + // higher chance of launching first, use capacityOptimizedPrioritized. Set a + // priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. + // You can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacityOptimizedPrioritized is supported only if your Spot Fleet + // uses a launch template. Note that if the OnDemandAllocationStrategy is set + // to prioritized, the same priority is applied when fulfilling On-Demand capacity. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"AllocationStrategy"` // A unique, case-sensitive identifier that you provide to ensure the idempotency @@ -108306,6 +118656,9 @@ type SpotFleetRequestConfigData struct { // see Ensuring Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). ClientToken *string `locationName:"clientToken" type:"string"` + // Reserved. + Context *string `locationName:"context" type:"string"` + // Indicates whether running Spot Instances should be terminated if you decrease // the target capacity of the Spot Fleet request below the current size of the // Spot Fleet. @@ -108315,7 +118668,7 @@ type SpotFleetRequestConfigData struct { // capacity. You cannot set this value. FulfilledCapacity *float64 `locationName:"fulfilledCapacity" type:"double"` - // The Amazon Resource Name (ARN) of an AWS Identity and Access Management (IAM) + // The Amazon Resource Name (ARN) of an Identity and Access Management (IAM) // role that grants the Spot Fleet the permission to request, launch, terminate, // and tag instances on your behalf. For more information, see Spot Fleet prerequisites // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-requests.html#spot-fleet-prerequisites) @@ -108334,6 +118687,15 @@ type SpotFleetRequestConfigData struct { // Valid only when Spot AllocationStrategy is set to lowest-price. Spot Fleet // selects the cheapest Spot pools and evenly allocates your target Spot capacity // across the number of Spot pools that you specify. + // + // Note that Spot Fleet attempts to draw Spot Instances from the number of pools + // that you specify on a best effort basis. If a pool runs out of Spot capacity + // before fulfilling your target capacity, Spot Fleet will continue to fulfill + // your request by drawing from the next cheapest pool. To ensure that your + // target capacity is met, you might receive Spot Instances from more than the + // number of pools that you specified. Similarly, if most of the pools have + // no Spot capacity, you might receive your full target capacity from fewer + // than the number of pools that you specified. InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` // The launch specifications for the Spot Fleet request. If you specify LaunchSpecifications, @@ -108502,6 +118864,12 @@ func (s *SpotFleetRequestConfigData) SetClientToken(v string) *SpotFleetRequestC return s } +// SetContext sets the Context field's value. +func (s *SpotFleetRequestConfigData) SetContext(v string) *SpotFleetRequestConfigData { + s.Context = &v + return s +} + // SetExcessCapacityTerminationPolicy sets the ExcessCapacityTerminationPolicy field's value. func (s *SpotFleetRequestConfigData) SetExcessCapacityTerminationPolicy(v string) *SpotFleetRequestConfigData { s.ExcessCapacityTerminationPolicy = &v @@ -108673,8 +119041,7 @@ func (s *SpotFleetTagSpecification) SetTags(v []*Tag) *SpotFleetTagSpecification type SpotInstanceRequest struct { _ struct{} `type:"structure"` - // If you specified a duration and your Spot Instance request was fulfilled, - // this is the fixed hourly price in effect for the Spot Instance while it runs. + // Deprecated. ActualBlockHourlyPrice *string `locationName:"actualBlockHourlyPrice" type:"string"` // The Availability Zone group. If you specify the same Availability Zone group @@ -108682,7 +119049,7 @@ type SpotInstanceRequest struct { // Availability Zone. AvailabilityZoneGroup *string `locationName:"availabilityZoneGroup" type:"string"` - // The duration for the Spot Instance, in minutes. + // Deprecated. BlockDurationMinutes *int64 `locationName:"blockDurationMinutes" type:"integer"` // The date and time when the Spot Instance request was created, in UTC format @@ -108980,20 +119347,7 @@ func (s *SpotMaintenanceStrategies) SetCapacityRebalance(v *SpotCapacityRebalanc type SpotMarketOptions struct { _ struct{} `type:"structure"` - // The required duration for the Spot Instances (also known as Spot blocks), - // in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, - // or 360). - // - // The duration period starts as soon as your Spot Instance receives its instance - // ID. At the end of the duration period, Amazon EC2 marks the Spot Instance - // for termination and provides a Spot Instance termination notice, which gives - // the instance a two-minute warning before it terminates. - // - // You can't specify an Availability Zone group or a launch group if you specify - // a duration. - // - // New accounts or accounts with no previous billing history with AWS are not - // eligible for Spot Instances with a defined duration (also known as Spot blocks). + // Deprecated. BlockDurationMinutes *int64 `type:"integer"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -109004,8 +119358,8 @@ type SpotMarketOptions struct { MaxPrice *string `type:"string"` // The Spot Instance request type. For RunInstances (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances), - // persistent Spot Instance requests are only supported when InstanceInterruptionBehavior - // is set to either hibernate or stop. + // persistent Spot Instance requests are only supported when the instance interruption + // behavior is either hibernate or stop. SpotInstanceType *string `type:"string" enum:"SpotInstanceType"` // The end date of the request, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported @@ -109074,9 +119428,16 @@ type SpotOptions struct { // If the allocation strategy is diversified, EC2 Fleet launches instances from // all of the Spot Instance pools that you specify. // - // If the allocation strategy is capacity-optimized, EC2 Fleet launches instances - // from Spot Instance pools with optimal capacity for the number of instances - // that are launching. + // If the allocation strategy is capacity-optimized (recommended), EC2 Fleet + // launches instances from Spot Instance pools with optimal capacity for the + // number of instances that are launching. To give certain instance types a + // higher chance of launching first, use capacity-optimized-prioritized. Set + // a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. + // You can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses + // a launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. AllocationStrategy *string `locationName:"allocationStrategy" type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -109086,6 +119447,15 @@ type SpotOptions struct { // Valid only when AllocationStrategy is set to lowest-price. EC2 Fleet selects // the cheapest Spot pools and evenly allocates your target Spot capacity across // the number of Spot pools that you specify. + // + // Note that EC2 Fleet attempts to draw Spot Instances from the number of pools + // that you specify on a best effort basis. If a pool runs out of Spot capacity + // before fulfilling your target capacity, EC2 Fleet will continue to fulfill + // your request by drawing from the next cheapest pool. To ensure that your + // target capacity is met, you might receive Spot Instances from more than the + // number of pools that you specified. Similarly, if most of the pools have + // no Spot capacity, you might receive your full target capacity from fewer + // than the number of pools that you specified. InstancePoolsToUseCount *int64 `locationName:"instancePoolsToUseCount" type:"integer"` // The strategies for managing your workloads on your Spot Instances that will @@ -109180,9 +119550,16 @@ type SpotOptionsRequest struct { // If the allocation strategy is diversified, EC2 Fleet launches instances from // all of the Spot Instance pools that you specify. // - // If the allocation strategy is capacity-optimized, EC2 Fleet launches instances - // from Spot Instance pools with optimal capacity for the number of instances - // that are launching. + // If the allocation strategy is capacity-optimized (recommended), EC2 Fleet + // launches instances from Spot Instance pools with optimal capacity for the + // number of instances that are launching. To give certain instance types a + // higher chance of launching first, use capacity-optimized-prioritized. Set + // a priority for each instance type by using the Priority parameter for LaunchTemplateOverrides. + // You can assign the same priority to different LaunchTemplateOverrides. EC2 + // implements the priorities on a best-effort basis, but optimizes for capacity + // first. capacity-optimized-prioritized is supported only if your fleet uses + // a launch template. Note that if the On-Demand AllocationStrategy is set to + // prioritized, the same priority is applied when fulfilling On-Demand capacity. AllocationStrategy *string `type:"string" enum:"SpotAllocationStrategy"` // The behavior when a Spot Instance is interrupted. The default is terminate. @@ -109192,6 +119569,15 @@ type SpotOptionsRequest struct { // Valid only when Spot AllocationStrategy is set to lowest-price. EC2 Fleet // selects the cheapest Spot pools and evenly allocates your target Spot capacity // across the number of Spot pools that you specify. + // + // Note that EC2 Fleet attempts to draw Spot Instances from the number of pools + // that you specify on a best effort basis. If a pool runs out of Spot capacity + // before fulfilling your target capacity, EC2 Fleet will continue to fulfill + // your request by drawing from the next cheapest pool. To ensure that your + // target capacity is met, you might receive Spot Instances from more than the + // number of pools that you specified. Similarly, if most of the pools have + // no Spot capacity, you might receive your full target capacity from fewer + // than the number of pools that you specified. InstancePoolsToUseCount *int64 `type:"integer"` // The strategies for managing your Spot Instances that are at an elevated risk @@ -109604,6 +119990,107 @@ func (s *StartInstancesOutput) SetStartingInstances(v []*InstanceStateChange) *S return s } +type StartNetworkInsightsAnalysisInput struct { + _ struct{} `type:"structure"` + + // Unique, case-sensitive identifier that you provide to ensure the idempotency + // of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html). + ClientToken *string `type:"string" idempotencyToken:"true"` + + // Checks whether you have the required permissions for the action, without + // actually making the request, and provides an error response. If you have + // the required permissions, the error response is DryRunOperation. Otherwise, + // it is UnauthorizedOperation. + DryRun *bool `type:"boolean"` + + // The Amazon Resource Names (ARN) of the resources that the path must traverse. + FilterInArns []*string `locationName:"FilterInArn" locationNameList:"item" type:"list"` + + // The ID of the path. + // + // NetworkInsightsPathId is a required field + NetworkInsightsPathId *string `type:"string" required:"true"` + + // The tags to apply. + TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` +} + +// String returns the string representation +func (s StartNetworkInsightsAnalysisInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartNetworkInsightsAnalysisInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartNetworkInsightsAnalysisInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartNetworkInsightsAnalysisInput"} + if s.NetworkInsightsPathId == nil { + invalidParams.Add(request.NewErrParamRequired("NetworkInsightsPathId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClientToken sets the ClientToken field's value. +func (s *StartNetworkInsightsAnalysisInput) SetClientToken(v string) *StartNetworkInsightsAnalysisInput { + s.ClientToken = &v + return s +} + +// SetDryRun sets the DryRun field's value. +func (s *StartNetworkInsightsAnalysisInput) SetDryRun(v bool) *StartNetworkInsightsAnalysisInput { + s.DryRun = &v + return s +} + +// SetFilterInArns sets the FilterInArns field's value. +func (s *StartNetworkInsightsAnalysisInput) SetFilterInArns(v []*string) *StartNetworkInsightsAnalysisInput { + s.FilterInArns = v + return s +} + +// SetNetworkInsightsPathId sets the NetworkInsightsPathId field's value. +func (s *StartNetworkInsightsAnalysisInput) SetNetworkInsightsPathId(v string) *StartNetworkInsightsAnalysisInput { + s.NetworkInsightsPathId = &v + return s +} + +// SetTagSpecifications sets the TagSpecifications field's value. +func (s *StartNetworkInsightsAnalysisInput) SetTagSpecifications(v []*TagSpecification) *StartNetworkInsightsAnalysisInput { + s.TagSpecifications = v + return s +} + +type StartNetworkInsightsAnalysisOutput struct { + _ struct{} `type:"structure"` + + // Information about the network insights analysis. + NetworkInsightsAnalysis *NetworkInsightsAnalysis `locationName:"networkInsightsAnalysis" type:"structure"` +} + +// String returns the string representation +func (s StartNetworkInsightsAnalysisOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StartNetworkInsightsAnalysisOutput) GoString() string { + return s.String() +} + +// SetNetworkInsightsAnalysis sets the NetworkInsightsAnalysis field's value. +func (s *StartNetworkInsightsAnalysisOutput) SetNetworkInsightsAnalysis(v *NetworkInsightsAnalysis) *StartNetworkInsightsAnalysisOutput { + s.NetworkInsightsAnalysis = v + return s +} + type StartVpcEndpointServicePrivateDnsVerificationInput struct { _ struct{} `type:"structure"` @@ -109768,7 +120255,7 @@ type StopInstancesInput struct { // Hibernates the instance if the instance was enabled for hibernation at launch. // If the instance cannot hibernate successfully, a normal shutdown occurs. // For more information, see Hibernate your instance (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html) - // in the Amazon Elastic Compute Cloud User Guide. + // in the Amazon EC2 User Guide. // // Default: false Hibernate *bool `type:"boolean"` @@ -109906,6 +120393,85 @@ func (s *StorageLocation) SetKey(v string) *StorageLocation { return s } +// The information about the AMI store task, including the progress of the task. +type StoreImageTaskResult struct { + _ struct{} `type:"structure"` + + // The ID of the AMI that is being stored. + AmiId *string `locationName:"amiId" type:"string"` + + // The name of the S3 bucket that contains the stored AMI object. + Bucket *string `locationName:"bucket" type:"string"` + + // The progress of the task as a percentage. + ProgressPercentage *int64 `locationName:"progressPercentage" type:"integer"` + + // The name of the stored AMI object in the bucket. + S3objectKey *string `locationName:"s3objectKey" type:"string"` + + // If the tasks fails, the reason for the failure is returned. If the task succeeds, + // null is returned. + StoreTaskFailureReason *string `locationName:"storeTaskFailureReason" type:"string"` + + // The state of the store task (InProgress, Completed, or Failed). + StoreTaskState *string `locationName:"storeTaskState" type:"string"` + + // The time the task started. + TaskStartTime *time.Time `locationName:"taskStartTime" type:"timestamp"` +} + +// String returns the string representation +func (s StoreImageTaskResult) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s StoreImageTaskResult) GoString() string { + return s.String() +} + +// SetAmiId sets the AmiId field's value. +func (s *StoreImageTaskResult) SetAmiId(v string) *StoreImageTaskResult { + s.AmiId = &v + return s +} + +// SetBucket sets the Bucket field's value. +func (s *StoreImageTaskResult) SetBucket(v string) *StoreImageTaskResult { + s.Bucket = &v + return s +} + +// SetProgressPercentage sets the ProgressPercentage field's value. +func (s *StoreImageTaskResult) SetProgressPercentage(v int64) *StoreImageTaskResult { + s.ProgressPercentage = &v + return s +} + +// SetS3objectKey sets the S3objectKey field's value. +func (s *StoreImageTaskResult) SetS3objectKey(v string) *StoreImageTaskResult { + s.S3objectKey = &v + return s +} + +// SetStoreTaskFailureReason sets the StoreTaskFailureReason field's value. +func (s *StoreImageTaskResult) SetStoreTaskFailureReason(v string) *StoreImageTaskResult { + s.StoreTaskFailureReason = &v + return s +} + +// SetStoreTaskState sets the StoreTaskState field's value. +func (s *StoreImageTaskResult) SetStoreTaskState(v string) *StoreImageTaskResult { + s.StoreTaskState = &v + return s +} + +// SetTaskStartTime sets the TaskStartTime field's value. +func (s *StoreImageTaskResult) SetTaskStartTime(v time.Time) *StoreImageTaskResult { + s.TaskStartTime = &v + return s +} + // Describes a subnet. type Subnet struct { _ struct{} `type:"structure"` @@ -110332,16 +120898,19 @@ type TagSpecification struct { // The type of resource to tag. Currently, the resource types that support tagging // on creation are: capacity-reservation | carrier-gateway | client-vpn-endpoint - // | customer-gateway | dedicated-host | dhcp-options | export-image-task | - // export-instance-task | fleet | fpga-image | host-reservation | import-image-task - // | import-snapshot-task | instance | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 - // | key-pair | launch-template | placement-group | prefix-list | natgateway - // | network-acl | route-table | security-group | spot-fleet-request | spot-instances-request - // | snapshot | subnet | traffic-mirror-filter | traffic-mirror-session | traffic-mirror-target - // | transit-gateway | transit-gateway-attachment | transit-gateway-route-table - // | volume |vpc | vpc-peering-connection | vpc-endpoint (for interface and - // gateway endpoints) | vpc-endpoint-service (for AWS PrivateLink) | vpc-flow-log - // | vpn-connection | vpn-gateway. + // | customer-gateway | dedicated-host | dhcp-options | egress-only-internet-gateway + // | elastic-ip | elastic-gpu | export-image-task | export-instance-task | fleet + // | fpga-image | host-reservation | image| import-image-task | import-snapshot-task + // | instance | instance-event-window | internet-gateway | ipv4pool-ec2 | ipv6pool-ec2 + // | key-pair | launch-template | local-gateway-route-table-vpc-association + // | placement-group | prefix-list | natgateway | network-acl | network-interface + // | reserved-instances |route-table | security-group| snapshot | spot-fleet-request + // | spot-instances-request | snapshot | subnet | traffic-mirror-filter | traffic-mirror-session + // | traffic-mirror-target | transit-gateway | transit-gateway-attachment | + // transit-gateway-multicast-domain | transit-gateway-route-table | volume |vpc + // | vpc-peering-connection | vpc-endpoint (for interface and gateway endpoints) + // | vpc-endpoint-service (for PrivateLink) | vpc-flow-log | vpn-connection + // | vpn-gateway. // // To tag a resource after it has been created, see CreateTags (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateTags.html). ResourceType *string `locationName:"resourceType" type:"string" enum:"ResourceType"` @@ -110386,7 +120955,7 @@ func (s *TagSpecification) SetTags(v []*Tag) *TagSpecification { // you're willing to pay is reached, the fleet stops launching instances even // if it hasn’t met the target capacity. The MaxTotalPrice parameters are // located in OnDemandOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_OnDemandOptions.html) -// and SpotOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptions) +// and SpotOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotOptions). type TargetCapacitySpecification struct { _ struct{} `type:"structure"` @@ -111730,6 +122299,66 @@ func (s *TransitGatewayAttachmentAssociation) SetTransitGatewayRouteTableId(v st return s } +// The BGP configuration information. +type TransitGatewayAttachmentBgpConfiguration struct { + _ struct{} `type:"structure"` + + // The BGP status. + BgpStatus *string `locationName:"bgpStatus" type:"string" enum:"BgpStatus"` + + // The interior BGP peer IP address for the appliance. + PeerAddress *string `locationName:"peerAddress" type:"string"` + + // The peer Autonomous System Number (ASN). + PeerAsn *int64 `locationName:"peerAsn" type:"long"` + + // The interior BGP peer IP address for the transit gateway. + TransitGatewayAddress *string `locationName:"transitGatewayAddress" type:"string"` + + // The transit gateway Autonomous System Number (ASN). + TransitGatewayAsn *int64 `locationName:"transitGatewayAsn" type:"long"` +} + +// String returns the string representation +func (s TransitGatewayAttachmentBgpConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayAttachmentBgpConfiguration) GoString() string { + return s.String() +} + +// SetBgpStatus sets the BgpStatus field's value. +func (s *TransitGatewayAttachmentBgpConfiguration) SetBgpStatus(v string) *TransitGatewayAttachmentBgpConfiguration { + s.BgpStatus = &v + return s +} + +// SetPeerAddress sets the PeerAddress field's value. +func (s *TransitGatewayAttachmentBgpConfiguration) SetPeerAddress(v string) *TransitGatewayAttachmentBgpConfiguration { + s.PeerAddress = &v + return s +} + +// SetPeerAsn sets the PeerAsn field's value. +func (s *TransitGatewayAttachmentBgpConfiguration) SetPeerAsn(v int64) *TransitGatewayAttachmentBgpConfiguration { + s.PeerAsn = &v + return s +} + +// SetTransitGatewayAddress sets the TransitGatewayAddress field's value. +func (s *TransitGatewayAttachmentBgpConfiguration) SetTransitGatewayAddress(v string) *TransitGatewayAttachmentBgpConfiguration { + s.TransitGatewayAddress = &v + return s +} + +// SetTransitGatewayAsn sets the TransitGatewayAsn field's value. +func (s *TransitGatewayAttachmentBgpConfiguration) SetTransitGatewayAsn(v int64) *TransitGatewayAttachmentBgpConfiguration { + s.TransitGatewayAsn = &v + return s +} + // Describes a propagation route table. type TransitGatewayAttachmentPropagation struct { _ struct{} `type:"structure"` @@ -111763,6 +122392,261 @@ func (s *TransitGatewayAttachmentPropagation) SetTransitGatewayRouteTableId(v st return s } +// Describes a transit gateway Connect attachment. +type TransitGatewayConnect struct { + _ struct{} `type:"structure"` + + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The Connect attachment options. + Options *TransitGatewayConnectOptions `locationName:"options" type:"structure"` + + // The state of the attachment. + State *string `locationName:"state" type:"string" enum:"TransitGatewayAttachmentState"` + + // The tags for the attachment. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the Connect attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` + + // The ID of the transit gateway. + TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + + // The ID of the attachment from which the Connect attachment was created. + TransportTransitGatewayAttachmentId *string `locationName:"transportTransitGatewayAttachmentId" type:"string"` +} + +// String returns the string representation +func (s TransitGatewayConnect) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayConnect) GoString() string { + return s.String() +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayConnect) SetCreationTime(v time.Time) *TransitGatewayConnect { + s.CreationTime = &v + return s +} + +// SetOptions sets the Options field's value. +func (s *TransitGatewayConnect) SetOptions(v *TransitGatewayConnectOptions) *TransitGatewayConnect { + s.Options = v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayConnect) SetState(v string) *TransitGatewayConnect { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TransitGatewayConnect) SetTags(v []*Tag) *TransitGatewayConnect { + s.Tags = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayConnect) SetTransitGatewayAttachmentId(v string) *TransitGatewayConnect { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayId sets the TransitGatewayId field's value. +func (s *TransitGatewayConnect) SetTransitGatewayId(v string) *TransitGatewayConnect { + s.TransitGatewayId = &v + return s +} + +// SetTransportTransitGatewayAttachmentId sets the TransportTransitGatewayAttachmentId field's value. +func (s *TransitGatewayConnect) SetTransportTransitGatewayAttachmentId(v string) *TransitGatewayConnect { + s.TransportTransitGatewayAttachmentId = &v + return s +} + +// Describes the Connect attachment options. +type TransitGatewayConnectOptions struct { + _ struct{} `type:"structure"` + + // The tunnel protocol. + Protocol *string `locationName:"protocol" type:"string" enum:"ProtocolValue"` +} + +// String returns the string representation +func (s TransitGatewayConnectOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayConnectOptions) GoString() string { + return s.String() +} + +// SetProtocol sets the Protocol field's value. +func (s *TransitGatewayConnectOptions) SetProtocol(v string) *TransitGatewayConnectOptions { + s.Protocol = &v + return s +} + +// Describes a transit gateway Connect peer. +type TransitGatewayConnectPeer struct { + _ struct{} `type:"structure"` + + // The Connect peer details. + ConnectPeerConfiguration *TransitGatewayConnectPeerConfiguration `locationName:"connectPeerConfiguration" type:"structure"` + + // The creation time. + CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + + // The state of the Connect peer. + State *string `locationName:"state" type:"string" enum:"TransitGatewayConnectPeerState"` + + // The tags for the Connect peer. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the Connect attachment. + TransitGatewayAttachmentId *string `locationName:"transitGatewayAttachmentId" type:"string"` + + // The ID of the Connect peer. + TransitGatewayConnectPeerId *string `locationName:"transitGatewayConnectPeerId" type:"string"` +} + +// String returns the string representation +func (s TransitGatewayConnectPeer) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayConnectPeer) GoString() string { + return s.String() +} + +// SetConnectPeerConfiguration sets the ConnectPeerConfiguration field's value. +func (s *TransitGatewayConnectPeer) SetConnectPeerConfiguration(v *TransitGatewayConnectPeerConfiguration) *TransitGatewayConnectPeer { + s.ConnectPeerConfiguration = v + return s +} + +// SetCreationTime sets the CreationTime field's value. +func (s *TransitGatewayConnectPeer) SetCreationTime(v time.Time) *TransitGatewayConnectPeer { + s.CreationTime = &v + return s +} + +// SetState sets the State field's value. +func (s *TransitGatewayConnectPeer) SetState(v string) *TransitGatewayConnectPeer { + s.State = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TransitGatewayConnectPeer) SetTags(v []*Tag) *TransitGatewayConnectPeer { + s.Tags = v + return s +} + +// SetTransitGatewayAttachmentId sets the TransitGatewayAttachmentId field's value. +func (s *TransitGatewayConnectPeer) SetTransitGatewayAttachmentId(v string) *TransitGatewayConnectPeer { + s.TransitGatewayAttachmentId = &v + return s +} + +// SetTransitGatewayConnectPeerId sets the TransitGatewayConnectPeerId field's value. +func (s *TransitGatewayConnectPeer) SetTransitGatewayConnectPeerId(v string) *TransitGatewayConnectPeer { + s.TransitGatewayConnectPeerId = &v + return s +} + +// Describes the Connect peer details. +type TransitGatewayConnectPeerConfiguration struct { + _ struct{} `type:"structure"` + + // The BGP configuration details. + BgpConfigurations []*TransitGatewayAttachmentBgpConfiguration `locationName:"bgpConfigurations" locationNameList:"item" type:"list"` + + // The range of interior BGP peer IP addresses. + InsideCidrBlocks []*string `locationName:"insideCidrBlocks" locationNameList:"item" type:"list"` + + // The Connect peer IP address on the appliance side of the tunnel. + PeerAddress *string `locationName:"peerAddress" type:"string"` + + // The tunnel protocol. + Protocol *string `locationName:"protocol" type:"string" enum:"ProtocolValue"` + + // The Connect peer IP address on the transit gateway side of the tunnel. + TransitGatewayAddress *string `locationName:"transitGatewayAddress" type:"string"` +} + +// String returns the string representation +func (s TransitGatewayConnectPeerConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayConnectPeerConfiguration) GoString() string { + return s.String() +} + +// SetBgpConfigurations sets the BgpConfigurations field's value. +func (s *TransitGatewayConnectPeerConfiguration) SetBgpConfigurations(v []*TransitGatewayAttachmentBgpConfiguration) *TransitGatewayConnectPeerConfiguration { + s.BgpConfigurations = v + return s +} + +// SetInsideCidrBlocks sets the InsideCidrBlocks field's value. +func (s *TransitGatewayConnectPeerConfiguration) SetInsideCidrBlocks(v []*string) *TransitGatewayConnectPeerConfiguration { + s.InsideCidrBlocks = v + return s +} + +// SetPeerAddress sets the PeerAddress field's value. +func (s *TransitGatewayConnectPeerConfiguration) SetPeerAddress(v string) *TransitGatewayConnectPeerConfiguration { + s.PeerAddress = &v + return s +} + +// SetProtocol sets the Protocol field's value. +func (s *TransitGatewayConnectPeerConfiguration) SetProtocol(v string) *TransitGatewayConnectPeerConfiguration { + s.Protocol = &v + return s +} + +// SetTransitGatewayAddress sets the TransitGatewayAddress field's value. +func (s *TransitGatewayConnectPeerConfiguration) SetTransitGatewayAddress(v string) *TransitGatewayConnectPeerConfiguration { + s.TransitGatewayAddress = &v + return s +} + +// The BGP options for the Connect attachment. +type TransitGatewayConnectRequestBgpOptions struct { + _ struct{} `type:"structure"` + + // The peer Autonomous System Number (ASN). + PeerAsn *int64 `type:"long"` +} + +// String returns the string representation +func (s TransitGatewayConnectRequestBgpOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayConnectRequestBgpOptions) GoString() string { + return s.String() +} + +// SetPeerAsn sets the PeerAsn field's value. +func (s *TransitGatewayConnectRequestBgpOptions) SetPeerAsn(v int64) *TransitGatewayConnectRequestBgpOptions { + s.PeerAsn = &v + return s +} + // Describes the deregistered transit gateway multicast group members. type TransitGatewayMulticastDeregisteredGroupMembers struct { _ struct{} `type:"structure"` @@ -111854,6 +122738,12 @@ type TransitGatewayMulticastDomain struct { // The time the transit gateway multicast domain was created. CreationTime *time.Time `locationName:"creationTime" type:"timestamp"` + // The options for the transit gateway multicast domain. + Options *TransitGatewayMulticastDomainOptions `locationName:"options" type:"structure"` + + // The ID of the AWS account that owns the transit gateway multiicast domain. + OwnerId *string `locationName:"ownerId" type:"string"` + // The state of the transit gateway multicast domain. State *string `locationName:"state" type:"string" enum:"TransitGatewayMulticastDomainState"` @@ -111863,6 +122753,9 @@ type TransitGatewayMulticastDomain struct { // The ID of the transit gateway. TransitGatewayId *string `locationName:"transitGatewayId" type:"string"` + // The Amazon Resource Name (ARN) of the transit gateway multicast domain. + TransitGatewayMulticastDomainArn *string `locationName:"transitGatewayMulticastDomainArn" type:"string"` + // The ID of the transit gateway multicast domain. TransitGatewayMulticastDomainId *string `locationName:"transitGatewayMulticastDomainId" type:"string"` } @@ -111883,6 +122776,18 @@ func (s *TransitGatewayMulticastDomain) SetCreationTime(v time.Time) *TransitGat return s } +// SetOptions sets the Options field's value. +func (s *TransitGatewayMulticastDomain) SetOptions(v *TransitGatewayMulticastDomainOptions) *TransitGatewayMulticastDomain { + s.Options = v + return s +} + +// SetOwnerId sets the OwnerId field's value. +func (s *TransitGatewayMulticastDomain) SetOwnerId(v string) *TransitGatewayMulticastDomain { + s.OwnerId = &v + return s +} + // SetState sets the State field's value. func (s *TransitGatewayMulticastDomain) SetState(v string) *TransitGatewayMulticastDomain { s.State = &v @@ -111901,6 +122806,12 @@ func (s *TransitGatewayMulticastDomain) SetTransitGatewayId(v string) *TransitGa return s } +// SetTransitGatewayMulticastDomainArn sets the TransitGatewayMulticastDomainArn field's value. +func (s *TransitGatewayMulticastDomain) SetTransitGatewayMulticastDomainArn(v string) *TransitGatewayMulticastDomain { + s.TransitGatewayMulticastDomainArn = &v + return s +} + // SetTransitGatewayMulticastDomainId sets the TransitGatewayMulticastDomainId field's value. func (s *TransitGatewayMulticastDomain) SetTransitGatewayMulticastDomainId(v string) *TransitGatewayMulticastDomain { s.TransitGatewayMulticastDomainId = &v @@ -111914,6 +122825,10 @@ type TransitGatewayMulticastDomainAssociation struct { // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` + // The ID of the AWS account that owns the transit gateway multicast domain + // association resource. + ResourceOwnerId *string `locationName:"resourceOwnerId" type:"string"` + // The type of resource, for example a VPC attachment. ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` @@ -111940,6 +122855,12 @@ func (s *TransitGatewayMulticastDomainAssociation) SetResourceId(v string) *Tran return s } +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *TransitGatewayMulticastDomainAssociation) SetResourceOwnerId(v string) *TransitGatewayMulticastDomainAssociation { + s.ResourceOwnerId = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *TransitGatewayMulticastDomainAssociation) SetResourceType(v string) *TransitGatewayMulticastDomainAssociation { s.ResourceType = &v @@ -111965,6 +122886,9 @@ type TransitGatewayMulticastDomainAssociations struct { // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` + // The ID of the AWS account that owns the resource. + ResourceOwnerId *string `locationName:"resourceOwnerId" type:"string"` + // The type of resource, for example a VPC attachment. ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` @@ -111994,6 +122918,12 @@ func (s *TransitGatewayMulticastDomainAssociations) SetResourceId(v string) *Tra return s } +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *TransitGatewayMulticastDomainAssociations) SetResourceOwnerId(v string) *TransitGatewayMulticastDomainAssociations { + s.ResourceOwnerId = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *TransitGatewayMulticastDomainAssociations) SetResourceType(v string) *TransitGatewayMulticastDomainAssociations { s.ResourceType = &v @@ -112018,6 +122948,51 @@ func (s *TransitGatewayMulticastDomainAssociations) SetTransitGatewayMulticastDo return s } +// Describes the options for a transit gateway multicast domain. +type TransitGatewayMulticastDomainOptions struct { + _ struct{} `type:"structure"` + + // Indicates whether to automatically cross-account subnet associations that + // are associated with the transit gateway multicast domain. + AutoAcceptSharedAssociations *string `locationName:"autoAcceptSharedAssociations" type:"string" enum:"AutoAcceptSharedAssociationsValue"` + + // Indicates whether Internet Group Management Protocol (IGMP) version 2 is + // turned on for the transit gateway multicast domain. + Igmpv2Support *string `locationName:"igmpv2Support" type:"string" enum:"Igmpv2SupportValue"` + + // Indicates whether support for statically configuring transit gateway multicast + // group sources is turned on. + StaticSourcesSupport *string `locationName:"staticSourcesSupport" type:"string" enum:"StaticSourcesSupportValue"` +} + +// String returns the string representation +func (s TransitGatewayMulticastDomainOptions) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TransitGatewayMulticastDomainOptions) GoString() string { + return s.String() +} + +// SetAutoAcceptSharedAssociations sets the AutoAcceptSharedAssociations field's value. +func (s *TransitGatewayMulticastDomainOptions) SetAutoAcceptSharedAssociations(v string) *TransitGatewayMulticastDomainOptions { + s.AutoAcceptSharedAssociations = &v + return s +} + +// SetIgmpv2Support sets the Igmpv2Support field's value. +func (s *TransitGatewayMulticastDomainOptions) SetIgmpv2Support(v string) *TransitGatewayMulticastDomainOptions { + s.Igmpv2Support = &v + return s +} + +// SetStaticSourcesSupport sets the StaticSourcesSupport field's value. +func (s *TransitGatewayMulticastDomainOptions) SetStaticSourcesSupport(v string) *TransitGatewayMulticastDomainOptions { + s.StaticSourcesSupport = &v + return s +} + // Describes the transit gateway multicast group resources. type TransitGatewayMulticastGroup struct { _ struct{} `type:"structure"` @@ -112040,6 +123015,10 @@ type TransitGatewayMulticastGroup struct { // The ID of the resource. ResourceId *string `locationName:"resourceId" type:"string"` + // The ID of the AWS account that owns the transit gateway multicast domain + // group resource. + ResourceOwnerId *string `locationName:"resourceOwnerId" type:"string"` + // The type of resource, for example a VPC attachment. ResourceType *string `locationName:"resourceType" type:"string" enum:"TransitGatewayAttachmentResourceType"` @@ -112099,6 +123078,12 @@ func (s *TransitGatewayMulticastGroup) SetResourceId(v string) *TransitGatewayMu return s } +// SetResourceOwnerId sets the ResourceOwnerId field's value. +func (s *TransitGatewayMulticastGroup) SetResourceOwnerId(v string) *TransitGatewayMulticastGroup { + s.ResourceOwnerId = &v + return s +} + // SetResourceType sets the ResourceType field's value. func (s *TransitGatewayMulticastGroup) SetResourceType(v string) *TransitGatewayMulticastGroup { s.ResourceType = &v @@ -112240,6 +123225,9 @@ type TransitGatewayOptions struct { // The ID of the default propagation route table. PropagationDefaultRouteTableId *string `locationName:"propagationDefaultRouteTableId" type:"string"` + // The transit gateway CIDR blocks. + TransitGatewayCidrBlocks []*string `locationName:"transitGatewayCidrBlocks" locationNameList:"item" type:"list"` + // Indicates whether Equal Cost Multipath Protocol support is enabled. VpnEcmpSupport *string `locationName:"vpnEcmpSupport" type:"string" enum:"VpnEcmpSupportValue"` } @@ -112302,6 +123290,12 @@ func (s *TransitGatewayOptions) SetPropagationDefaultRouteTableId(v string) *Tra return s } +// SetTransitGatewayCidrBlocks sets the TransitGatewayCidrBlocks field's value. +func (s *TransitGatewayOptions) SetTransitGatewayCidrBlocks(v []*string) *TransitGatewayOptions { + s.TransitGatewayCidrBlocks = v + return s +} + // SetVpnEcmpSupport sets the VpnEcmpSupport field's value. func (s *TransitGatewayOptions) SetVpnEcmpSupport(v string) *TransitGatewayOptions { s.VpnEcmpSupport = &v @@ -112585,6 +123579,11 @@ type TransitGatewayRequestOptions struct { // Indicates whether multicast is enabled on the transit gateway MulticastSupport *string `type:"string" enum:"MulticastSupportValue"` + // One or more IPv4 or IPv6 CIDR blocks for the transit gateway. Must be a size + // /24 CIDR block or larger for IPv4, or a size /64 CIDR block or larger for + // IPv6. + TransitGatewayCidrBlocks []*string `locationNameList:"item" type:"list"` + // Enable or disable Equal Cost Multipath Protocol support. Enabled by default. VpnEcmpSupport *string `type:"string" enum:"VpnEcmpSupportValue"` } @@ -112635,6 +123634,12 @@ func (s *TransitGatewayRequestOptions) SetMulticastSupport(v string) *TransitGat return s } +// SetTransitGatewayCidrBlocks sets the TransitGatewayCidrBlocks field's value. +func (s *TransitGatewayRequestOptions) SetTransitGatewayCidrBlocks(v []*string) *TransitGatewayRequestOptions { + s.TransitGatewayCidrBlocks = v + return s +} + // SetVpnEcmpSupport sets the VpnEcmpSupport field's value. func (s *TransitGatewayRequestOptions) SetVpnEcmpSupport(v string) *TransitGatewayRequestOptions { s.VpnEcmpSupport = &v @@ -113064,6 +124069,85 @@ func (s *TransitGatewayVpcAttachmentOptions) SetIpv6Support(v string) *TransitGa return s } +// Information about an association between a branch network interface with +// a trunk network interface. +type TrunkInterfaceAssociation struct { + _ struct{} `type:"structure"` + + // The ID of the association. + AssociationId *string `locationName:"associationId" type:"string"` + + // The ID of the branch network interface. + BranchInterfaceId *string `locationName:"branchInterfaceId" type:"string"` + + // The application key when you use the GRE protocol. + GreKey *int64 `locationName:"greKey" type:"integer"` + + // The interface protocol. Valid values are VLAN and GRE. + InterfaceProtocol *string `locationName:"interfaceProtocol" type:"string" enum:"InterfaceProtocolType"` + + // The tags. + Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` + + // The ID of the trunk network interface. + TrunkInterfaceId *string `locationName:"trunkInterfaceId" type:"string"` + + // The ID of the VLAN when you use the VLAN protocol. + VlanId *int64 `locationName:"vlanId" type:"integer"` +} + +// String returns the string representation +func (s TrunkInterfaceAssociation) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TrunkInterfaceAssociation) GoString() string { + return s.String() +} + +// SetAssociationId sets the AssociationId field's value. +func (s *TrunkInterfaceAssociation) SetAssociationId(v string) *TrunkInterfaceAssociation { + s.AssociationId = &v + return s +} + +// SetBranchInterfaceId sets the BranchInterfaceId field's value. +func (s *TrunkInterfaceAssociation) SetBranchInterfaceId(v string) *TrunkInterfaceAssociation { + s.BranchInterfaceId = &v + return s +} + +// SetGreKey sets the GreKey field's value. +func (s *TrunkInterfaceAssociation) SetGreKey(v int64) *TrunkInterfaceAssociation { + s.GreKey = &v + return s +} + +// SetInterfaceProtocol sets the InterfaceProtocol field's value. +func (s *TrunkInterfaceAssociation) SetInterfaceProtocol(v string) *TrunkInterfaceAssociation { + s.InterfaceProtocol = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *TrunkInterfaceAssociation) SetTags(v []*Tag) *TrunkInterfaceAssociation { + s.Tags = v + return s +} + +// SetTrunkInterfaceId sets the TrunkInterfaceId field's value. +func (s *TrunkInterfaceAssociation) SetTrunkInterfaceId(v string) *TrunkInterfaceAssociation { + s.TrunkInterfaceId = &v + return s +} + +// SetVlanId sets the VlanId field's value. +func (s *TrunkInterfaceAssociation) SetVlanId(v int64) *TrunkInterfaceAssociation { + s.VlanId = &v + return s +} + // The VPN tunnel options. type TunnelOption struct { _ struct{} `type:"structure"` @@ -113634,10 +124718,13 @@ type UpdateSecurityGroupRuleDescriptionsEgressInput struct { // security group ID or the security group name in the request. GroupName *string `type:"string"` - // The IP permissions for the security group rule. - // - // IpPermissions is a required field - IpPermissions []*IpPermission `locationNameList:"item" type:"list" required:"true"` + // The IP permissions for the security group rule. You must specify either the + // IP permissions or the description. + IpPermissions []*IpPermission `locationNameList:"item" type:"list"` + + // The description for the egress security group rules. You must specify either + // the description or the IP permissions. + SecurityGroupRuleDescriptions []*SecurityGroupRuleDescription `locationName:"SecurityGroupRuleDescription" locationNameList:"item" type:"list"` } // String returns the string representation @@ -113650,19 +124737,6 @@ func (s UpdateSecurityGroupRuleDescriptionsEgressInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityGroupRuleDescriptionsEgressInput"} - if s.IpPermissions == nil { - invalidParams.Add(request.NewErrParamRequired("IpPermissions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetDryRun sets the DryRun field's value. func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetDryRun(v bool) *UpdateSecurityGroupRuleDescriptionsEgressInput { s.DryRun = &v @@ -113687,6 +124761,12 @@ func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetIpPermissions(v []*I return s } +// SetSecurityGroupRuleDescriptions sets the SecurityGroupRuleDescriptions field's value. +func (s *UpdateSecurityGroupRuleDescriptionsEgressInput) SetSecurityGroupRuleDescriptions(v []*SecurityGroupRuleDescription) *UpdateSecurityGroupRuleDescriptionsEgressInput { + s.SecurityGroupRuleDescriptions = v + return s +} + type UpdateSecurityGroupRuleDescriptionsEgressOutput struct { _ struct{} `type:"structure"` @@ -113728,10 +124808,13 @@ type UpdateSecurityGroupRuleDescriptionsIngressInput struct { // either the security group ID or the security group name in the request. GroupName *string `type:"string"` - // The IP permissions for the security group rule. - // - // IpPermissions is a required field - IpPermissions []*IpPermission `locationNameList:"item" type:"list" required:"true"` + // The IP permissions for the security group rule. You must specify either IP + // permissions or a description. + IpPermissions []*IpPermission `locationNameList:"item" type:"list"` + + // [VPC only] The description for the ingress security group rules. You must + // specify either a description or IP permissions. + SecurityGroupRuleDescriptions []*SecurityGroupRuleDescription `locationName:"SecurityGroupRuleDescription" locationNameList:"item" type:"list"` } // String returns the string representation @@ -113744,19 +124827,6 @@ func (s UpdateSecurityGroupRuleDescriptionsIngressInput) GoString() string { return s.String() } -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateSecurityGroupRuleDescriptionsIngressInput"} - if s.IpPermissions == nil { - invalidParams.Add(request.NewErrParamRequired("IpPermissions")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - // SetDryRun sets the DryRun field's value. func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetDryRun(v bool) *UpdateSecurityGroupRuleDescriptionsIngressInput { s.DryRun = &v @@ -113781,6 +124851,12 @@ func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetIpPermissions(v []* return s } +// SetSecurityGroupRuleDescriptions sets the SecurityGroupRuleDescriptions field's value. +func (s *UpdateSecurityGroupRuleDescriptionsIngressInput) SetSecurityGroupRuleDescriptions(v []*SecurityGroupRuleDescription) *UpdateSecurityGroupRuleDescriptionsIngressInput { + s.SecurityGroupRuleDescriptions = v + return s +} + type UpdateSecurityGroupRuleDescriptionsIngressOutput struct { _ struct{} `type:"structure"` @@ -113896,7 +124972,7 @@ func (s *UserData) SetData(v string) *UserData { return s } -// Describes a security group and AWS account ID pair. +// Describes a security group and Amazon Web Services account ID pair. type UserIdGroupPair struct { _ struct{} `type:"structure"` @@ -113921,14 +124997,14 @@ type UserIdGroupPair struct { // The status of a VPC peering connection, if applicable. PeeringStatus *string `locationName:"peeringStatus" type:"string"` - // The ID of an AWS account. + // The ID of an Amazon Web Services account. // // For a referenced security group in another VPC, the account ID of the referenced // security group is returned in the response. If the referenced security group // is deleted, this value is not returned. // // [EC2-Classic] Required when adding or removing rules that reference a security - // group in another AWS account. + // group in another Amazon Web Services account. UserId *string `locationName:"userId" type:"string"` // The ID of the VPC for the referenced security group, if applicable. @@ -114210,9 +125286,8 @@ type Volume struct { // rate at which the volume accumulates I/O credits for bursting. Iops *int64 `locationName:"iops" type:"integer"` - // The Amazon Resource Name (ARN) of the AWS Key Management Service (AWS KMS) - // customer master key (CMK) that was used to protect the volume encryption - // key for the volume. + // The Amazon Resource Name (ARN) of the Key Management Service (KMS) KMS key + // that was used to protect the volume encryption key for the volume. KmsKeyId *string `locationName:"kmsKeyId" type:"string"` // Indicates whether Amazon EBS Multi-Attach is enabled. @@ -114473,6 +125548,9 @@ type VolumeModification struct { // The original IOPS rate of the volume. OriginalIops *int64 `locationName:"originalIops" type:"integer"` + // The original setting for Amazon EBS Multi-Attach. + OriginalMultiAttachEnabled *bool `locationName:"originalMultiAttachEnabled" type:"boolean"` + // The original size of the volume, in GiB. OriginalSize *int64 `locationName:"originalSize" type:"integer"` @@ -114494,6 +125572,9 @@ type VolumeModification struct { // The target IOPS rate of the volume. TargetIops *int64 `locationName:"targetIops" type:"integer"` + // The target setting for Amazon EBS Multi-Attach. + TargetMultiAttachEnabled *bool `locationName:"targetMultiAttachEnabled" type:"boolean"` + // The target size of the volume, in GiB. TargetSize *int64 `locationName:"targetSize" type:"integer"` @@ -114535,6 +125616,12 @@ func (s *VolumeModification) SetOriginalIops(v int64) *VolumeModification { return s } +// SetOriginalMultiAttachEnabled sets the OriginalMultiAttachEnabled field's value. +func (s *VolumeModification) SetOriginalMultiAttachEnabled(v bool) *VolumeModification { + s.OriginalMultiAttachEnabled = &v + return s +} + // SetOriginalSize sets the OriginalSize field's value. func (s *VolumeModification) SetOriginalSize(v int64) *VolumeModification { s.OriginalSize = &v @@ -114577,6 +125664,12 @@ func (s *VolumeModification) SetTargetIops(v int64) *VolumeModification { return s } +// SetTargetMultiAttachEnabled sets the TargetMultiAttachEnabled field's value. +func (s *VolumeModification) SetTargetMultiAttachEnabled(v bool) *VolumeModification { + s.TargetMultiAttachEnabled = &v + return s +} + // SetTargetSize sets the TargetSize field's value. func (s *VolumeModification) SetTargetSize(v int64) *VolumeModification { s.TargetSize = &v @@ -116514,6 +127607,18 @@ func ActivityStatus_Values() []string { } } +const ( + // AddressAttributeNameDomainName is a AddressAttributeName enum value + AddressAttributeNameDomainName = "domain-name" +) + +// AddressAttributeName_Values returns all elements of the AddressAttributeName enum +func AddressAttributeName_Values() []string { + return []string{ + AddressAttributeNameDomainName, + } +} + const ( // AffinityDefault is a Affinity enum value AffinityDefault = "default" @@ -116571,6 +127676,9 @@ const ( // AllocationStrategyCapacityOptimized is a AllocationStrategy enum value AllocationStrategyCapacityOptimized = "capacityOptimized" + + // AllocationStrategyCapacityOptimizedPrioritized is a AllocationStrategy enum value + AllocationStrategyCapacityOptimizedPrioritized = "capacityOptimizedPrioritized" ) // AllocationStrategy_Values returns all elements of the AllocationStrategy enum @@ -116579,6 +127687,7 @@ func AllocationStrategy_Values() []string { AllocationStrategyLowestPrice, AllocationStrategyDiversified, AllocationStrategyCapacityOptimized, + AllocationStrategyCapacityOptimizedPrioritized, } } @@ -116598,6 +127707,26 @@ func AllowsMultipleInstanceTypes_Values() []string { } } +const ( + // AnalysisStatusRunning is a AnalysisStatus enum value + AnalysisStatusRunning = "running" + + // AnalysisStatusSucceeded is a AnalysisStatus enum value + AnalysisStatusSucceeded = "succeeded" + + // AnalysisStatusFailed is a AnalysisStatus enum value + AnalysisStatusFailed = "failed" +) + +// AnalysisStatus_Values returns all elements of the AnalysisStatus enum +func AnalysisStatus_Values() []string { + return []string{ + AnalysisStatusRunning, + AnalysisStatusSucceeded, + AnalysisStatusFailed, + } +} + const ( // ApplianceModeSupportValueEnable is a ApplianceModeSupportValue enum value ApplianceModeSupportValueEnable = "enable" @@ -116718,6 +127847,22 @@ func AttachmentStatus_Values() []string { } } +const ( + // AutoAcceptSharedAssociationsValueEnable is a AutoAcceptSharedAssociationsValue enum value + AutoAcceptSharedAssociationsValueEnable = "enable" + + // AutoAcceptSharedAssociationsValueDisable is a AutoAcceptSharedAssociationsValue enum value + AutoAcceptSharedAssociationsValueDisable = "disable" +) + +// AutoAcceptSharedAssociationsValue_Values returns all elements of the AutoAcceptSharedAssociationsValue enum +func AutoAcceptSharedAssociationsValue_Values() []string { + return []string{ + AutoAcceptSharedAssociationsValueEnable, + AutoAcceptSharedAssociationsValueDisable, + } +} + const ( // AutoAcceptSharedAttachmentsValueEnable is a AutoAcceptSharedAttachmentsValue enum value AutoAcceptSharedAttachmentsValueEnable = "enable" @@ -116830,6 +127975,54 @@ func BatchState_Values() []string { } } +const ( + // BgpStatusUp is a BgpStatus enum value + BgpStatusUp = "up" + + // BgpStatusDown is a BgpStatus enum value + BgpStatusDown = "down" +) + +// BgpStatus_Values returns all elements of the BgpStatus enum +func BgpStatus_Values() []string { + return []string{ + BgpStatusUp, + BgpStatusDown, + } +} + +const ( + // BootModeTypeLegacyBios is a BootModeType enum value + BootModeTypeLegacyBios = "legacy-bios" + + // BootModeTypeUefi is a BootModeType enum value + BootModeTypeUefi = "uefi" +) + +// BootModeType_Values returns all elements of the BootModeType enum +func BootModeType_Values() []string { + return []string{ + BootModeTypeLegacyBios, + BootModeTypeUefi, + } +} + +const ( + // BootModeValuesLegacyBios is a BootModeValues enum value + BootModeValuesLegacyBios = "legacy-bios" + + // BootModeValuesUefi is a BootModeValues enum value + BootModeValuesUefi = "uefi" +) + +// BootModeValues_Values returns all elements of the BootModeValues enum +func BootModeValues_Values() []string { + return []string{ + BootModeValuesLegacyBios, + BootModeValuesUefi, + } +} + const ( // BundleTaskStatePending is a BundleTaskState enum value BundleTaskStatePending = "pending" @@ -117270,6 +128463,22 @@ func ConnectionNotificationType_Values() []string { } } +const ( + // ConnectivityTypePrivate is a ConnectivityType enum value + ConnectivityTypePrivate = "private" + + // ConnectivityTypePublic is a ConnectivityType enum value + ConnectivityTypePublic = "public" +) + +// ConnectivityType_Values returns all elements of the ConnectivityType enum +func ConnectivityType_Values() []string { + return []string{ + ConnectivityTypePrivate, + ConnectivityTypePublic, + } +} + const ( // ContainerFormatOva is a ContainerFormat enum value ContainerFormatOva = "ova" @@ -118146,6 +129355,22 @@ func IamInstanceProfileAssociationState_Values() []string { } } +const ( + // Igmpv2SupportValueEnable is a Igmpv2SupportValue enum value + Igmpv2SupportValueEnable = "enable" + + // Igmpv2SupportValueDisable is a Igmpv2SupportValue enum value + Igmpv2SupportValueDisable = "disable" +) + +// Igmpv2SupportValue_Values returns all elements of the Igmpv2SupportValue enum +func Igmpv2SupportValue_Values() []string { + return []string{ + Igmpv2SupportValueEnable, + Igmpv2SupportValueDisable, + } +} + const ( // ImageAttributeNameDescription is a ImageAttributeName enum value ImageAttributeNameDescription = "description" @@ -118167,6 +129392,9 @@ const ( // ImageAttributeNameSriovNetSupport is a ImageAttributeName enum value ImageAttributeNameSriovNetSupport = "sriovNetSupport" + + // ImageAttributeNameBootMode is a ImageAttributeName enum value + ImageAttributeNameBootMode = "bootMode" ) // ImageAttributeName_Values returns all elements of the ImageAttributeName enum @@ -118179,6 +129407,7 @@ func ImageAttributeName_Values() []string { ImageAttributeNameProductCodes, ImageAttributeNameBlockDeviceMapping, ImageAttributeNameSriovNetSupport, + ImageAttributeNameBootMode, } } @@ -118306,6 +129535,30 @@ func InstanceAttributeName_Values() []string { } } +const ( + // InstanceEventWindowStateCreating is a InstanceEventWindowState enum value + InstanceEventWindowStateCreating = "creating" + + // InstanceEventWindowStateDeleting is a InstanceEventWindowState enum value + InstanceEventWindowStateDeleting = "deleting" + + // InstanceEventWindowStateActive is a InstanceEventWindowState enum value + InstanceEventWindowStateActive = "active" + + // InstanceEventWindowStateDeleted is a InstanceEventWindowState enum value + InstanceEventWindowStateDeleted = "deleted" +) + +// InstanceEventWindowState_Values returns all elements of the InstanceEventWindowState enum +func InstanceEventWindowState_Values() []string { + return []string{ + InstanceEventWindowStateCreating, + InstanceEventWindowStateDeleting, + InstanceEventWindowStateActive, + InstanceEventWindowStateDeleted, + } +} + const ( // InstanceHealthStatusHealthy is a InstanceHealthStatus enum value InstanceHealthStatusHealthy = "healthy" @@ -119055,6 +130308,9 @@ const ( // InstanceTypeC5n18xlarge is a InstanceType enum value InstanceTypeC5n18xlarge = "c5n.18xlarge" + // InstanceTypeC5nMetal is a InstanceType enum value + InstanceTypeC5nMetal = "c5n.metal" + // InstanceTypeC6gMetal is a InstanceType enum value InstanceTypeC6gMetal = "c6g.metal" @@ -119109,6 +130365,30 @@ const ( // InstanceTypeC6gd16xlarge is a InstanceType enum value InstanceTypeC6gd16xlarge = "c6gd.16xlarge" + // InstanceTypeC6gnMedium is a InstanceType enum value + InstanceTypeC6gnMedium = "c6gn.medium" + + // InstanceTypeC6gnLarge is a InstanceType enum value + InstanceTypeC6gnLarge = "c6gn.large" + + // InstanceTypeC6gnXlarge is a InstanceType enum value + InstanceTypeC6gnXlarge = "c6gn.xlarge" + + // InstanceTypeC6gn2xlarge is a InstanceType enum value + InstanceTypeC6gn2xlarge = "c6gn.2xlarge" + + // InstanceTypeC6gn4xlarge is a InstanceType enum value + InstanceTypeC6gn4xlarge = "c6gn.4xlarge" + + // InstanceTypeC6gn8xlarge is a InstanceType enum value + InstanceTypeC6gn8xlarge = "c6gn.8xlarge" + + // InstanceTypeC6gn12xlarge is a InstanceType enum value + InstanceTypeC6gn12xlarge = "c6gn.12xlarge" + + // InstanceTypeC6gn16xlarge is a InstanceType enum value + InstanceTypeC6gn16xlarge = "c6gn.16xlarge" + // InstanceTypeCc14xlarge is a InstanceType enum value InstanceTypeCc14xlarge = "cc1.4xlarge" @@ -119133,6 +130413,15 @@ const ( // InstanceTypeG3sXlarge is a InstanceType enum value InstanceTypeG3sXlarge = "g3s.xlarge" + // InstanceTypeG4ad4xlarge is a InstanceType enum value + InstanceTypeG4ad4xlarge = "g4ad.4xlarge" + + // InstanceTypeG4ad8xlarge is a InstanceType enum value + InstanceTypeG4ad8xlarge = "g4ad.8xlarge" + + // InstanceTypeG4ad16xlarge is a InstanceType enum value + InstanceTypeG4ad16xlarge = "g4ad.16xlarge" + // InstanceTypeG4dnXlarge is a InstanceType enum value InstanceTypeG4dnXlarge = "g4dn.xlarge" @@ -119388,6 +130677,18 @@ const ( // InstanceTypeZ1dMetal is a InstanceType enum value InstanceTypeZ1dMetal = "z1d.metal" + // InstanceTypeU6tb156xlarge is a InstanceType enum value + InstanceTypeU6tb156xlarge = "u-6tb1.56xlarge" + + // InstanceTypeU6tb1112xlarge is a InstanceType enum value + InstanceTypeU6tb1112xlarge = "u-6tb1.112xlarge" + + // InstanceTypeU9tb1112xlarge is a InstanceType enum value + InstanceTypeU9tb1112xlarge = "u-9tb1.112xlarge" + + // InstanceTypeU12tb1112xlarge is a InstanceType enum value + InstanceTypeU12tb1112xlarge = "u-12tb1.112xlarge" + // InstanceTypeU6tb1Metal is a InstanceType enum value InstanceTypeU6tb1Metal = "u-6tb1.metal" @@ -119445,6 +130746,9 @@ const ( // InstanceTypeM5dn24xlarge is a InstanceType enum value InstanceTypeM5dn24xlarge = "m5dn.24xlarge" + // InstanceTypeM5dnMetal is a InstanceType enum value + InstanceTypeM5dnMetal = "m5dn.metal" + // InstanceTypeM5nLarge is a InstanceType enum value InstanceTypeM5nLarge = "m5n.large" @@ -119469,6 +130773,9 @@ const ( // InstanceTypeM5n24xlarge is a InstanceType enum value InstanceTypeM5n24xlarge = "m5n.24xlarge" + // InstanceTypeM5nMetal is a InstanceType enum value + InstanceTypeM5nMetal = "m5n.metal" + // InstanceTypeR5dnLarge is a InstanceType enum value InstanceTypeR5dnLarge = "r5dn.large" @@ -119493,6 +130800,9 @@ const ( // InstanceTypeR5dn24xlarge is a InstanceType enum value InstanceTypeR5dn24xlarge = "r5dn.24xlarge" + // InstanceTypeR5dnMetal is a InstanceType enum value + InstanceTypeR5dnMetal = "r5dn.metal" + // InstanceTypeR5nLarge is a InstanceType enum value InstanceTypeR5nLarge = "r5n.large" @@ -119517,6 +130827,9 @@ const ( // InstanceTypeR5n24xlarge is a InstanceType enum value InstanceTypeR5n24xlarge = "r5n.24xlarge" + // InstanceTypeR5nMetal is a InstanceType enum value + InstanceTypeR5nMetal = "r5n.metal" + // InstanceTypeInf1Xlarge is a InstanceType enum value InstanceTypeInf1Xlarge = "inf1.xlarge" @@ -119585,6 +130898,33 @@ const ( // InstanceTypeMac1Metal is a InstanceType enum value InstanceTypeMac1Metal = "mac1.metal" + + // InstanceTypeX2gdMedium is a InstanceType enum value + InstanceTypeX2gdMedium = "x2gd.medium" + + // InstanceTypeX2gdLarge is a InstanceType enum value + InstanceTypeX2gdLarge = "x2gd.large" + + // InstanceTypeX2gdXlarge is a InstanceType enum value + InstanceTypeX2gdXlarge = "x2gd.xlarge" + + // InstanceTypeX2gd2xlarge is a InstanceType enum value + InstanceTypeX2gd2xlarge = "x2gd.2xlarge" + + // InstanceTypeX2gd4xlarge is a InstanceType enum value + InstanceTypeX2gd4xlarge = "x2gd.4xlarge" + + // InstanceTypeX2gd8xlarge is a InstanceType enum value + InstanceTypeX2gd8xlarge = "x2gd.8xlarge" + + // InstanceTypeX2gd12xlarge is a InstanceType enum value + InstanceTypeX2gd12xlarge = "x2gd.12xlarge" + + // InstanceTypeX2gd16xlarge is a InstanceType enum value + InstanceTypeX2gd16xlarge = "x2gd.16xlarge" + + // InstanceTypeX2gdMetal is a InstanceType enum value + InstanceTypeX2gdMetal = "x2gd.metal" ) // InstanceType_Values returns all elements of the InstanceType enum @@ -119790,6 +131130,7 @@ func InstanceType_Values() []string { InstanceTypeC5n4xlarge, InstanceTypeC5n9xlarge, InstanceTypeC5n18xlarge, + InstanceTypeC5nMetal, InstanceTypeC6gMetal, InstanceTypeC6gMedium, InstanceTypeC6gLarge, @@ -119808,6 +131149,14 @@ func InstanceType_Values() []string { InstanceTypeC6gd8xlarge, InstanceTypeC6gd12xlarge, InstanceTypeC6gd16xlarge, + InstanceTypeC6gnMedium, + InstanceTypeC6gnLarge, + InstanceTypeC6gnXlarge, + InstanceTypeC6gn2xlarge, + InstanceTypeC6gn4xlarge, + InstanceTypeC6gn8xlarge, + InstanceTypeC6gn12xlarge, + InstanceTypeC6gn16xlarge, InstanceTypeCc14xlarge, InstanceTypeCc28xlarge, InstanceTypeG22xlarge, @@ -119816,6 +131165,9 @@ func InstanceType_Values() []string { InstanceTypeG38xlarge, InstanceTypeG316xlarge, InstanceTypeG3sXlarge, + InstanceTypeG4ad4xlarge, + InstanceTypeG4ad8xlarge, + InstanceTypeG4ad16xlarge, InstanceTypeG4dnXlarge, InstanceTypeG4dn2xlarge, InstanceTypeG4dn4xlarge, @@ -119901,6 +131253,10 @@ func InstanceType_Values() []string { InstanceTypeZ1d6xlarge, InstanceTypeZ1d12xlarge, InstanceTypeZ1dMetal, + InstanceTypeU6tb156xlarge, + InstanceTypeU6tb1112xlarge, + InstanceTypeU9tb1112xlarge, + InstanceTypeU12tb1112xlarge, InstanceTypeU6tb1Metal, InstanceTypeU9tb1Metal, InstanceTypeU12tb1Metal, @@ -119920,6 +131276,7 @@ func InstanceType_Values() []string { InstanceTypeM5dn12xlarge, InstanceTypeM5dn16xlarge, InstanceTypeM5dn24xlarge, + InstanceTypeM5dnMetal, InstanceTypeM5nLarge, InstanceTypeM5nXlarge, InstanceTypeM5n2xlarge, @@ -119928,6 +131285,7 @@ func InstanceType_Values() []string { InstanceTypeM5n12xlarge, InstanceTypeM5n16xlarge, InstanceTypeM5n24xlarge, + InstanceTypeM5nMetal, InstanceTypeR5dnLarge, InstanceTypeR5dnXlarge, InstanceTypeR5dn2xlarge, @@ -119936,6 +131294,7 @@ func InstanceType_Values() []string { InstanceTypeR5dn12xlarge, InstanceTypeR5dn16xlarge, InstanceTypeR5dn24xlarge, + InstanceTypeR5dnMetal, InstanceTypeR5nLarge, InstanceTypeR5nXlarge, InstanceTypeR5n2xlarge, @@ -119944,6 +131303,7 @@ func InstanceType_Values() []string { InstanceTypeR5n12xlarge, InstanceTypeR5n16xlarge, InstanceTypeR5n24xlarge, + InstanceTypeR5nMetal, InstanceTypeInf1Xlarge, InstanceTypeInf12xlarge, InstanceTypeInf16xlarge, @@ -119967,6 +131327,15 @@ func InstanceType_Values() []string { InstanceTypeM6gd12xlarge, InstanceTypeM6gd16xlarge, InstanceTypeMac1Metal, + InstanceTypeX2gdMedium, + InstanceTypeX2gdLarge, + InstanceTypeX2gdXlarge, + InstanceTypeX2gd2xlarge, + InstanceTypeX2gd4xlarge, + InstanceTypeX2gd8xlarge, + InstanceTypeX2gd12xlarge, + InstanceTypeX2gd16xlarge, + InstanceTypeX2gdMetal, } } @@ -120002,6 +131371,22 @@ func InterfacePermissionType_Values() []string { } } +const ( + // InterfaceProtocolTypeVlan is a InterfaceProtocolType enum value + InterfaceProtocolTypeVlan = "VLAN" + + // InterfaceProtocolTypeGre is a InterfaceProtocolType enum value + InterfaceProtocolTypeGre = "GRE" +) + +// InterfaceProtocolType_Values returns all elements of the InterfaceProtocolType enum +func InterfaceProtocolType_Values() []string { + return []string{ + InterfaceProtocolTypeVlan, + InterfaceProtocolTypeGre, + } +} + const ( // Ipv6SupportValueEnable is a Ipv6SupportValue enum value Ipv6SupportValueEnable = "enable" @@ -120381,12 +131766,20 @@ func NetworkInterfaceAttribute_Values() []string { const ( // NetworkInterfaceCreationTypeEfa is a NetworkInterfaceCreationType enum value NetworkInterfaceCreationTypeEfa = "efa" + + // NetworkInterfaceCreationTypeBranch is a NetworkInterfaceCreationType enum value + NetworkInterfaceCreationTypeBranch = "branch" + + // NetworkInterfaceCreationTypeTrunk is a NetworkInterfaceCreationType enum value + NetworkInterfaceCreationTypeTrunk = "trunk" ) // NetworkInterfaceCreationType_Values returns all elements of the NetworkInterfaceCreationType enum func NetworkInterfaceCreationType_Values() []string { return []string{ NetworkInterfaceCreationTypeEfa, + NetworkInterfaceCreationTypeBranch, + NetworkInterfaceCreationTypeTrunk, } } @@ -120451,6 +131844,9 @@ const ( // NetworkInterfaceTypeEfa is a NetworkInterfaceType enum value NetworkInterfaceTypeEfa = "efa" + + // NetworkInterfaceTypeTrunk is a NetworkInterfaceType enum value + NetworkInterfaceTypeTrunk = "trunk" ) // NetworkInterfaceType_Values returns all elements of the NetworkInterfaceType enum @@ -120459,6 +131855,7 @@ func NetworkInterfaceType_Values() []string { NetworkInterfaceTypeInterface, NetworkInterfaceTypeNatGateway, NetworkInterfaceTypeEfa, + NetworkInterfaceTypeTrunk, } } @@ -120542,6 +131939,30 @@ func OperationType_Values() []string { } } +const ( + // PartitionLoadFrequencyNone is a PartitionLoadFrequency enum value + PartitionLoadFrequencyNone = "none" + + // PartitionLoadFrequencyDaily is a PartitionLoadFrequency enum value + PartitionLoadFrequencyDaily = "daily" + + // PartitionLoadFrequencyWeekly is a PartitionLoadFrequency enum value + PartitionLoadFrequencyWeekly = "weekly" + + // PartitionLoadFrequencyMonthly is a PartitionLoadFrequency enum value + PartitionLoadFrequencyMonthly = "monthly" +) + +// PartitionLoadFrequency_Values returns all elements of the PartitionLoadFrequency enum +func PartitionLoadFrequency_Values() []string { + return []string{ + PartitionLoadFrequencyNone, + PartitionLoadFrequencyDaily, + PartitionLoadFrequencyWeekly, + PartitionLoadFrequencyMonthly, + } +} + const ( // PaymentOptionAllUpfront is a PaymentOption enum value PaymentOptionAllUpfront = "AllUpfront" @@ -120754,6 +132175,34 @@ func ProductCodeValues_Values() []string { } } +const ( + // ProtocolTcp is a Protocol enum value + ProtocolTcp = "tcp" + + // ProtocolUdp is a Protocol enum value + ProtocolUdp = "udp" +) + +// Protocol_Values returns all elements of the Protocol enum +func Protocol_Values() []string { + return []string{ + ProtocolTcp, + ProtocolUdp, + } +} + +const ( + // ProtocolValueGre is a ProtocolValue enum value + ProtocolValueGre = "gre" +) + +// ProtocolValue_Values returns all elements of the ProtocolValue enum +func ProtocolValue_Values() []string { + return []string{ + ProtocolValueGre, + } +} + const ( // RIProductDescriptionLinuxUnix is a RIProductDescription enum value RIProductDescriptionLinuxUnix = "Linux/UNIX" @@ -120790,6 +132239,38 @@ func RecurringChargeFrequency_Values() []string { } } +const ( + // ReplaceRootVolumeTaskStatePending is a ReplaceRootVolumeTaskState enum value + ReplaceRootVolumeTaskStatePending = "pending" + + // ReplaceRootVolumeTaskStateInProgress is a ReplaceRootVolumeTaskState enum value + ReplaceRootVolumeTaskStateInProgress = "in-progress" + + // ReplaceRootVolumeTaskStateFailing is a ReplaceRootVolumeTaskState enum value + ReplaceRootVolumeTaskStateFailing = "failing" + + // ReplaceRootVolumeTaskStateSucceeded is a ReplaceRootVolumeTaskState enum value + ReplaceRootVolumeTaskStateSucceeded = "succeeded" + + // ReplaceRootVolumeTaskStateFailed is a ReplaceRootVolumeTaskState enum value + ReplaceRootVolumeTaskStateFailed = "failed" + + // ReplaceRootVolumeTaskStateFailedDetached is a ReplaceRootVolumeTaskState enum value + ReplaceRootVolumeTaskStateFailedDetached = "failed-detached" +) + +// ReplaceRootVolumeTaskState_Values returns all elements of the ReplaceRootVolumeTaskState enum +func ReplaceRootVolumeTaskState_Values() []string { + return []string{ + ReplaceRootVolumeTaskStatePending, + ReplaceRootVolumeTaskStateInProgress, + ReplaceRootVolumeTaskStateFailing, + ReplaceRootVolumeTaskStateSucceeded, + ReplaceRootVolumeTaskStateFailed, + ReplaceRootVolumeTaskStateFailedDetached, + } +} + const ( // ReplacementStrategyLaunch is a ReplacementStrategy enum value ReplacementStrategyLaunch = "launch" @@ -120991,6 +132472,9 @@ const ( // ResourceTypeInstance is a ResourceType enum value ResourceTypeInstance = "instance" + // ResourceTypeInstanceEventWindow is a ResourceType enum value + ResourceTypeInstanceEventWindow = "instance-event-window" + // ResourceTypeInternetGateway is a ResourceType enum value ResourceTypeInternetGateway = "internet-gateway" @@ -121012,6 +132496,12 @@ const ( // ResourceTypeNetworkInterface is a ResourceType enum value ResourceTypeNetworkInterface = "network-interface" + // ResourceTypeNetworkInsightsAnalysis is a ResourceType enum value + ResourceTypeNetworkInsightsAnalysis = "network-insights-analysis" + + // ResourceTypeNetworkInsightsPath is a ResourceType enum value + ResourceTypeNetworkInsightsPath = "network-insights-path" + // ResourceTypePlacementGroup is a ResourceType enum value ResourceTypePlacementGroup = "placement-group" @@ -121024,6 +132514,9 @@ const ( // ResourceTypeSecurityGroup is a ResourceType enum value ResourceTypeSecurityGroup = "security-group" + // ResourceTypeSecurityGroupRule is a ResourceType enum value + ResourceTypeSecurityGroupRule = "security-group-rule" + // ResourceTypeSnapshot is a ResourceType enum value ResourceTypeSnapshot = "snapshot" @@ -121051,6 +132544,9 @@ const ( // ResourceTypeTransitGatewayAttachment is a ResourceType enum value ResourceTypeTransitGatewayAttachment = "transit-gateway-attachment" + // ResourceTypeTransitGatewayConnectPeer is a ResourceType enum value + ResourceTypeTransitGatewayConnectPeer = "transit-gateway-connect-peer" + // ResourceTypeTransitGatewayMulticastDomain is a ResourceType enum value ResourceTypeTransitGatewayMulticastDomain = "transit-gateway-multicast-domain" @@ -121095,6 +132591,7 @@ func ResourceType_Values() []string { ResourceTypeImportImageTask, ResourceTypeImportSnapshotTask, ResourceTypeInstance, + ResourceTypeInstanceEventWindow, ResourceTypeInternetGateway, ResourceTypeKeyPair, ResourceTypeLaunchTemplate, @@ -121102,10 +132599,13 @@ func ResourceType_Values() []string { ResourceTypeNatgateway, ResourceTypeNetworkAcl, ResourceTypeNetworkInterface, + ResourceTypeNetworkInsightsAnalysis, + ResourceTypeNetworkInsightsPath, ResourceTypePlacementGroup, ResourceTypeReservedInstances, ResourceTypeRouteTable, ResourceTypeSecurityGroup, + ResourceTypeSecurityGroupRule, ResourceTypeSnapshot, ResourceTypeSpotFleetRequest, ResourceTypeSpotInstancesRequest, @@ -121115,6 +132615,7 @@ func ResourceType_Values() []string { ResourceTypeTrafficMirrorTarget, ResourceTypeTransitGateway, ResourceTypeTransitGatewayAttachment, + ResourceTypeTransitGatewayConnectPeer, ResourceTypeTransitGatewayMulticastDomain, ResourceTypeTransitGatewayRouteTable, ResourceTypeVolume, @@ -121363,6 +132864,9 @@ const ( // SpotAllocationStrategyCapacityOptimized is a SpotAllocationStrategy enum value SpotAllocationStrategyCapacityOptimized = "capacity-optimized" + + // SpotAllocationStrategyCapacityOptimizedPrioritized is a SpotAllocationStrategy enum value + SpotAllocationStrategyCapacityOptimizedPrioritized = "capacity-optimized-prioritized" ) // SpotAllocationStrategy_Values returns all elements of the SpotAllocationStrategy enum @@ -121371,6 +132875,7 @@ func SpotAllocationStrategy_Values() []string { SpotAllocationStrategyLowestPrice, SpotAllocationStrategyDiversified, SpotAllocationStrategyCapacityOptimized, + SpotAllocationStrategyCapacityOptimizedPrioritized, } } @@ -121478,6 +132983,22 @@ func State_Values() []string { } } +const ( + // StaticSourcesSupportValueEnable is a StaticSourcesSupportValue enum value + StaticSourcesSupportValueEnable = "enable" + + // StaticSourcesSupportValueDisable is a StaticSourcesSupportValue enum value + StaticSourcesSupportValueDisable = "disable" +) + +// StaticSourcesSupportValue_Values returns all elements of the StaticSourcesSupportValue enum +func StaticSourcesSupportValue_Values() []string { + return []string{ + StaticSourcesSupportValueEnable, + StaticSourcesSupportValueDisable, + } +} + const ( // StatusMoveInProgress is a Status enum value StatusMoveInProgress = "MoveInProgress" @@ -121804,6 +133325,9 @@ const ( // TransitGatewayAttachmentResourceTypeDirectConnectGateway is a TransitGatewayAttachmentResourceType enum value TransitGatewayAttachmentResourceTypeDirectConnectGateway = "direct-connect-gateway" + // TransitGatewayAttachmentResourceTypeConnect is a TransitGatewayAttachmentResourceType enum value + TransitGatewayAttachmentResourceTypeConnect = "connect" + // TransitGatewayAttachmentResourceTypePeering is a TransitGatewayAttachmentResourceType enum value TransitGatewayAttachmentResourceTypePeering = "peering" @@ -121817,6 +133341,7 @@ func TransitGatewayAttachmentResourceType_Values() []string { TransitGatewayAttachmentResourceTypeVpc, TransitGatewayAttachmentResourceTypeVpn, TransitGatewayAttachmentResourceTypeDirectConnectGateway, + TransitGatewayAttachmentResourceTypeConnect, TransitGatewayAttachmentResourceTypePeering, TransitGatewayAttachmentResourceTypeTgwPeering, } @@ -121883,6 +133408,33 @@ func TransitGatewayAttachmentState_Values() []string { } const ( + // TransitGatewayConnectPeerStatePending is a TransitGatewayConnectPeerState enum value + TransitGatewayConnectPeerStatePending = "pending" + + // TransitGatewayConnectPeerStateAvailable is a TransitGatewayConnectPeerState enum value + TransitGatewayConnectPeerStateAvailable = "available" + + // TransitGatewayConnectPeerStateDeleting is a TransitGatewayConnectPeerState enum value + TransitGatewayConnectPeerStateDeleting = "deleting" + + // TransitGatewayConnectPeerStateDeleted is a TransitGatewayConnectPeerState enum value + TransitGatewayConnectPeerStateDeleted = "deleted" +) + +// TransitGatewayConnectPeerState_Values returns all elements of the TransitGatewayConnectPeerState enum +func TransitGatewayConnectPeerState_Values() []string { + return []string{ + TransitGatewayConnectPeerStatePending, + TransitGatewayConnectPeerStateAvailable, + TransitGatewayConnectPeerStateDeleting, + TransitGatewayConnectPeerStateDeleted, + } +} + +const ( + // TransitGatewayMulitcastDomainAssociationStatePendingAcceptance is a TransitGatewayMulitcastDomainAssociationState enum value + TransitGatewayMulitcastDomainAssociationStatePendingAcceptance = "pendingAcceptance" + // TransitGatewayMulitcastDomainAssociationStateAssociating is a TransitGatewayMulitcastDomainAssociationState enum value TransitGatewayMulitcastDomainAssociationStateAssociating = "associating" @@ -121894,15 +133446,24 @@ const ( // TransitGatewayMulitcastDomainAssociationStateDisassociated is a TransitGatewayMulitcastDomainAssociationState enum value TransitGatewayMulitcastDomainAssociationStateDisassociated = "disassociated" + + // TransitGatewayMulitcastDomainAssociationStateRejected is a TransitGatewayMulitcastDomainAssociationState enum value + TransitGatewayMulitcastDomainAssociationStateRejected = "rejected" + + // TransitGatewayMulitcastDomainAssociationStateFailed is a TransitGatewayMulitcastDomainAssociationState enum value + TransitGatewayMulitcastDomainAssociationStateFailed = "failed" ) // TransitGatewayMulitcastDomainAssociationState_Values returns all elements of the TransitGatewayMulitcastDomainAssociationState enum func TransitGatewayMulitcastDomainAssociationState_Values() []string { return []string{ + TransitGatewayMulitcastDomainAssociationStatePendingAcceptance, TransitGatewayMulitcastDomainAssociationStateAssociating, TransitGatewayMulitcastDomainAssociationStateAssociated, TransitGatewayMulitcastDomainAssociationStateDisassociating, TransitGatewayMulitcastDomainAssociationStateDisassociated, + TransitGatewayMulitcastDomainAssociationStateRejected, + TransitGatewayMulitcastDomainAssociationStateFailed, } } @@ -122561,3 +134122,39 @@ func VpnStaticRouteSource_Values() []string { VpnStaticRouteSourceStatic, } } + +const ( + // WeekDaySunday is a WeekDay enum value + WeekDaySunday = "sunday" + + // WeekDayMonday is a WeekDay enum value + WeekDayMonday = "monday" + + // WeekDayTuesday is a WeekDay enum value + WeekDayTuesday = "tuesday" + + // WeekDayWednesday is a WeekDay enum value + WeekDayWednesday = "wednesday" + + // WeekDayThursday is a WeekDay enum value + WeekDayThursday = "thursday" + + // WeekDayFriday is a WeekDay enum value + WeekDayFriday = "friday" + + // WeekDaySaturday is a WeekDay enum value + WeekDaySaturday = "saturday" +) + +// WeekDay_Values returns all elements of the WeekDay enum +func WeekDay_Values() []string { + return []string{ + WeekDaySunday, + WeekDayMonday, + WeekDayTuesday, + WeekDayWednesday, + WeekDayThursday, + WeekDayFriday, + WeekDaySaturday, + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go index 31c314e0e5..47c44cc9df 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/doc.go @@ -4,8 +4,14 @@ // requests to Amazon Elastic Compute Cloud. // // Amazon Elastic Compute Cloud (Amazon EC2) provides secure and resizable computing -// capacity in the AWS cloud. Using Amazon EC2 eliminates the need to invest +// capacity in the AWS Cloud. Using Amazon EC2 eliminates the need to invest // in hardware up front, so you can develop and deploy applications faster. +// Amazon Virtual Private Cloud (Amazon VPC) enables you to provision a logically +// isolated section of the AWS Cloud where you can launch AWS resources in a +// virtual network that you've defined. Amazon Elastic Block Store (Amazon EBS) +// provides block level storage volumes for use with EC2 instances. EBS volumes +// are highly available and reliable storage volumes that can be attached to +// any running instance and used like a hard drive. // // To learn more, see the following resources: // @@ -13,7 +19,7 @@ // EC2 documentation (http://aws.amazon.com/documentation/ec2) // // * Amazon EBS: Amazon EBS product page (http://aws.amazon.com/ebs), Amazon -// EBS documentation (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html) +// EBS documentation (http://aws.amazon.com/documentation/ebs) // // * Amazon VPC: Amazon VPC product page (http://aws.amazon.com/vpc), Amazon // VPC documentation (http://aws.amazon.com/documentation/vpc) diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go index b9bdbde157..15b26e741d 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/waiters.go @@ -982,7 +982,7 @@ func (c *EC2) WaitUntilSecurityGroupExistsWithContext(ctx aws.Context, input *De { State: request.RetryWaiterState, Matcher: request.ErrorWaiterMatch, - Expected: "InvalidGroupNotFound", + Expected: "InvalidGroup.NotFound", }, }, Logger: c.Config.Logger, diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go index cc0486d15c..7fc722fb07 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go @@ -245,7 +245,7 @@ func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request. // CreateListener API operation for Elastic Load Balancing. // // Creates a listener for the specified Application Load Balancer, Network Load -// Balancer. or Gateway Load Balancer. +// Balancer, or Gateway Load Balancer. // // For more information, see the following: // @@ -417,7 +417,8 @@ func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req * // A load balancer with the specified name already exists. // // * ErrCodeTooManyLoadBalancersException "TooManyLoadBalancers" -// You've reached the limit on the number of load balancers for your AWS account. +// You've reached the limit on the number of load balancers for your Amazon +// Web Services account. // // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" // The requested configuration is not valid. @@ -540,7 +541,8 @@ func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, // The specified priority is in use. // // * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" -// You've reached the limit on the number of target groups for your AWS account. +// You've reached the limit on the number of target groups for your Amazon Web +// Services account. // // * ErrCodeTooManyRulesException "TooManyRules" // You've reached the limit on the number of rules per load balancer. @@ -676,7 +678,8 @@ func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *re // A target group with the specified name already exists. // // * ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" -// You've reached the limit on the number of target groups for your AWS account. +// You've reached the limit on the number of target groups for your Amazon Web +// Services account. // // * ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" // The requested configuration is not valid. @@ -1184,8 +1187,8 @@ func (c *ELBV2) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) // DescribeAccountLimits API operation for Elastic Load Balancing. // -// Describes the current Elastic Load Balancing resource limits for your AWS -// account. +// Describes the current Elastic Load Balancing resource limits for your Amazon +// Web Services account. // // For more information, see the following: // @@ -4672,10 +4675,10 @@ type CreateTargetGroupInput struct { HealthCheckEnabled *bool `type:"boolean"` // The approximate amount of time, in seconds, between health checks of an individual - // target. For TCP health checks, the supported values are 10 and 30 seconds. - // If the target type is instance or ip, the default is 30 seconds. If the target - // group protocol is GENEVE, the default is 10 seconds. If the target type is - // lambda, the default is 35 seconds. + // target. If the target group protocol is TCP, TLS, UDP, or TCP_UDP, the supported + // values are 10 and 30 seconds. If the target group protocol is HTTP or HTTPS, + // the default is 30 seconds. If the target group protocol is GENEVE, the default + // is 10 seconds. If the target type is lambda, the default is 35 seconds. HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` // [HTTP/HTTPS health checks] The destination for health checks on the targets. @@ -4683,7 +4686,7 @@ type CreateTargetGroupInput struct { // [HTTP1 or HTTP2 protocol version] The ping path. The default is /. // // [GRPC protocol version] The path of a custom health check method with the - // format /package.service/method. The default is /AWS.ALB/healthcheck. + // format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck. HealthCheckPath *string `min:"1" type:"string"` // The port the load balancer uses when performing health checks on targets. @@ -6365,7 +6368,8 @@ func (s *HttpRequestMethodConditionConfig) SetValues(v []*string) *HttpRequestMe return s } -// Information about an Elastic Load Balancing resource limit for your AWS account. +// Information about an Elastic Load Balancing resource limit for your Amazon +// Web Services account. type Limit struct { _ struct{} `type:"structure"` @@ -6763,7 +6767,8 @@ type LoadBalancerAttribute struct { // // * waf.fail_open.enabled - Indicates whether to allow a WAF-enabled load // balancer to route requests to targets if it is unable to forward the request - // to AWS WAF. The value is true or false. The default is false. + // to Amazon Web Services WAF. The value is true or false. The default is + // false. // // The following attribute is supported by Network Load Balancers and Gateway // Load Balancers: @@ -6804,7 +6809,9 @@ type LoadBalancerState struct { // The state code. The initial state of the load balancer is provisioning. After // the load balancer is fully set up and ready to route traffic, its state is - // active. If the load balancer could not be set up, its state is failed. + // active. If load balancer is routing traffic but does not have the resources + // it needs to scale, its state isactive_impaired. If the load balancer could + // not be set up, its state is failed. Code *string `type:"string" enum:"LoadBalancerStateEnum"` // A description of the state. @@ -7284,16 +7291,19 @@ type ModifyTargetGroupInput struct { // [HTTP1 or HTTP2 protocol version] The ping path. The default is /. // // [GRPC protocol version] The path of a custom health check method with the - // format /package.service/method. The default is /AWS.ALB/healthcheck. + // format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck. HealthCheckPath *string `min:"1" type:"string"` // The port the load balancer uses when performing health checks on targets. HealthCheckPort *string `type:"string"` // The protocol the load balancer uses when performing health checks on targets. - // The TCP protocol is supported for health checks only if the protocol of the - // target group is TCP, TLS, UDP, or TCP_UDP. The GENEVE, TLS, UDP, and TCP_UDP - // protocols are not supported for health checks. + // For Application Load Balancers, the default is HTTP. For Network Load Balancers + // and Gateway Load Balancers, the default is TCP. The TCP protocol is not supported + // for health checks if the protocol of the target group is HTTP or HTTPS. It + // is supported for health checks only if the protocol of the target group is + // TCP, TLS, UDP, or TCP_UDP. The GENEVE, TLS, UDP, and TCP_UDP protocols are + // not supported for health checks. // // With Network Load Balancers, you can't modify this setting. HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` @@ -8963,8 +8973,8 @@ type TargetGroupAttribute struct { // The value is true or false. The default is false. // // * stickiness.type - The type of sticky sessions. The possible values are - // lb_cookie for Application Load Balancers or source_ip for Network Load - // Balancers. + // lb_cookie and app_cookie for Application Load Balancers or source_ip for + // Network Load Balancers. // // The following attributes are supported only if the load balancer is an Application // Load Balancer and the target is an instance or an IP address: @@ -8979,6 +8989,17 @@ type TargetGroupAttribute struct { // its full share of traffic. The range is 30-900 seconds (15 minutes). The // default is 0 seconds (disabled). // + // * stickiness.app_cookie.cookie_name - Indicates the name of the application-based + // cookie. Names that start with the following prefixes are not allowed: + // AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load + // balancer. + // + // * stickiness.app_cookie.duration_seconds - The time period, in seconds, + // during which requests from a client should be routed to the same target. + // After this time period expires, the application-based cookie is considered + // stale. The range is 1 second to 1 week (604800 seconds). The default value + // is 1 day (86400 seconds). + // // * stickiness.lb_cookie.duration_seconds - The time period, in seconds, // during which requests from a client should be routed to the same target. // After this time period expires, the load balancer-generated cookie is @@ -9001,6 +9022,12 @@ type TargetGroupAttribute struct { // the load balancer terminates connections at the end of the deregistration // timeout. The value is true or false. The default is false. // + // * preserve_client_ip.enabled - Indicates whether client IP preservation + // is enabled. The value is true or false. The default is disabled if the + // target group type is IP address and the target group protocol is TCP or + // TLS. Otherwise, the default is enabled. Client IP preservation cannot + // be disabled for UDP and TCP_UDP target groups. + // // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version // 2 is enabled. The value is true or false. The default is false. Key *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go index 3a9ab86f1b..7ac5a2ff96 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go @@ -183,7 +183,8 @@ const ( // ErrCodeTooManyLoadBalancersException for service response error code // "TooManyLoadBalancers". // - // You've reached the limit on the number of load balancers for your AWS account. + // You've reached the limit on the number of load balancers for your Amazon + // Web Services account. ErrCodeTooManyLoadBalancersException = "TooManyLoadBalancers" // ErrCodeTooManyRegistrationsForTargetIdException for service response error code @@ -208,7 +209,8 @@ const ( // ErrCodeTooManyTargetGroupsException for service response error code // "TooManyTargetGroups". // - // You've reached the limit on the number of target groups for your AWS account. + // You've reached the limit on the number of target groups for your Amazon Web + // Services account. ErrCodeTooManyTargetGroupsException = "TooManyTargetGroups" // ErrCodeTooManyTargetsException for service response error code diff --git a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go index 8e2aae8e5d..1f3b5eae7b 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/kms/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/kms/api.go @@ -59,16 +59,23 @@ func (c *KMS) CancelKeyDeletionRequest(input *CancelKeyDeletionInput) (req *requ // // Cancels the deletion of a customer master key (CMK). When this operation // succeeds, the key state of the CMK is Disabled. To enable the CMK, use EnableKey. -// You cannot perform this operation on a CMK in a different AWS account. // // For more information about scheduling and canceling deletion of a CMK, see // Deleting Customer Master Keys (https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:CancelKeyDeletion (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: ScheduleKeyDeletion +// // 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. @@ -208,6 +215,24 @@ func (c *KMS) ConnectCustomKeyStoreRequest(input *ConnectCustomKeyStoreInput) (r // see Troubleshooting a Custom Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a custom key +// store in a different AWS account. +// +// Required permissions: kms:ConnectCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// Related operations +// +// * CreateCustomKeyStore +// +// * DeleteCustomKeyStore +// +// * DescribeCustomKeyStores +// +// * DisconnectCustomKeyStore +// +// * UpdateCustomKeyStore +// // 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. @@ -349,71 +374,56 @@ func (c *KMS) CreateAliasRequest(input *CreateAliasInput) (req *request.Request, // CreateAlias API operation for AWS Key Management Service. // -// Creates a display name for a customer managed customer master key (CMK). -// You can use an alias to identify a CMK in cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations), -// such as Encrypt and GenerateDataKey. You can change the CMK associated with -// the alias at any time. +// Creates a friendly name for a customer master key (CMK). // -// Aliases are easier to remember than key IDs. They can also help to simplify -// your applications. For example, if you use an alias in your code, you can -// change the CMK your code uses by associating a given alias with a different -// CMK. +// Adding, deleting, or updating an alias can allow or deny permission to the +// CMK. For details, see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) +// in the AWS Key Management Service Developer Guide. +// +// You can use an alias to identify a CMK in the AWS KMS console, in the DescribeKey +// operation and in cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations), +// such as Encrypt and GenerateDataKey. You can also change the CMK that's associated +// with the alias (UpdateAlias) or delete the alias (DeleteAlias) at any time. +// These operations don't affect the underlying CMK. // -// To run the same code in multiple AWS regions, use an alias in your code, -// such as alias/ApplicationKey. Then, in each AWS Region, create an alias/ApplicationKey -// alias that is associated with a CMK in that Region. When you run your code, -// it uses the alias/ApplicationKey CMK for that AWS Region without any Region-specific -// code. +// You can associate the alias with any customer managed CMK in the same AWS +// Region. Each alias is associated with only one CMK at a time, but a CMK can +// have multiple aliases. A valid CMK is required. You can't create an alias +// without a CMK. +// +// The alias must be unique in the account and Region, but you can have aliases +// with the same name in different Regions. For detailed information about aliases, +// see Using aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html) +// in the AWS Key Management Service Developer Guide. // // This operation does not return a response. To get the alias that you created, // use the ListAliases operation. // -// To use aliases successfully, be aware of the following information. +// The CMK that you use for this operation must be in a compatible key state. +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // -// * Each alias points to only one CMK at a time, although a single CMK can -// have multiple aliases. The alias and its associated CMK must be in the -// same AWS account and Region. +// Cross-account use: No. You cannot perform this operation on an alias in a +// different AWS account. // -// * You can associate an alias with any customer managed CMK in the same -// AWS account and Region. However, you do not have permission to associate -// an alias with an AWS managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk) -// or an AWS owned CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk). +// Required permissions // -// * To change the CMK associated with an alias, use the UpdateAlias operation. -// The current CMK and the new CMK must be the same type (both symmetric -// or both asymmetric) and they must have the same key usage (ENCRYPT_DECRYPT -// or SIGN_VERIFY). This restriction prevents cryptographic errors in code -// that uses aliases. +// * kms:CreateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the alias (IAM policy). // -// * The alias name must begin with alias/ followed by a name, such as alias/ExampleAlias. -// It can contain only alphanumeric characters, forward slashes (/), underscores -// (_), and dashes (-). The alias name cannot begin with alias/aws/. The -// alias/aws/ prefix is reserved for AWS managed CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk). +// * kms:CreateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the CMK (key policy). // -// * The alias name must be unique within an AWS Region. However, you can -// use the same alias name in multiple Regions of the same AWS account. Each -// instance of the alias is associated with a CMK in its Region. +// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access) +// in the AWS Key Management Service Developer Guide. // -// * After you create an alias, you cannot change its alias name. However, -// you can use the DeleteAlias operation to delete the alias and then create -// a new alias with the desired name. +// Related operations: // -// * You can use an alias name or alias ARN to identify a CMK in AWS KMS -// cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) -// and in the DescribeKey operation. However, you cannot use alias names -// or alias ARNs in API operations that manage CMKs, such as DisableKey or -// GetKeyPolicy. For information about the valid CMK identifiers for each -// AWS KMS API operation, see the descriptions of the KeyId parameter in -// the API operation documentation. +// * DeleteAlias // -// Because an alias is not a property of a CMK, you can delete and change the -// aliases of a CMK without affecting the CMK. Also, aliases do not appear in -// the response from the DescribeKey operation. To get the aliases and alias -// ARNs of CMKs in each AWS account and Region, use the ListAliases operation. +// * ListAliases // -// The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. +// * UpdateAlias // // 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 @@ -545,6 +555,24 @@ func (c *KMS) CreateCustomKeyStoreRequest(input *CreateCustomKeyStoreInput) (req // For help with failures, see Troubleshooting a Custom Key Store (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a custom key +// store in a different AWS account. +// +// Required permissions: kms:CreateCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy). +// +// Related operations: +// +// * ConnectCustomKeyStore +// +// * DeleteCustomKeyStore +// +// * DescribeCustomKeyStores +// +// * DisconnectCustomKeyStore +// +// * UpdateCustomKeyStore +// // 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. @@ -690,49 +718,62 @@ func (c *KMS) CreateGrantRequest(input *CreateGrantInput) (req *request.Request, // CreateGrant API operation for AWS Key Management Service. // -// Adds a grant to a customer master key (CMK). The grant allows the grantee -// principal to use the CMK when the conditions specified in the grant are met. -// When setting permissions, grants are an alternative to key policies. +// Adds a grant to a customer master key (CMK). +// +// A grant is a policy instrument that allows AWS principals to use AWS KMS +// customer master keys (CMKs) in cryptographic operations. It also can allow +// them to view a CMK (DescribeKey) and create and manage grants. When authorizing +// access to a CMK, grants are considered along with key policies and IAM policies. +// Grants are often used for temporary permissions because you can create one, +// use its permissions, and delete it without changing your key policies or +// IAM policies. +// +// For detailed information about grants, including grant terminology, see Using +// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) +// in the AWS Key Management Service Developer Guide . For examples of working +// with grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html). +// +// The CreateGrant operation returns a GrantToken and a GrantId. +// +// * When you create, retire, or revoke a grant, there might be a brief delay, +// usually less than five minutes, until the grant is available throughout +// AWS KMS. This state is known as eventual consistency. Once the grant has +// achieved eventual consistency, the grantee principal can use the permissions +// in the grant without identifying the grant. However, to use the permissions +// in the grant immediately, use the GrantToken that CreateGrant returns. +// For details, see Using a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/using-grant-token.html) +// in the AWS Key Management Service Developer Guide . +// +// * The CreateGrant operation also returns a GrantId. You can use the GrantId +// and a key identifier to identify the grant in the RetireGrant and RevokeGrant +// operations. To find the grant ID, use the ListGrants or ListRetirableGrants +// operations. // -// To create a grant that allows a cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) -// only when the request includes a particular encryption context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context), -// use the Constraints parameter. For details, see GrantConstraints. +// For information about symmetric and asymmetric CMKs, see Using Symmetric +// and Asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) +// in the AWS Key Management Service Developer Guide. For more information about +// grants, see Grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) +// in the AWS Key Management Service Developer Guide . // -// You can create grants on symmetric and asymmetric CMKs. However, if the grant -// allows an operation that the CMK does not support, CreateGrant fails with -// a ValidationException. +// The CMK that you use for this operation must be in a compatible key state. +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. // -// * Grants for symmetric CMKs cannot allow operations that are not supported -// for symmetric CMKs, including Sign, Verify, and GetPublicKey. (There are -// limited exceptions to this rule for legacy operations, but you should -// not create a grant for an operation that AWS KMS does not support.) +// Cross-account use: Yes. To perform this operation on a CMK in a different +// AWS account, specify the key ARN in the value of the KeyId parameter. // -// * Grants for asymmetric CMKs cannot allow operations that are not supported -// for asymmetric CMKs, including operations that generate data keys (https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKey) -// or data key pairs (https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyPair), -// or operations related to automatic key rotation (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html), -// imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), -// or CMKs in custom key stores (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). +// Required permissions: kms:CreateGrant (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) // -// * Grants for asymmetric CMKs with a KeyUsage of ENCRYPT_DECRYPT cannot -// allow the Sign or Verify operations. Grants for asymmetric CMKs with a -// KeyUsage of SIGN_VERIFY cannot allow the Encrypt or Decrypt operations. +// Related operations: // -// * Grants for asymmetric CMKs cannot include an encryption context grant -// constraint. An encryption context is not supported on asymmetric CMKs. +// * ListGrants // -// For information about symmetric and asymmetric CMKs, see Using Symmetric -// and Asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html) -// in the AWS Key Management Service Developer Guide. +// * ListRetirableGrants // -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. For more information about grants, -// see Grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) -// in the AWS Key Management Service Developer Guide . +// * RetireGrant // -// The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. +// * RevokeGrant // // 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 @@ -844,8 +885,7 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // CreateKey API operation for AWS Key Management Service. // // Creates a unique customer managed customer master key (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master-keys) -// (CMK) in your AWS account and Region. You cannot use this operation to create -// a CMK in a different AWS account. +// (CMK) in your AWS account and Region. // // You can use the CreateKey operation to create symmetric or asymmetric CMKs. // @@ -883,7 +923,29 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // and the default value for KeyUsage, ENCRYPT_DECRYPT, are the only valid values // for symmetric CMKs. // -// Imported Key Material +// Multi-Region primary keys +// +// Imported key material +// +// To create a multi-Region primary key in the local AWS Region, use the MultiRegion +// parameter with a value of True. To create a multi-Region replica key, that +// is, a CMK with the same key ID and key material as a primary key, but in +// a different AWS Region, use the ReplicateKey operation. To change a replica +// key to a primary key, and its primary key to a replica key, use the UpdatePrimaryRegion +// operation. +// +// This operation supports multi-Region keys, an AWS KMS feature that lets you +// create multiple interoperable CMKs in different AWS Regions. Because these +// CMKs have the same key ID, key material, and other metadata, you can use +// them to encrypt data in one AWS Region and decrypt it in a different AWS +// Region without making a cross-Region call or exposing the plaintext data. +// For more information about multi-Region keys, see Using multi-Region keys +// (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) +// in the AWS Key Management Service Developer Guide. +// +// You can create symmetric and asymmetric multi-Region keys and multi-Region +// keys with imported key material. You cannot create multi-Region keys in a +// custom key store. // // To import your own key material, begin by creating a symmetric CMK with no // key material. To do this, use the Origin parameter of CreateKey with a value @@ -894,7 +956,14 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // in the AWS Key Management Service Developer Guide . You cannot import the // key material into an asymmetric CMK. // -// Custom Key Stores +// To create a multi-Region primary key with imported key material, use the +// Origin parameter of CreateKey with a value of EXTERNAL and the MultiRegion +// parameter with a value of True. To create replicas of the multi-Region primary +// key, use the ReplicateKey operation. For more information about multi-Region +// keys, see Using multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) +// in the AWS Key Management Service Developer Guide. +// +// Custom key store // // To create a symmetric CMK in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html), // use the CustomKeyStoreId parameter to specify the custom key store. You must @@ -902,10 +971,28 @@ func (c *KMS) CreateKeyRequest(input *CreateKeyInput) (req *request.Request, out // cluster that is associated with the custom key store must have at least two // active HSMs in different Availability Zones in the AWS Region. // -// You cannot create an asymmetric CMK in a custom key store. For information -// about custom key stores in AWS KMS see Using Custom Key Stores (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) +// You cannot create an asymmetric CMK or a multi-Region CMK in a custom key +// store. For information about custom key stores in AWS KMS see Using Custom +// Key Stores (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) // in the AWS Key Management Service Developer Guide . // +// Cross-account use: No. You cannot use this operation to create a CMK in a +// different AWS account. +// +// Required permissions: kms:CreateKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy). To use the Tags parameter, kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy). For examples and information about related permissions, see +// Allow a user to create CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policy-example-create-key) +// in the AWS Key Management Service Developer Guide. +// +// Related operations: +// +// * DescribeKey +// +// * ListKeys +// +// * ScheduleKeyDeletion +// // 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. @@ -1091,12 +1178,15 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // These libraries return a ciphertext format that is incompatible with AWS // KMS. // -// If the ciphertext was encrypted under a symmetric CMK, you do not need to -// specify the CMK or the encryption algorithm. AWS KMS can get this information -// from metadata that it adds to the symmetric ciphertext blob. However, if -// you prefer, you can specify the KeyId to ensure that a particular CMK is -// used to decrypt the ciphertext. If you specify a different CMK than the one -// used to encrypt the ciphertext, the Decrypt operation fails. +// If the ciphertext was encrypted under a symmetric CMK, the KeyId parameter +// is optional. AWS KMS can get this information from metadata that it adds +// to the symmetric ciphertext blob. This feature adds durability to your implementation +// by ensuring that authorized users can decrypt ciphertext decades after it +// was encrypted, even if they've lost track of the CMK ID. However, specifying +// the CMK is always recommended as a best practice. When you use the KeyId +// parameter to specify a CMK, AWS KMS only uses the CMK you specify. If the +// ciphertext was encrypted under a different CMK, the Decrypt operation fails. +// This practice ensures that you use the CMK that you intend. // // Whenever possible, use key policies to give users permission to call the // Decrypt operation on a particular CMK, instead of using IAM policies. Otherwise, @@ -1104,12 +1194,30 @@ func (c *KMS) DecryptRequest(input *DecryptInput) (req *request.Request, output // on all CMKs. This user could decrypt ciphertext that was encrypted by CMKs // in other accounts if the key policy for the cross-account CMK permits it. // If you must use an IAM policy for Decrypt permissions, limit the user to -// particular CMKs or particular trusted accounts. +// particular CMKs or particular trusted accounts. For details, see Best practices +// for IAM policies (https://docs.aws.amazon.com/kms/latest/developerguide/iam-policies.html#iam-policies-best-practices) +// in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. You can decrypt a ciphertext using a CMK in a different +// AWS account. +// +// Required permissions: kms:Decrypt (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * Encrypt +// +// * GenerateDataKey +// +// * GenerateDataKeyPair +// +// * ReEncrypt +// // 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. @@ -1244,8 +1352,11 @@ func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, // DeleteAlias API operation for AWS Key Management Service. // -// Deletes the specified alias. You cannot perform this operation on an alias -// in a different AWS account. +// Deletes the specified alias. +// +// Adding, deleting, or updating an alias can allow or deny permission to the +// CMK. For details, see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) +// in the AWS Key Management Service Developer Guide. // // Because an alias is not a property of a CMK, you can delete and change the // aliases of a CMK without affecting the CMK. Also, aliases do not appear in @@ -1256,6 +1367,28 @@ func (c *KMS) DeleteAliasRequest(input *DeleteAliasInput) (req *request.Request, // to delete the current alias and CreateAlias to create a new alias. To associate // an existing alias with a different customer master key (CMK), call UpdateAlias. // +// Cross-account use: No. You cannot perform this operation on an alias in a +// different AWS account. +// +// Required permissions +// +// * kms:DeleteAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the alias (IAM policy). +// +// * kms:DeleteAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the CMK (key policy). +// +// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access) +// in the AWS Key Management Service Developer Guide. +// +// Related operations: +// +// * CreateAlias +// +// * ListAliases +// +// * UpdateAlias +// // 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. @@ -1381,6 +1514,24 @@ func (c *KMS) DeleteCustomKeyStoreRequest(input *DeleteCustomKeyStoreInput) (req // feature in AWS KMS, which combines the convenience and extensive integration // of AWS KMS with the isolation and control of a single-tenant key store. // +// Cross-account use: No. You cannot perform this operation on a custom key +// store in a different AWS account. +// +// Required permissions: kms:DeleteCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// Related operations: +// +// * ConnectCustomKeyStore +// +// * CreateCustomKeyStore +// +// * DescribeCustomKeyStores +// +// * DisconnectCustomKeyStore +// +// * UpdateCustomKeyStore +// // 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. @@ -1492,8 +1643,7 @@ func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialI // Deletes key material that you previously imported. This operation makes the // specified customer master key (CMK) unusable. For more information about // importing key material into AWS KMS, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) -// in the AWS Key Management Service Developer Guide. You cannot perform this -// operation on a CMK in a different AWS account. +// in the AWS Key Management Service Developer Guide. // // When the specified CMK is in the PendingDeletion state, this operation does // not change the CMK's state. Otherwise, it changes the CMK's state to PendingImport. @@ -1502,9 +1652,21 @@ func (c *KMS) DeleteImportedKeyMaterialRequest(input *DeleteImportedKeyMaterialI // the same key material into the CMK. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:DeleteImportedKeyMaterial (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * GetParametersForImport +// +// * ImportKeyMaterial +// // 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. @@ -1608,14 +1770,14 @@ func (c *KMS) DescribeCustomKeyStoresRequest(input *DescribeCustomKeyStoresInput // DescribeCustomKeyStores API operation for AWS Key Management Service. // // Gets information about custom key stores (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) -// in the account and region. +// in the account and Region. // // This operation is part of the Custom Key Store feature (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) // feature in AWS KMS, which combines the convenience and extensive integration // of AWS KMS with the isolation and control of a single-tenant key store. // // By default, this operation returns information about all custom key stores -// in the account and region. To get only information about a particular custom +// in the account and Region. To get only information about a particular custom // key store, use either the CustomKeyStoreName or CustomKeyStoreId parameter // (but not both). // @@ -1635,6 +1797,24 @@ func (c *KMS) DescribeCustomKeyStoresRequest(input *DescribeCustomKeyStoresInput // Key Stores (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html) // topic in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a custom key +// store in a different AWS account. +// +// Required permissions: kms:DescribeCustomKeyStores (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// Related operations: +// +// * ConnectCustomKeyStore +// +// * CreateCustomKeyStore +// +// * DeleteCustomKeyStore +// +// * DisconnectCustomKeyStore +// +// * UpdateCustomKeyStore +// // 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. @@ -1647,6 +1827,10 @@ func (c *KMS) DescribeCustomKeyStoresRequest(input *DescribeCustomKeyStoresInput // The request was rejected because AWS KMS cannot find a custom key store with // the specified key store name or ID. // +// * InvalidMarkerException +// The request was rejected because the marker that specifies where pagination +// should next begin is not valid. +// // * InternalException // The request was rejected because an internal exception occurred. The request // can be retried. @@ -1750,8 +1934,27 @@ func (c *KMS) DescribeKeyRequest(input *DescribeKeyInput) (req *request.Request, // Then, it associates the alias with the new CMK, and returns the KeyId and // Arn of the new CMK in the response. // -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN or alias ARN in the value of the KeyId parameter. +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:DescribeKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * GetKeyPolicy +// +// * GetKeyRotationStatus +// +// * ListAliases +// +// * ListGrants +// +// * ListKeys +// +// * ListResourceTags +// +// * ListRetirableGrants // // 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 @@ -1844,18 +2047,25 @@ func (c *KMS) DisableKeyRequest(input *DisableKeyInput) (req *request.Request, o // DisableKey API operation for AWS Key Management Service. // -// Sets the state of a customer master key (CMK) to disabled, thereby preventing -// its use for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations). -// You cannot perform this operation on a CMK in a different AWS account. +// Sets the state of a customer master key (CMK) to disabled. This change temporarily +// prevents use of the CMK for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations). // -// For more information about how key state affects the use of a CMK, see How -// Key State Affects the Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For more information about how key state affects the use of a CMK, see Key +// state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide . // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:DisableKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: EnableKey +// // 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. @@ -1958,14 +2168,29 @@ func (c *KMS) DisableKeyRotationRequest(input *DisableKeyRotationInput) (req *re // Disables automatic rotation of the key material (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) // for the specified symmetric customer master key (CMK). // -// You cannot enable automatic rotation of asymmetric CMKs, CMKs with imported -// key material, or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). -// You cannot perform this operation on a CMK in a different AWS account. +// You cannot enable automatic rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks), +// CMKs with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), +// or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). +// To enable or disable automatic rotation of a set of related multi-Region +// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key), +// set the property on the primary key. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:DisableKeyRotation (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * EnableKeyRotation +// +// * GetKeyRotationStatus +// // 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. @@ -2094,6 +2319,24 @@ func (c *KMS) DisconnectCustomKeyStoreRequest(input *DisconnectCustomKeyStoreInp // feature in AWS KMS, which combines the convenience and extensive integration // of AWS KMS with the isolation and control of a single-tenant key store. // +// Cross-account use: No. You cannot perform this operation on a custom key +// store in a different AWS account. +// +// Required permissions: kms:DisconnectCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// Related operations: +// +// * ConnectCustomKeyStore +// +// * CreateCustomKeyStore +// +// * DeleteCustomKeyStore +// +// * DescribeCustomKeyStores +// +// * UpdateCustomKeyStore +// // 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. @@ -2198,12 +2441,19 @@ func (c *KMS) EnableKeyRequest(input *EnableKeyInput) (req *request.Request, out // // Sets the key state of a customer master key (CMK) to enabled. This allows // you to use the CMK for cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations). -// You cannot perform this operation on a CMK in a different AWS account. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:EnableKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: DisableKey +// // 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. @@ -2309,16 +2559,31 @@ func (c *KMS) EnableKeyRotationRequest(input *EnableKeyRotationInput) (req *requ // EnableKeyRotation API operation for AWS Key Management Service. // // Enables automatic rotation of the key material (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) -// for the specified symmetric customer master key (CMK). You cannot perform -// this operation on a CMK in a different AWS account. +// for the specified symmetric customer master key (CMK). // -// You cannot enable automatic rotation of asymmetric CMKs, CMKs with imported -// key material, or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). +// You cannot enable automatic rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks), +// CMKs with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), +// or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). +// To enable or disable automatic rotation of a set of related multi-Region +// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key), +// set the property on the primary key. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:EnableKeyRotation (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * DisableKeyRotation +// +// * GetKeyRotationStatus +// // 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. @@ -2481,11 +2746,22 @@ func (c *KMS) EncryptRequest(input *EncryptInput) (req *request.Request, output // * RSA_4096 RSAES_OAEP_SHA_1: 470 bytes RSAES_OAEP_SHA_256: 446 bytes // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN or alias ARN in the value of the KeyId parameter. +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:Encrypt (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * Decrypt +// +// * GenerateDataKey +// +// * GenerateDataKeyPair // // 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 @@ -2633,7 +2909,7 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // // How to use your data key @@ -2663,6 +2939,24 @@ func (c *KMS) GenerateDataKeyRequest(input *GenerateDataKeyInput) (req *request. // Use the plaintext data key to decrypt data outside of AWS KMS, then erase // the plaintext data key from memory. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:GenerateDataKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * Decrypt +// +// * Encrypt +// +// * GenerateDataKeyPair +// +// * GenerateDataKeyPairWithoutPlaintext +// +// * GenerateDataKeyWithoutPlaintext +// // 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. @@ -2817,9 +3111,27 @@ func (c *KMS) GenerateDataKeyPairRequest(input *GenerateDataKeyPairInput) (req * // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:GenerateDataKeyPair (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * Decrypt +// +// * Encrypt +// +// * GenerateDataKey +// +// * GenerateDataKeyPairWithoutPlaintext +// +// * GenerateDataKeyWithoutPlaintext +// // 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. @@ -2971,9 +3283,27 @@ func (c *KMS) GenerateDataKeyPairWithoutPlaintextRequest(input *GenerateDataKeyP // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:GenerateDataKeyPairWithoutPlaintext (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * Decrypt +// +// * Encrypt +// +// * GenerateDataKey +// +// * GenerateDataKeyPair +// +// * GenerateDataKeyWithoutPlaintext +// // 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. @@ -3137,9 +3467,27 @@ func (c *KMS) GenerateDataKeyWithoutPlaintextRequest(input *GenerateDataKeyWitho // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:GenerateDataKeyWithoutPlaintext (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * Decrypt +// +// * Encrypt +// +// * GenerateDataKey +// +// * GenerateDataKeyPair +// +// * GenerateDataKeyPairWithoutPlaintext +// // 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. @@ -3266,9 +3614,11 @@ func (c *KMS) GenerateRandomRequest(input *GenerateRandomInput) (req *request.Re // key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html), // specify the custom key store ID. // -// For more information about entropy and random number generation, see the -// AWS Key Management Service Cryptographic Details (https://d0.awsstatic.com/whitepapers/KMS-Cryptographic-Details.pdf) -// whitepaper. +// For more information about entropy and random number generation, see AWS +// Key Management Service Cryptographic Details (https://docs.aws.amazon.com/kms/latest/cryptographic-details/). +// +// Required permissions: kms:GenerateRandom (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM 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 @@ -3375,8 +3725,15 @@ func (c *KMS) GetKeyPolicyRequest(input *GetKeyPolicyInput) (req *request.Reques // GetKeyPolicy API operation for AWS Key Management Service. // -// Gets a key policy attached to the specified customer master key (CMK). You -// cannot perform this operation on a CMK in a different AWS account. +// Gets a key policy attached to the specified customer master key (CMK). +// +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:GetKeyPolicy (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: PutKeyPolicy // // 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 @@ -3480,12 +3837,16 @@ func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req // material (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html) // is enabled for the specified customer master key (CMK). // -// You cannot enable automatic rotation of asymmetric CMKs, CMKs with imported -// key material, or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). -// The key rotation status for these CMKs is always false. +// You cannot enable automatic rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks), +// CMKs with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), +// or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). +// To enable or disable automatic rotation of a set of related multi-Region +// keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key), +// set the property on the primary key. The key rotation status for these CMKs +// is always false. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // // * Disabled: The key rotation status does not change when you disable a @@ -3496,8 +3857,17 @@ func (c *KMS) GetKeyRotationStatusRequest(input *GetKeyRotationStatusInput) (req // status is false and AWS KMS does not rotate the backing key. If you cancel // the deletion, the original key rotation status is restored. // -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. +// Cross-account use: Yes. To perform this operation on a CMK in a different +// AWS account, specify the key ARN in the value of the KeyId parameter. +// +// Required permissions: kms:GetKeyRotationStatus (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * DisableKeyRotation +// +// * EnableKeyRotation // // 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 @@ -3623,9 +3993,21 @@ func (c *KMS) GetParametersForImportRequest(input *GetParametersForImportInput) // send another GetParametersForImport request. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:GetParametersForImport (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * ImportKeyMaterial +// +// * DeleteImportedKeyMaterial +// // 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. @@ -3767,9 +4149,17 @@ func (c *KMS) GetPublicKeyRequest(input *GetPublicKeyInput) (req *request.Reques // errors, such as using the wrong signing algorithm in a verification operation. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:GetPublicKey (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: CreateKey +// // 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. @@ -3942,9 +4332,21 @@ func (c *KMS) ImportKeyMaterialRequest(input *ImportKeyMaterialInput) (req *requ // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:ImportKeyMaterial (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * DeleteImportedKeyMaterial +// +// * GetParametersForImport +// // 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. @@ -4076,12 +4478,12 @@ func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, // ListAliases API operation for AWS Key Management Service. // -// Gets a list of aliases in the caller's AWS account and region. You cannot -// list aliases in other accounts. For more information about aliases, see CreateAlias. +// Gets a list of aliases in the caller's AWS account and region. For more information +// about aliases, see CreateAlias. // -// By default, the ListAliases command returns all aliases in the account and -// region. To get only the aliases that point to a particular customer master -// key (CMK), use the KeyId parameter. +// By default, the ListAliases operation returns all aliases in the account +// and region. To get only the aliases associated with a particular customer +// master key (CMK), use the KeyId parameter. // // The ListAliases response can include aliases that you created and associated // with your customer managed CMKs, and aliases that AWS created and associated @@ -4093,6 +4495,22 @@ func (c *KMS) ListAliasesRequest(input *ListAliasesInput) (req *request.Request, // a CMK. Aliases that AWS creates in your account, including predefined aliases, // do not count against your AWS KMS aliases quota (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html#aliases-limit). // +// Cross-account use: No. ListAliases does not return aliases in other AWS accounts. +// +// Required permissions: kms:ListAliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access) +// in the AWS Key Management Service Developer Guide. +// +// Related operations: +// +// * CreateAlias +// +// * DeleteAlias +// +// * UpdateAlias +// // 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. @@ -4247,8 +4665,8 @@ func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, o // // Gets a list of all grants for the specified customer master key (CMK). // -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. +// You must specify the CMK in all requests. You can filter the grant list by +// grant ID or grantee principal. // // The GranteePrincipal field in the ListGrants response usually contains the // user or role designated as the grantee principal in the grant. However, when @@ -4256,6 +4674,22 @@ func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, o // field contains the service principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#principal-services), // which might represent several different grantee principals. // +// Cross-account use: Yes. To perform this operation on a CMK in a different +// AWS account, specify the key ARN in the value of the KeyId parameter. +// +// Required permissions: kms:ListGrants (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * CreateGrant +// +// * ListRetirableGrants +// +// * RetireGrant +// +// * RevokeGrant +// // 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. @@ -4276,6 +4710,9 @@ func (c *KMS) ListGrantsRequest(input *ListGrantsInput) (req *request.Request, o // The request was rejected because the marker that specifies where pagination // should next begin is not valid. // +// * InvalidGrantIdException +// The request was rejected because the specified GrantId is not valid. +// // * InvalidArnException // The request was rejected because a specified ARN, or an ARN in a key policy, // is not valid. @@ -4419,7 +4856,18 @@ func (c *KMS) ListKeyPoliciesRequest(input *ListKeyPoliciesInput) (req *request. // Gets the names of the key policies that are attached to a customer master // key (CMK). This operation is designed to get policy names that you can use // in a GetKeyPolicy operation. However, the only valid policy name is default. -// You cannot perform this operation on a CMK in a different AWS account. +// +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:ListKeyPolicies (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: +// +// * GetKeyPolicy +// +// * PutKeyPolicy // // 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 @@ -4580,12 +5028,28 @@ func (c *KMS) ListKeysRequest(input *ListKeysInput) (req *request.Request, outpu // Gets a list of all customer master keys (CMKs) in the caller's AWS account // and Region. // -// 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. +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. // -// See the AWS API reference guide for AWS Key Management Service's -// API operation ListKeys for usage and error information. +// Required permissions: kms:ListKeys (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// Related operations: +// +// * CreateKey +// +// * DescribeKey +// +// * ListAliases +// +// * ListResourceTags +// +// 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 AWS Key Management Service's +// API operation ListKeys for usage and error information. // // Returned Error Types: // * DependencyTimeoutException @@ -4718,9 +5182,28 @@ func (c *KMS) ListResourceTagsRequest(input *ListResourceTagsInput) (req *reques // ListResourceTags API operation for AWS Key Management Service. // -// Returns a list of all tags for the specified customer master key (CMK). +// Returns all tags on the specified customer master key (CMK). +// +// For general information about tags, including the format and syntax, see +// Tagging AWS resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the Amazon Web Services General Reference. For information about using +// tags in AWS KMS, see Tagging keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). +// +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:ListResourceTags (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) // -// You cannot perform this operation on a CMK in a different AWS account. +// Related operations: +// +// * CreateKey +// +// * ReplicateKey +// +// * TagResource +// +// * UntagResource // // 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 @@ -4812,11 +5295,34 @@ func (c *KMS) ListRetirableGrantsRequest(input *ListRetirableGrantsInput) (req * // ListRetirableGrants API operation for AWS Key Management Service. // -// Returns a list of all grants for which the grant's RetiringPrincipal matches -// the one specified. +// Returns information about all grants in the AWS account and Region that have +// the specified retiring principal. For more information about grants, see +// Grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) +// in the AWS Key Management Service Developer Guide . +// +// You can specify any principal in your AWS account. The grants that are returned +// include grants for CMKs in your AWS account and other AWS accounts. +// +// You might use this operation to determine which grants you may retire. To +// retire a grant, use the RetireGrant operation. +// +// Cross-account use: You must specify a principal in your AWS account. However, +// this operation can return grants in any AWS account. You do not need kms:ListRetirableGrants +// permission (or any other additional permission) in any AWS account other +// than your own. // -// A typical use is to list all grants that you are able to retire. To retire -// a grant, use RetireGrant. +// Required permissions: kms:ListRetirableGrants (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) in your AWS account. +// +// Related operations: +// +// * CreateGrant +// +// * ListGrants +// +// * RetireGrant +// +// * RevokeGrant // // 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 @@ -4913,12 +5419,23 @@ func (c *KMS) PutKeyPolicyRequest(input *PutKeyPolicyInput) (req *request.Reques // PutKeyPolicy API operation for AWS Key Management Service. // -// Attaches a key policy to the specified customer master key (CMK). You cannot -// perform this operation on a CMK in a different AWS account. +// Attaches a key policy to the specified customer master key (CMK). // // For more information about key policies, see Key Policies (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html) +// in the AWS Key Management Service Developer Guide. For help writing and formatting +// a JSON policy document, see the IAM JSON Policy Reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) +// in the IAM User Guide . For examples of adding a key policy in multiple programming +// languages, see Setting a key policy (https://docs.aws.amazon.com/kms/latest/developerguide/programming-key-policies.html#put-policy) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:PutKeyPolicy (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: GetKeyPolicy +// // 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. @@ -5051,17 +5568,23 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // When you use the ReEncrypt operation, you need to provide information for // the decrypt operation and the subsequent encrypt operation. // -// * If your ciphertext was encrypted under an asymmetric CMK, you must identify -// the source CMK, that is, the CMK that encrypted the ciphertext. You must -// also supply the encryption algorithm that was used. This information is -// required to decrypt the data. -// -// * It is optional, but you can specify a source CMK even when the ciphertext -// was encrypted under a symmetric CMK. This ensures that the ciphertext -// is decrypted only by using a particular CMK. If the CMK that you specify -// cannot decrypt the ciphertext, the ReEncrypt operation fails. -// -// * To reencrypt the data, you must specify the destination CMK, that is, +// * If your ciphertext was encrypted under an asymmetric CMK, you must use +// the SourceKeyId parameter to identify the CMK that encrypted the ciphertext. +// You must also supply the encryption algorithm that was used. This information +// is required to decrypt the data. +// +// * If your ciphertext was encrypted under a symmetric CMK, the SourceKeyId +// parameter is optional. AWS KMS can get this information from metadata +// that it adds to the symmetric ciphertext blob. This feature adds durability +// to your implementation by ensuring that authorized users can decrypt ciphertext +// decades after it was encrypted, even if they've lost track of the CMK +// ID. However, specifying the source CMK is always recommended as a best +// practice. When you use the SourceKeyId parameter to specify a CMK, AWS +// KMS uses only the CMK you specify. If the ciphertext was encrypted under +// a different CMK, the ReEncrypt operation fails. This practice ensures +// that you use the CMK that you intend. +// +// * To reencrypt the data, you must use the DestinationKeyId parameter specify // the CMK that re-encrypts the data after it is decrypted. You can select // a symmetric or asymmetric CMK. If the destination CMK is an asymmetric // CMK, you must also provide the encryption algorithm. The algorithm that @@ -5076,11 +5599,21 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // with asymmetric keys. The standard format for asymmetric key ciphertext // does not include configurable fields. // -// Unlike other AWS KMS API operations, ReEncrypt callers must have two permissions: +// The CMK that you use for this operation must be in a compatible key state. +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// +// Cross-account use: Yes. The source CMK and destination CMK can be in different +// AWS accounts. Either or both CMKs can be in a different account than the +// caller. +// +// Required permissions: // -// * kms:ReEncryptFrom permission on the source CMK +// * kms:ReEncryptFrom (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// permission on the source CMK (key policy) // -// * kms:ReEncryptTo permission on the destination CMK +// * kms:ReEncryptTo (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// permission on the destination CMK (key policy) // // To permit reencryption from or to a CMK, include the "kms:ReEncrypt*" permission // in your key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html). @@ -5089,9 +5622,15 @@ func (c *KMS) ReEncryptRequest(input *ReEncryptInput) (req *request.Request, out // a CMK programmatically or when you use the PutKeyPolicy operation to set // a key policy. // -// The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) -// in the AWS Key Management Service Developer Guide. +// Related operations: +// +// * Decrypt +// +// * Encrypt +// +// * GenerateDataKey +// +// * GenerateDataKeyPair // // 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 @@ -5182,6 +5721,198 @@ func (c *KMS) ReEncryptWithContext(ctx aws.Context, input *ReEncryptInput, opts return out, req.Send() } +const opReplicateKey = "ReplicateKey" + +// ReplicateKeyRequest generates a "aws/request.Request" representing the +// client's request for the ReplicateKey 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 ReplicateKey for more information on using the ReplicateKey +// 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 ReplicateKeyRequest method. +// req, resp := client.ReplicateKeyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReplicateKey +func (c *KMS) ReplicateKeyRequest(input *ReplicateKeyInput) (req *request.Request, output *ReplicateKeyOutput) { + op := &request.Operation{ + Name: opReplicateKey, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &ReplicateKeyInput{} + } + + output = &ReplicateKeyOutput{} + req = c.newRequest(op, input, output) + return +} + +// ReplicateKey API operation for AWS Key Management Service. +// +// Replicates a multi-Region key into the specified Region. This operation creates +// a multi-Region replica key based on a multi-Region primary key in a different +// Region of the same AWS partition. You can create multiple replicas of a primary +// key, but each must be in a different Region. To create a multi-Region primary +// key, use the CreateKey operation. +// +// This operation supports multi-Region keys, an AWS KMS feature that lets you +// create multiple interoperable CMKs in different AWS Regions. Because these +// CMKs have the same key ID, key material, and other metadata, you can use +// them to encrypt data in one AWS Region and decrypt it in a different AWS +// Region without making a cross-Region call or exposing the plaintext data. +// For more information about multi-Region keys, see Using multi-Region keys +// (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) +// in the AWS Key Management Service Developer Guide. +// +// A replica key is a fully-functional CMK that can be used independently of +// its primary and peer replica keys. A primary key and its replica keys share +// properties that make them interoperable. They have the same key ID (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id) +// and key material. They also have the same key spec (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec), +// key usage (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage), +// key material origin (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin), +// and automatic key rotation status (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html). +// AWS KMS automatically synchronizes these shared properties among related +// multi-Region keys. All other properties of a replica key can differ, including +// its key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html), +// tags (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html), +// aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html), +// and key state (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). +// AWS KMS pricing and quotas for CMKs apply to each primary key and replica +// key. +// +// When this operation completes, the new replica key has a transient key state +// of Creating. This key state changes to Enabled (or PendingImport) after a +// few seconds when the process of creating the new replica key is complete. +// While the key state is Creating, you can manage key, but you cannot yet use +// it in cryptographic operations. If you are creating and using the replica +// key programmatically, retry on KMSInvalidStateException or call DescribeKey +// to check its KeyState value before using it. For details about the Creating +// key state, see Key state: Effect on your CMK (kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// +// The AWS CloudTrail log of a ReplicateKey operation records a ReplicateKey +// operation in the primary key's Region and a CreateKey operation in the replica +// key's Region. +// +// If you replicate a multi-Region primary key with imported key material, the +// replica key is created with no key material. You must import the same key +// material that you imported into the primary key. For details, see Importing +// key material into multi-Region keys (kms/latest/developerguide/multi-region-keys-import.html) +// in the AWS Key Management Service Developer Guide. +// +// To convert a replica key to a primary key, use the UpdatePrimaryRegion operation. +// +// ReplicateKey uses different default values for the KeyPolicy and Tags parameters +// than those used in the AWS KMS console. For details, see the parameter descriptions. +// +// Cross-account use: No. You cannot use this operation to create a CMK in a +// different AWS account. +// +// Required permissions: +// +// * kms:ReplicateKey on the primary CMK (in the primary CMK's Region). Include +// this permission in the primary CMK's key policy. +// +// * kms:CreateKey in an IAM policy in the replica Region. +// +// * To use the Tags parameter, kms:TagResource in an IAM policy in the replica +// Region. +// +// Related operations +// +// * CreateKey +// +// * UpdatePrimaryRegion +// +// 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 AWS Key Management Service's +// API operation ReplicateKey for usage and error information. +// +// Returned Error Types: +// * AlreadyExistsException +// The request was rejected because it attempted to create a resource that already +// exists. +// +// * DisabledException +// The request was rejected because the specified CMK is not enabled. +// +// * InvalidArnException +// The request was rejected because a specified ARN, or an ARN in a key policy, +// is not valid. +// +// * InvalidStateException +// The request was rejected because the state of the specified resource is not +// valid for this request. +// +// For more information about how key state affects the use of a CMK, see How +// Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide . +// +// * InternalException +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// * LimitExceededException +// The request was rejected because a quota was exceeded. For more information, +// see Quotas (https://docs.aws.amazon.com/kms/latest/developerguide/limits.html) +// in the AWS Key Management Service Developer Guide. +// +// * MalformedPolicyDocumentException +// The request was rejected because the specified policy is not syntactically +// or semantically correct. +// +// * NotFoundException +// The request was rejected because the specified entity or resource could not +// be found. +// +// * TagException +// The request was rejected because one or more tags are not valid. +// +// * UnsupportedOperationException +// The request was rejected because a specified parameter is not supported or +// a specified resource is not valid for this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/ReplicateKey +func (c *KMS) ReplicateKey(input *ReplicateKeyInput) (*ReplicateKeyOutput, error) { + req, out := c.ReplicateKeyRequest(input) + return out, req.Send() +} + +// ReplicateKeyWithContext is the same as ReplicateKey with the addition of +// the ability to pass a context and additional request options. +// +// See ReplicateKey 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 *KMS) ReplicateKeyWithContext(ctx aws.Context, input *ReplicateKeyInput, opts ...request.Option) (*ReplicateKeyOutput, error) { + req, out := c.ReplicateKeyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRetireGrant = "RetireGrant" // RetireGrantRequest generates a "aws/request.Request" representing the @@ -5227,22 +5958,39 @@ func (c *KMS) RetireGrantRequest(input *RetireGrantInput) (req *request.Request, // RetireGrant API operation for AWS Key Management Service. // -// Retires a grant. To clean up, you can retire a grant when you're done using -// it. You should revoke a grant when you intend to actively deny operations -// that depend on it. The following are permitted to call this API: +// Deletes a grant. Typically, you retire a grant when you no longer need its +// permissions. To identify the grant to retire, use a grant token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token), +// or both the grant ID and a key identifier (key ID or key ARN) of the customer +// master key (CMK). The CreateGrant operation returns both values. +// +// This operation can be called by the retiring principal for a grant, by the +// grantee principal if the grant allows the RetireGrant operation, and by the +// AWS account (root user) in which the grant is created. It can also be called +// by principals to whom permission for retiring a grant is delegated. For details, +// see Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete) +// in the AWS Key Management Service Developer Guide. +// +// For detailed information about grants, including grant terminology, see Using +// grants (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html) +// in the AWS Key Management Service Developer Guide . For examples of working +// with grants in several programming languages, see Programming grants (https://docs.aws.amazon.com/kms/latest/developerguide/programming-grants.html). +// +// Cross-account use: Yes. You can retire a grant on a CMK in a different AWS +// account. +// +// Required permissions::Permission to retire a grant is determined primarily +// by the grant. For details, see Retiring and revoking grants (https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#grant-delete) +// in the AWS Key Management Service Developer Guide. +// +// Related operations: // -// * The AWS account (root user) under which the grant was created +// * CreateGrant // -// * The RetiringPrincipal, if present in the grant +// * ListGrants // -// * The GranteePrincipal, if RetireGrant is an operation specified in the -// grant +// * ListRetirableGrants // -// You must identify the grant to retire by its grant token or by a combination -// of the grant ID and the Amazon Resource Name (ARN) of the customer master -// key (CMK). A grant token is a unique variable-length base64-encoded string. -// A grant ID is a 64 character unique identifier of a grant. The CreateGrant -// operation returns both. +// * RevokeGrant // // 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 @@ -5349,11 +6097,32 @@ func (c *KMS) RevokeGrantRequest(input *RevokeGrantInput) (req *request.Request, // RevokeGrant API operation for AWS Key Management Service. // -// Revokes the specified grant for the specified customer master key (CMK). -// You can revoke a grant to actively deny operations that depend on it. +// Deletes the specified grant. You revoke a grant to terminate the permissions +// that the grant allows. For more information, see Retiring and revoking grants +// (https://docs.aws.amazon.com/kms/latest/developerguide/managing-grants.html#grant-delete) +// in the AWS Key Management Service Developer Guide . +// +// When you create, retire, or revoke a grant, there might be a brief delay, +// usually less than five minutes, until the grant is available throughout AWS +// KMS. This state is known as eventual consistency. For details, see Eventual +// consistency (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency) +// in the AWS Key Management Service Developer Guide . +// +// Cross-account use: Yes. To perform this operation on a CMK in a different +// AWS account, specify the key ARN in the value of the KeyId parameter. +// +// Required permissions: kms:RevokeGrant (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy). +// +// Related operations: +// +// * CreateGrant // -// To perform this operation on a CMK in a different AWS account, specify the -// key ARN in the value of the KeyId parameter. +// * ListGrants +// +// * ListRetirableGrants +// +// * RetireGrant // // 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 @@ -5456,18 +6225,20 @@ func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req * // ScheduleKeyDeletion API operation for AWS Key Management Service. // -// Schedules the deletion of a customer master key (CMK). You may provide a -// waiting period, specified in days, before deletion occurs. If you do not -// provide a waiting period, the default period of 30 days is used. When this -// operation is successful, the key state of the CMK changes to PendingDeletion. +// Schedules the deletion of a customer master key (CMK). By default, AWS KMS +// applies a waiting period of 30 days, but you can specify a waiting period +// of 7-30 days. When this operation is successful, the key state of the CMK +// changes to PendingDeletion and the key can't be used in any cryptographic +// operations. It remains in this state for the duration of the waiting period. // Before the waiting period ends, you can use CancelKeyDeletion to cancel the -// deletion of the CMK. After the waiting period ends, AWS KMS deletes the CMK -// and all AWS KMS data associated with it, including all aliases that refer -// to it. +// deletion of the CMK. After the waiting period ends, AWS KMS deletes the CMK, +// its key material, and all AWS KMS data associated with it, including all +// aliases that refer to it. // // Deleting a CMK is a destructive and potentially dangerous operation. When // a CMK is deleted, all data that was encrypted under the CMK is unrecoverable. -// To prevent the use of a CMK without deleting it, use DisableKey. +// (The only exception is a multi-Region replica key.) To prevent the use of +// a CMK without deleting it, use DisableKey. // // If you schedule deletion of a CMK from a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html), // when the waiting period expires, ScheduleKeyDeletion deletes the CMK from @@ -5476,16 +6247,36 @@ func (c *KMS) ScheduleKeyDeletionRequest(input *ScheduleKeyDeletionInput) (req * // delete the orphaned key material (https://docs.aws.amazon.com/kms/latest/developerguide/fix-keystore.html#fix-keystore-orphaned-key) // from the cluster and its backups. // -// You cannot perform this operation on a CMK in a different AWS account. +// You can schedule the deletion of a multi-Region primary key and its replica +// keys at any time. However, AWS KMS will not delete a multi-Region primary +// key with existing replica keys. If you schedule the deletion of a primary +// key with replicas, its key state changes to PendingReplicaDeletion and it +// cannot be replicated or used in cryptographic operations. This status can +// continue indefinitely. When the last of its replicas keys is deleted (not +// just scheduled), the key state of the primary key changes to PendingDeletion +// and its waiting period (PendingWindowInDays) begins. For details, see Deleting +// multi-Region keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-delete.html) +// in the AWS Key Management Service Developer Guide. // // For more information about scheduling a CMK for deletion, see Deleting Customer // Master Keys (https://docs.aws.amazon.com/kms/latest/developerguide/deleting-keys.html) // in the AWS Key Management Service Developer Guide. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:ScheduleKeyDeletion (key policy) +// +// Related operations +// +// * CancelKeyDeletion +// +// * DisableKey +// // 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. @@ -5620,9 +6411,17 @@ func (c *KMS) SignRequest(input *SignInput) (req *request.Request, output *SignO // the public key to verify the signature outside of AWS KMS. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:Sign (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: Verify +// // 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. @@ -5743,23 +6542,51 @@ func (c *KMS) TagResourceRequest(input *TagResourceInput) (req *request.Request, // TagResource API operation for AWS Key Management Service. // -// Adds or edits tags for a customer master key (CMK). You cannot perform this -// operation on a CMK in a different AWS account. +// Adds or edits tags on a customer managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). // -// Each tag consists of a tag key and a tag value. Tag keys and tag values are -// both required, but tag values can be empty (null) strings. +// Tagging or untagging a CMK can allow or deny permission to the CMK. For details, +// see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) +// in the AWS Key Management Service Developer Guide. // -// You can only use a tag key once for each CMK. If you use the tag key again, -// AWS KMS replaces the current tag value with the specified value. +// Each tag consists of a tag key and a tag value, both of which are case-sensitive +// strings. The tag value can be an empty (null) string. To add a tag, specify +// a new tag key and a tag value. To edit a tag, specify an existing tag key +// and a new tag value. // -// For information about the rules that apply to tag keys and tag values, see -// User-Defined Tag Restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/allocation-tag-restrictions.html) -// in the AWS Billing and Cost Management User Guide. +// You can use this operation to tag a customer managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk), +// but you cannot tag an AWS managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk), +// an AWS owned CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-owned-cmk), +// a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#keystore-concept), +// or an alias (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#alias-concept). +// +// You can also add tags to a CMK while creating it (CreateKey) or replicating +// it (ReplicateKey). +// +// For information about using tags in AWS KMS, see Tagging keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). +// For general information about tags, including the format and syntax, see +// Tagging AWS resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the Amazon Web Services General Reference. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations +// +// * CreateKey +// +// * ListResourceTags +// +// * ReplicateKey +// +// * UntagResource +// // 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. @@ -5863,16 +6690,43 @@ func (c *KMS) UntagResourceRequest(input *UntagResourceInput) (req *request.Requ // UntagResource API operation for AWS Key Management Service. // -// Removes the specified tags from the specified customer master key (CMK). -// You cannot perform this operation on a CMK in a different AWS account. +// Deletes tags from a customer managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). +// To delete a tag, specify the tag key and the CMK. +// +// Tagging or untagging a CMK can allow or deny permission to the CMK. For details, +// see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) +// in the AWS Key Management Service Developer Guide. +// +// When it succeeds, the UntagResource operation doesn't return any output. +// Also, if the specified tag key isn't found on the CMK, it doesn't throw an +// exception or return a response. To confirm that the operation worked, use +// the ListResourceTags operation. // -// To remove a tag, specify the tag key. To change the tag value of an existing -// tag key, use TagResource. +// For information about using tags in AWS KMS, see Tagging keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). +// For general information about tags, including the format and syntax, see +// Tagging AWS resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) +// in the Amazon Web Services General Reference. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:UntagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations +// +// * CreateKey +// +// * ListResourceTags +// +// * ReplicateKey +// +// * TagResource +// // 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. @@ -5974,8 +6828,11 @@ func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, // Associates an existing AWS KMS alias with a different customer master key // (CMK). Each alias is associated with only one CMK at a time, although a CMK // can have multiple aliases. The alias and the CMK must be in the same AWS -// account and region. You cannot perform this operation on an alias in a different -// AWS account. +// account and Region. +// +// Adding, deleting, or updating an alias can allow or deny permission to the +// CMK. For details, see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) +// in the AWS Key Management Service Developer Guide. // // The current and new CMK must be the same type (both symmetric or both asymmetric), // and they must have the same key usage (ENCRYPT_DECRYPT or SIGN_VERIFY). This @@ -5992,9 +6849,34 @@ func (c *KMS) UpdateAliasRequest(input *UpdateAliasInput) (req *request.Request, // of all CMKs in the account, use the ListAliases operation. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions +// +// * kms:UpdateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the alias (IAM policy). +// +// * kms:UpdateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the current CMK (key policy). +// +// * kms:UpdateAlias (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// on the new CMK (key policy). +// +// For details, see Controlling access to aliases (https://docs.aws.amazon.com/kms/latest/developerguide/kms-alias.html#alias-access) +// in the AWS Key Management Service Developer Guide. +// +// Related operations: +// +// * CreateAlias +// +// * DeleteAlias +// +// * ListAliases +// // 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. @@ -6130,6 +7012,24 @@ func (c *KMS) UpdateCustomKeyStoreRequest(input *UpdateCustomKeyStoreInput) (req // feature in AWS KMS, which combines the convenience and extensive integration // of AWS KMS with the isolation and control of a single-tenant key store. // +// Cross-account use: No. You cannot perform this operation on a custom key +// store in a different AWS account. +// +// Required permissions: kms:UpdateCustomKeyStore (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (IAM policy) +// +// Related operations: +// +// * ConnectCustomKeyStore +// +// * CreateCustomKeyStore +// +// * DeleteCustomKeyStore +// +// * DescribeCustomKeyStores +// +// * DisconnectCustomKeyStore +// // 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. @@ -6298,12 +7198,22 @@ func (c *KMS) UpdateKeyDescriptionRequest(input *UpdateKeyDescriptionInput) (req // Updates the description of a customer master key (CMK). To see the description // of a CMK, use DescribeKey. // -// You cannot perform this operation on a CMK in a different AWS account. -// // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: No. You cannot perform this operation on a CMK in a different +// AWS account. +// +// Required permissions: kms:UpdateKeyDescription (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations +// +// * CreateKey +// +// * DescribeKey +// // 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. @@ -6358,6 +7268,177 @@ func (c *KMS) UpdateKeyDescriptionWithContext(ctx aws.Context, input *UpdateKeyD return out, req.Send() } +const opUpdatePrimaryRegion = "UpdatePrimaryRegion" + +// UpdatePrimaryRegionRequest generates a "aws/request.Request" representing the +// client's request for the UpdatePrimaryRegion 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 UpdatePrimaryRegion for more information on using the UpdatePrimaryRegion +// 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 UpdatePrimaryRegionRequest method. +// req, resp := client.UpdatePrimaryRegionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdatePrimaryRegion +func (c *KMS) UpdatePrimaryRegionRequest(input *UpdatePrimaryRegionInput) (req *request.Request, output *UpdatePrimaryRegionOutput) { + op := &request.Operation{ + Name: opUpdatePrimaryRegion, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &UpdatePrimaryRegionInput{} + } + + output = &UpdatePrimaryRegionOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// UpdatePrimaryRegion API operation for AWS Key Management Service. +// +// Changes the primary key of a multi-Region key. +// +// This operation changes the replica key in the specified Region to a primary +// key and changes the former primary key to a replica key. For example, suppose +// you have a primary key in us-east-1 and a replica key in eu-west-2. If you +// run UpdatePrimaryRegion with a PrimaryRegion value of eu-west-2, the primary +// key is now the key in eu-west-2, and the key in us-east-1 becomes a replica +// key. For details, see +// +// This operation supports multi-Region keys, an AWS KMS feature that lets you +// create multiple interoperable CMKs in different AWS Regions. Because these +// CMKs have the same key ID, key material, and other metadata, you can use +// them to encrypt data in one AWS Region and decrypt it in a different AWS +// Region without making a cross-Region call or exposing the plaintext data. +// For more information about multi-Region keys, see Using multi-Region keys +// (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) +// in the AWS Key Management Service Developer Guide. +// +// The primary key of a multi-Region key is the source for properties that are +// always shared by primary and replica keys, including the key material, key +// ID (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id), +// key spec (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-spec), +// key usage (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-usage), +// key material origin (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-origin), +// and automatic key rotation (https://docs.aws.amazon.com/kms/latest/developerguide/rotate-keys.html). +// It's the only key that can be replicated. You cannot delete the primary key +// (https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html) +// until all replicas are deleted. +// +// The key ID and primary Region that you specify uniquely identify the replica +// key that will become the primary key. The primary Region must already have +// a replica key. This operation does not create a CMK in the specified Region. +// To find the replica keys, use the DescribeKey operation on the primary key +// or any replica key. To create a replica key, use the ReplicateKey operation. +// +// You can run this operation while using the affected multi-Region keys in +// cryptographic operations. This operation should not delay, interrupt, or +// cause failures in cryptographic operations. +// +// Even after this operation completes, the process of updating the primary +// Region might still be in progress for a few more seconds. Operations such +// as DescribeKey might display both the old and new primary keys as replicas. +// The old and new primary keys have a transient key state of Updating. The +// original key state is restored when the update is complete. While the key +// state is Updating, you can use the keys in cryptographic operations, but +// you cannot replicate the new primary key or perform certain management operations, +// such as enabling or disabling these keys. For details about the Updating +// key state, see Key state: Effect on your CMK (kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide. +// +// This operation does not return any output. To verify that primary key is +// changed, use the DescribeKey operation. +// +// Cross-account use: No. You cannot use this operation in a different AWS account. +// +// Required permissions: +// +// * kms:UpdatePrimaryRegion on the current primary CMK (in the primary CMK's +// Region). Include this permission primary CMK's key policy. +// +// * kms:UpdatePrimaryRegion on the current replica CMK (in the replica CMK's +// Region). Include this permission in the replica CMK's key policy. +// +// Related operations +// +// * CreateKey +// +// * ReplicateKey +// +// 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 AWS Key Management Service's +// API operation UpdatePrimaryRegion for usage and error information. +// +// Returned Error Types: +// * DisabledException +// The request was rejected because the specified CMK is not enabled. +// +// * InvalidArnException +// The request was rejected because a specified ARN, or an ARN in a key policy, +// is not valid. +// +// * InvalidStateException +// The request was rejected because the state of the specified resource is not +// valid for this request. +// +// For more information about how key state affects the use of a CMK, see How +// Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// in the AWS Key Management Service Developer Guide . +// +// * InternalException +// The request was rejected because an internal exception occurred. The request +// can be retried. +// +// * NotFoundException +// The request was rejected because the specified entity or resource could not +// be found. +// +// * UnsupportedOperationException +// The request was rejected because a specified parameter is not supported or +// a specified resource is not valid for this operation. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/kms-2014-11-01/UpdatePrimaryRegion +func (c *KMS) UpdatePrimaryRegion(input *UpdatePrimaryRegionInput) (*UpdatePrimaryRegionOutput, error) { + req, out := c.UpdatePrimaryRegionRequest(input) + return out, req.Send() +} + +// UpdatePrimaryRegionWithContext is the same as UpdatePrimaryRegion with the addition of +// the ability to pass a context and additional request options. +// +// See UpdatePrimaryRegion 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 *KMS) UpdatePrimaryRegionWithContext(ctx aws.Context, input *UpdatePrimaryRegionInput, opts ...request.Option) (*UpdatePrimaryRegionOutput, error) { + req, out := c.UpdatePrimaryRegionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opVerify = "Verify" // VerifyRequest generates a "aws/request.Request" representing the @@ -6430,9 +7511,17 @@ func (c *KMS) VerifyRequest(input *VerifyInput) (req *request.Request, output *V // the CMK to verify signatures. // // The CMK that you use for this operation must be in a compatible key state. -// For details, see How Key State Affects Use of a Customer Master Key (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) +// For details, see Key state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) // in the AWS Key Management Service Developer Guide. // +// Cross-account use: Yes. To perform this operation with a CMK in a different +// AWS account, specify the key ARN or alias ARN in the value of the KeyId parameter. +// +// Required permissions: kms:Verify (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) +// (key policy) +// +// Related operations: Sign +// // 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. @@ -6523,7 +7612,15 @@ type AliasListEntry struct { // String that contains the alias. This value begins with alias/. AliasName *string `min:"1" type:"string"` - // String that contains the key identifier referred to by the alias. + // Date and time that the alias was most recently created in the account and + // Region. Formatted as Unix time. + CreationDate *time.Time `type:"timestamp"` + + // Date and time that the alias was most recently associated with a CMK in the + // account and Region. Formatted as Unix time. + LastUpdatedDate *time.Time `type:"timestamp"` + + // String that contains the key identifier of the CMK associated with the alias. TargetKeyId *string `min:"1" type:"string"` } @@ -6549,6 +7646,18 @@ func (s *AliasListEntry) SetAliasName(v string) *AliasListEntry { return s } +// SetCreationDate sets the CreationDate field's value. +func (s *AliasListEntry) SetCreationDate(v time.Time) *AliasListEntry { + s.CreationDate = &v + return s +} + +// SetLastUpdatedDate sets the LastUpdatedDate field's value. +func (s *AliasListEntry) SetLastUpdatedDate(v time.Time) *AliasListEntry { + s.LastUpdatedDate = &v + return s +} + // SetTargetKeyId sets the TargetKeyId field's value. func (s *AliasListEntry) SetTargetKeyId(v string) *AliasListEntry { s.TargetKeyId = &v @@ -6615,10 +7724,9 @@ func (s *AlreadyExistsException) RequestID() string { type CancelKeyDeletionInput struct { _ struct{} `type:"structure"` - // The unique identifier for the customer master key (CMK) for which to cancel - // deletion. + // Identifies the customer master key (CMK) whose deletion is being canceled. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -7081,17 +8189,35 @@ type CreateAliasInput struct { _ struct{} `type:"structure"` // Specifies the alias name. This value must begin with alias/ followed by a - // name, such as alias/ExampleAlias. The alias name cannot begin with alias/aws/. - // The alias/aws/ prefix is reserved for AWS managed CMKs. + // name, such as alias/ExampleAlias. + // + // The AliasName value must be string of 1-256 characters. It can contain only + // alphanumeric characters, forward slashes (/), underscores (_), and dashes + // (-). The alias name cannot begin with alias/aws/. The alias/aws/ prefix is + // reserved for AWS managed CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk). // // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` - // Identifies the CMK to which the alias refers. Specify the key ID or the Amazon - // Resource Name (ARN) of the CMK. You cannot specify another alias. For help - // finding the key ID and ARN, see Finding the Key ID and ARN (https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) + // Associates the alias with the specified customer managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk). + // The CMK must be in the same AWS Region. + // + // A valid CMK ID is required. If you supply a null or empty string value, this + // operation returns an error. + // + // For help finding the key ID and ARN, see Finding the Key ID and ARN (https://docs.aws.amazon.com/kms/latest/developerguide/viewing-keys.html#find-cmk-id-arn) // in the AWS Key Management Service Developer Guide. // + // Specify the key ID or key ARN of the CMK. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // // TargetKeyId is a required field TargetKeyId *string `min:"1" type:"string" required:"true"` } @@ -7285,21 +8411,37 @@ func (s *CreateCustomKeyStoreOutput) SetCustomKeyStoreId(v string) *CreateCustom type CreateGrantInput struct { _ struct{} `type:"structure"` - // Allows a cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) - // only when the encryption context matches or includes the encryption context - // specified in this structure. For more information about encryption context, - // see Encryption Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) - // in the AWS Key Management Service Developer Guide . + // Specifies a grant constraint. + // + // AWS KMS supports the EncryptionContextEquals and EncryptionContextSubset + // grant constraints. Each constraint value can include up to 8 encryption context + // pairs. The encryption context value in each constraint cannot exceed 384 + // characters. + // + // These grant constraints allow a cryptographic operation (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) + // only when the encryption context in the request matches (EncryptionContextEquals) + // or includes (EncryptionContextSubset) the encryption context specified in + // this structure. For more information about encryption context, see Encryption + // Context (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#encrypt_context) + // in the AWS Key Management Service Developer Guide . For information about + // grant constraints, see Using grant constraints (https://docs.aws.amazon.com/kms/latest/developerguide/create-grant-overview.html#grant-constraints) + // in the AWS Key Management Service Developer Guide. + // + // The encryption context grant constraints are supported only on operations + // that include an encryption context. You cannot use an encryption context + // grant constraint for cryptographic operations with asymmetric CMKs or for + // management operations, such as DescribeKey or RetireGrant. Constraints *GrantConstraints `type:"structure"` // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // The principal that is given permission to perform the operations that the - // grant permits. + // The identity that gets the permissions specified in the grant. // // To specify the principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an AWS principal. Valid AWS principals include AWS accounts (root), IAM @@ -7311,11 +8453,11 @@ type CreateGrantInput struct { // GranteePrincipal is a required field GranteePrincipal *string `min:"1" type:"string" required:"true"` - // The unique identifier for the customer master key (CMK) that the grant applies - // to. + // Identifies the customer master key (CMK) for the grant. The grant gives principals + // permission to use this CMK. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. + // Specify the key ID or key ARN of the CMK. To specify a CMK in a different + // AWS account, you must use the key ARN. // // For example: // @@ -7328,8 +8470,8 @@ type CreateGrantInput struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // A friendly name for identifying the grant. Use this value to prevent the - // unintended creation of duplicate grants when retrying this request. + // A friendly name for the grant. Use this value to prevent the unintended creation + // of duplicate grants when retrying this request. // // When this value is absent, all CreateGrant requests result in a new grant // with a unique GrantId even if all the supplied parameters are identical. @@ -7339,11 +8481,18 @@ type CreateGrantInput struct { // parameters; if the grant already exists, the original GrantId is returned // without creating a new grant. Note that the returned grant token is unique // with every CreateGrant request, even when a duplicate GrantId is returned. - // All grant tokens obtained in this way can be used interchangeably. + // All grant tokens for the same grant ID can be used interchangeably. Name *string `min:"1" type:"string"` // A list of operations that the grant permits. // + // The operation must be supported on the CMK. For example, you cannot create + // a grant for a symmetric CMK that allows the Sign operation, or a grant for + // an asymmetric CMK that allows the GenerateDataKey operation. If you try, + // AWS KMS returns a ValidationError exception. For details, see Grant operations + // (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations) + // in the AWS Key Management Service Developer Guide. + // // Operations is a required field Operations []*string `type:"list" required:"true"` @@ -7447,12 +8596,14 @@ type CreateGrantOutput struct { // The unique identifier for the grant. // - // You can use the GrantId in a subsequent RetireGrant or RevokeGrant operation. + // You can use the GrantId in a ListGrants, RetireGrant, or RevokeGrant operation. GrantId *string `min:"1" type:"string"` // The grant token. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantToken *string `min:"1" type:"string"` } @@ -7504,8 +8655,8 @@ type CreateKeyInput struct { // the custom key store must have at least two active HSMs, each in a different // Availability Zone in the Region. // - // This parameter is valid only for symmetric CMKs. You cannot create an asymmetric - // CMK in a custom key store. + // This parameter is valid only for symmetric CMKs and regional CMKs. You cannot + // create an asymmetric CMK or a multi-Region CMK in a custom key store. // // To find the ID of a custom key store, use the DescribeCustomKeyStores operation. // @@ -7554,7 +8705,7 @@ type CreateKeyInput struct { // A description of the CMK. // // Use a description that helps you decide whether the CMK is appropriate for - // a task. + // a task. The default value is an empty string (no description). Description *string `type:"string"` // Determines the cryptographic operations (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations) @@ -7572,22 +8723,43 @@ type CreateKeyInput struct { // * For asymmetric CMKs with ECC key material, specify SIGN_VERIFY. KeyUsage *string `type:"string" enum:"KeyUsageType"` + // Creates a multi-Region primary key that you can replicate into other AWS + // Regions. You cannot change this value after you create the CMK. + // + // For a multi-Region key, set this parameter to True. For a single-Region CMK, + // omit this parameter or set it to False. The default value is False. + // + // This operation supports multi-Region keys, an AWS KMS feature that lets you + // create multiple interoperable CMKs in different AWS Regions. Because these + // CMKs have the same key ID, key material, and other metadata, you can use + // them to encrypt data in one AWS Region and decrypt it in a different AWS + // Region without making a cross-Region call or exposing the plaintext data. + // For more information about multi-Region keys, see Using multi-Region keys + // (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) + // in the AWS Key Management Service Developer Guide. + // + // This value creates a primary key, not a replica. To create a replica key, + // use the ReplicateKey operation. + // + // You can create a symmetric or asymmetric multi-Region CMK, and you can create + // a multi-Region CMK with imported key material. However, you cannot create + // a multi-Region CMK in a custom key store. + MultiRegion *bool `type:"boolean"` + // The source of the key material for the CMK. You cannot change the origin - // after you create the CMK. The default is AWS_KMS, which means AWS KMS creates - // the key material. + // after you create the CMK. The default is AWS_KMS, which means that AWS KMS + // creates the key material. // - // When the parameter value is EXTERNAL, AWS KMS creates a CMK without key material - // so that you can import key material from your existing key management infrastructure. - // For more information about importing key material into AWS KMS, see Importing - // Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) + // To create a CMK with no key material (for imported key material), set the + // value to EXTERNAL. For more information about importing key material into + // AWS KMS, see Importing Key Material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) // in the AWS Key Management Service Developer Guide. This value is valid only // for symmetric CMKs. // - // When the parameter value is AWS_CLOUDHSM, AWS KMS creates the CMK in an AWS - // KMS custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) - // and creates its key material in the associated AWS CloudHSM cluster. You - // must also use the CustomKeyStoreId parameter to identify the custom key store. - // This value is valid only for symmetric CMKs. + // To create a CMK in an AWS KMS custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html) + // and create its key material in the associated AWS CloudHSM cluster, set this + // value to AWS_CLOUDHSM. You must also use the CustomKeyStoreId parameter to + // identify the custom key store. This value is valid only for symmetric CMKs. Origin *string `type:"string" enum:"OriginType"` // The key policy to attach to the CMK. @@ -7615,18 +8787,31 @@ type CreateKeyInput struct { // in the AWS Key Management Service Developer Guide. // // The key policy size quota is 32 kilobytes (32768 bytes). + // + // For help writing and formatting a JSON policy document, see the IAM JSON + // Policy Reference (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies.html) + // in the IAM User Guide . Policy *string `min:"1" type:"string"` - // One or more tags. Each tag consists of a tag key and a tag value. Both the - // tag key and the tag value are required, but the tag value can be an empty - // (null) string. + // Assigns one or more tags to the CMK. Use this parameter to tag the CMK when + // it is created. To tag an existing CMK, use the TagResource operation. + // + // Tagging or untagging a CMK can allow or deny permission to the CMK. For details, + // see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) + // in the AWS Key Management Service Developer Guide. + // + // To use this parameter, you must have kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) + // permission in an IAM policy. // - // When you add tags to an AWS resource, AWS generates a cost allocation report - // with usage and costs aggregated by tags. For information about adding, changing, - // deleting and listing tags for CMKs, see Tagging Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). + // Each tag consists of a tag key and a tag value. Both the tag key and the + // tag value are required, but the tag value can be an empty (null) string. + // You cannot have more than one tag on a CMK with the same tag key. If you + // specify an existing tag key with a different tag value, AWS KMS replaces + // the current tag value with the specified one. // - // Use this parameter to tag the CMK when it is created. To add tags to an existing - // CMK, use the TagResource operation. + // When you assign tags to an AWS resource, AWS generates a cost allocation + // report with usage and costs aggregated by tags. Tags can also be used to + // control access to a CMK. For details, see Tagging Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). Tags []*Tag `type:"list"` } @@ -7696,6 +8881,12 @@ func (s *CreateKeyInput) SetKeyUsage(v string) *CreateKeyInput { return s } +// SetMultiRegion sets the MultiRegion field's value. +func (s *CreateKeyInput) SetMultiRegion(v bool) *CreateKeyInput { + s.MultiRegion = &v + return s +} + // SetOrigin sets the Origin field's value. func (s *CreateKeyInput) SetOrigin(v string) *CreateKeyInput { s.Origin = &v @@ -8171,24 +9362,26 @@ type DecryptInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a newly created grant that has not yet achieved eventual consistency. Use + // a grant token when your permission to call this operation comes from a new + // grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // Specifies the customer master key (CMK) that AWS KMS will use to decrypt - // the ciphertext. Enter a key ID of the CMK that was used to encrypt the ciphertext. - // - // If you specify a KeyId value, the Decrypt operation succeeds only if the - // specified CMK was used to encrypt the ciphertext. + // Specifies the customer master key (CMK) that AWS KMS uses to decrypt the + // ciphertext. Enter a key ID of the CMK that was used to encrypt the ciphertext. // // This parameter is required only when the ciphertext was encrypted under an - // asymmetric CMK. Otherwise, AWS KMS uses the metadata that it adds to the - // ciphertext blob to determine which CMK was used to encrypt the ciphertext. - // However, you can use this parameter to ensure that a particular CMK (of any - // kind) is used to decrypt the ciphertext. + // asymmetric CMK. If you used a symmetric CMK, AWS KMS can get the CMK from + // metadata that it adds to the symmetric ciphertext blob. However, it is always + // recommended as a best practice. This practice ensures that you use the CMK + // that you intend. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -8427,7 +9620,7 @@ type DeleteImportedKeyMaterialInput struct { // Identifies the CMK from which you are deleting imported key material. The // Origin of the CMK must be EXTERNAL. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -8551,7 +9744,7 @@ type DescribeCustomKeyStoresInput struct { // store ID. // // By default, this operation gets information about all custom key stores in - // the account and region. To limit the output to a particular custom key store, + // the account and Region. To limit the output to a particular custom key store, // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter, // but not both. CustomKeyStoreId *string `min:"1" type:"string"` @@ -8560,7 +9753,7 @@ type DescribeCustomKeyStoresInput struct { // name of the custom key store. // // By default, this operation gets information about all custom key stores in - // the account and region. To limit the output to a particular custom key store, + // the account and Region. To limit the output to a particular custom key store, // you can use either the CustomKeyStoreId or CustomKeyStoreName parameter, // but not both. CustomKeyStoreName *string `min:"1" type:"string"` @@ -8682,7 +9875,9 @@ type DescribeKeyInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` @@ -8692,9 +9887,9 @@ type DescribeKeyInput struct { // associates the alias with an AWS managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#master_keys) // and returns its KeyId and Arn in the response. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -8777,9 +9972,9 @@ func (s *DescribeKeyOutput) SetKeyMetadata(v *KeyMetadata) *DescribeKeyOutput { type DisableKeyInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Identifies the customer master key (CMK) to disable. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -8842,12 +10037,12 @@ func (s DisableKeyOutput) GoString() string { type DisableKeyRotationInput struct { _ struct{} `type:"structure"` - // Identifies a symmetric customer master key (CMK). You cannot enable automatic - // rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks), + // Identifies a symmetric customer master key (CMK). You cannot enable or disable + // automatic rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symmetric-asymmetric.html#asymmetric-cmks), // CMKs with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), // or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -9022,9 +10217,9 @@ func (s DisconnectCustomKeyStoreOutput) GoString() string { type EnableKeyInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Identifies the customer master key (CMK) to enable. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -9088,10 +10283,14 @@ type EnableKeyRotationInput struct { _ struct{} `type:"structure"` // Identifies a symmetric customer master key (CMK). You cannot enable automatic - // rotation of asymmetric CMKs, CMKs with imported key material, or CMKs in - // a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). + // rotation of asymmetric CMKs (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#asymmetric-cmks), + // CMKs with imported key material (https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html), + // or CMKs in a custom key store (https://docs.aws.amazon.com/kms/latest/developerguide/custom-key-store-overview.html). + // To enable or disable automatic rotation of a set of related multi-Region + // keys (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html#mrk-replica-key), + // set the property on the primary key. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -9179,15 +10378,17 @@ type EncryptInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` - // A unique identifier for the customer master key (CMK). + // Identifies the customer master key (CMK) to use in the encryption operation. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -9396,15 +10597,17 @@ type GenerateDataKeyInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` // Identifies the symmetric CMK that encrypts the data key. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -9565,7 +10768,9 @@ type GenerateDataKeyPairInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` @@ -9573,9 +10778,9 @@ type GenerateDataKeyPairInput struct { // pair. You cannot specify an asymmetric CMK or a CMK in a custom key store. // To get the type and origin of your CMK, use the DescribeKey operation. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -9743,7 +10948,9 @@ type GenerateDataKeyPairWithoutPlaintextInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` @@ -9752,8 +10959,9 @@ type GenerateDataKeyPairWithoutPlaintextInput struct { // a custom key store. To get the type and origin of your CMK, use the DescribeKey // operation. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -9909,16 +11117,18 @@ type GenerateDataKeyWithoutPlaintextInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` // The identifier of the symmetric customer master key (CMK) that encrypts the // data key. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -10121,9 +11331,9 @@ func (s *GenerateRandomOutput) SetPlaintext(v []byte) *GenerateRandomOutput { type GetKeyPolicyInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Gets the key policy for the specified customer master key (CMK). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -10213,10 +11423,10 @@ func (s *GetKeyPolicyOutput) SetPolicy(v string) *GetKeyPolicyOutput { type GetKeyRotationStatusInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Gets the rotation status for the specified customer master key (CMK). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. + // Specify the key ID or key ARN of the CMK. To specify a CMK in a different + // AWS account, you must use the key ARN. // // For example: // @@ -10291,7 +11501,7 @@ type GetParametersForImportInput struct { // The identifier of the symmetric CMK into which you will import key material. // The Origin of the CMK must be EXTERNAL. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -10433,15 +11643,17 @@ type GetPublicKeyInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` // Identifies the asymmetric CMK that includes the public key. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -10597,7 +11809,7 @@ func (s *GetPublicKeyOutput) SetSigningAlgorithms(v []*string) *GetPublicKeyOutp // a symmetric CMK (https://docs.aws.amazon.com/kms/latest/developerguide/symm-asymm-concepts.html#symmetric-cmks). // Grant constraints are not applied to operations that do not support an encryption // context, such as cryptographic operations with asymmetric CMKs and management -// operations, such as DescribeKey or ScheduleKeyDeletion. +// operations, such as DescribeKey or RetireGrant. // // In a cryptographic operation, the encryption context in the decryption operation // must be an exact, case-sensitive match for the keys and values in the encryption @@ -10786,7 +11998,7 @@ type ImportKeyMaterialInput struct { // The CMK's Origin must be EXTERNAL. This must be the same CMK specified in // the KeyID parameter of the corresponding GetParametersForImport request. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -11776,8 +12988,13 @@ type KeyMetadata struct { // Describes the type of key material in the CMK. CustomerMasterKeySpec *string `type:"string" enum:"CustomerMasterKeySpec"` - // The date and time after which AWS KMS deletes the CMK. This value is present - // only when KeyState is PendingDeletion. + // The date and time after which AWS KMS deletes this CMK. This value is present + // only when the CMK is scheduled for deletion, that is, when its KeyState is + // PendingDeletion. + // + // When the primary key in a multi-Region key is scheduled for deletion but + // still has replica keys, its key state is PendingReplicaDeletion and the length + // of its waiting period is displayed in the PendingDeletionWindowInDays field. DeletionDate *time.Time `type:"timestamp"` // The description of the CMK. @@ -11790,7 +13007,7 @@ type KeyMetadata struct { // The encryption algorithms that the CMK supports. You cannot use the CMK with // other encryption algorithms within AWS KMS. // - // This field appears only when the KeyUsage of the CMK is ENCRYPT_DECRYPT. + // This value is present only when the KeyUsage of the CMK is ENCRYPT_DECRYPT. EncryptionAlgorithms []*string `type:"list"` // Specifies whether the CMK's key material expires. This value is present only @@ -11819,6 +13036,30 @@ type KeyMetadata struct { // for which you can use the CMK. KeyUsage *string `type:"string" enum:"KeyUsageType"` + // Indicates whether the CMK is a multi-Region (True) or regional (False) key. + // This value is True for multi-Region primary and replica CMKs and False for + // regional CMKs. + // + // For more information about multi-Region keys, see Using multi-Region keys + // (https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html) + // in the AWS Key Management Service Developer Guide. + MultiRegion *bool `type:"boolean"` + + // Lists the primary and replica CMKs in same multi-Region CMK. This field is + // present only when the value of the MultiRegion field is True. + // + // For more information about any listed CMK, use the DescribeKey operation. + // + // * MultiRegionKeyType indicates whether the CMK is a PRIMARY or REPLICA + // key. + // + // * PrimaryKey displays the key ARN and Region of the primary key. This + // field displays the current CMK if it is the primary key. + // + // * ReplicaKeys displays the key ARNs and Regions of all replica keys. This + // field includes the current CMK if it is a replica key. + MultiRegionConfiguration *MultiRegionConfiguration `type:"structure"` + // The source of the CMK's key material. When this value is AWS_KMS, AWS KMS // created the key material. When this value is EXTERNAL, the key material was // imported from your existing key management infrastructure or the CMK lacks @@ -11826,6 +13067,21 @@ type KeyMetadata struct { // in the AWS CloudHSM cluster associated with a custom key store. Origin *string `type:"string" enum:"OriginType"` + // The waiting period before the primary key in a multi-Region key is deleted. + // This waiting period begins when the last of its replica keys is deleted. + // This value is present only when the KeyState of the CMK is PendingReplicaDeletion. + // That indicates that the CMK is the primary key in a multi-Region key, it + // is scheduled for deletion, and it still has existing replica keys. + // + // When a regional CMK or a replica key in a multi-Region key is scheduled for + // deletion, its deletion date is displayed in the DeletionDate field. However, + // when the primary key in a multi-Region key is scheduled for deletion, its + // waiting period doesn't begin until all of its replica keys are deleted. This + // value displays that waiting period. When the last replica key in the multi-Region + // key is deleted, the KeyState of the scheduled primary key changes from PendingReplicaDeletion + // to PendingDeletion and the deletion date appears in the DeletionDate field. + PendingDeletionWindowInDays *int64 `min:"1" type:"integer"` + // The signing algorithms that the CMK supports. You cannot use the CMK with // other signing algorithms within AWS KMS. // @@ -11939,12 +13195,30 @@ func (s *KeyMetadata) SetKeyUsage(v string) *KeyMetadata { return s } +// SetMultiRegion sets the MultiRegion field's value. +func (s *KeyMetadata) SetMultiRegion(v bool) *KeyMetadata { + s.MultiRegion = &v + return s +} + +// SetMultiRegionConfiguration sets the MultiRegionConfiguration field's value. +func (s *KeyMetadata) SetMultiRegionConfiguration(v *MultiRegionConfiguration) *KeyMetadata { + s.MultiRegionConfiguration = v + return s +} + // SetOrigin sets the Origin field's value. func (s *KeyMetadata) SetOrigin(v string) *KeyMetadata { s.Origin = &v return s } +// SetPendingDeletionWindowInDays sets the PendingDeletionWindowInDays field's value. +func (s *KeyMetadata) SetPendingDeletionWindowInDays(v int64) *KeyMetadata { + s.PendingDeletionWindowInDays = &v + return s +} + // SetSigningAlgorithms sets the SigningAlgorithms field's value. func (s *KeyMetadata) SetSigningAlgorithms(v []*string) *KeyMetadata { s.SigningAlgorithms = v @@ -12075,12 +13349,21 @@ func (s *LimitExceededException) RequestID() string { type ListAliasesInput struct { _ struct{} `type:"structure"` - // Lists only aliases that refer to the specified CMK. The value of this parameter - // can be the ID or Amazon Resource Name (ARN) of a CMK in the caller's account - // and region. You cannot use an alias name or alias ARN in this value. + // Lists only aliases that are associated with the specified CMK. Enter a CMK + // in your AWS account. // // This parameter is optional. If you omit it, ListAliases returns all aliases - // in the account and region. + // in the account and Region. + // + // Specify the key ID or key ARN of the CMK. + // + // For example: + // + // * Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. KeyId *string `min:"1" type:"string"` // Use this parameter to specify the maximum number of items to return. When @@ -12192,10 +13475,19 @@ func (s *ListAliasesOutput) SetTruncated(v bool) *ListAliasesOutput { type ListGrantsInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Returns only the grant with the specified grant ID. The grant ID uniquely + // identifies the grant. + GrantId *string `min:"1" type:"string"` + + // Returns only grants where the specified principal is the grantee principal + // for the grant. + GranteePrincipal *string `min:"1" type:"string"` + + // Returns only grants for the specified customer master key (CMK). This parameter + // is required. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. + // Specify the key ID or key ARN of the CMK. To specify a CMK in a different + // AWS account, you must use the key ARN. // // For example: // @@ -12235,6 +13527,12 @@ func (s ListGrantsInput) GoString() string { // Validate inspects the fields of the type to determine if they are valid. func (s *ListGrantsInput) Validate() error { invalidParams := request.ErrInvalidParams{Context: "ListGrantsInput"} + if s.GrantId != nil && len(*s.GrantId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GrantId", 1)) + } + if s.GranteePrincipal != nil && len(*s.GranteePrincipal) < 1 { + invalidParams.Add(request.NewErrParamMinLen("GranteePrincipal", 1)) + } if s.KeyId == nil { invalidParams.Add(request.NewErrParamRequired("KeyId")) } @@ -12254,6 +13552,18 @@ func (s *ListGrantsInput) Validate() error { return nil } +// SetGrantId sets the GrantId field's value. +func (s *ListGrantsInput) SetGrantId(v string) *ListGrantsInput { + s.GrantId = &v + return s +} + +// SetGranteePrincipal sets the GranteePrincipal field's value. +func (s *ListGrantsInput) SetGranteePrincipal(v string) *ListGrantsInput { + s.GranteePrincipal = &v + return s +} + // SetKeyId sets the KeyId field's value. func (s *ListGrantsInput) SetKeyId(v string) *ListGrantsInput { s.KeyId = &v @@ -12320,9 +13630,9 @@ func (s *ListGrantsResponse) SetTruncated(v bool) *ListGrantsResponse { type ListKeyPoliciesInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Gets the names of key policies for the specified customer master key (CMK). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -12549,9 +13859,9 @@ func (s *ListKeysOutput) SetTruncated(v bool) *ListKeysOutput { type ListResourceTagsInput struct { _ struct{} `type:"structure"` - // A unique identifier for the customer master key (CMK). + // Gets tags on the specified customer master key (CMK). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -12641,6 +13951,10 @@ type ListResourceTagsOutput struct { NextMarker *string `min:"1" type:"string"` // A list of tags. Each tag consists of a tag key and a tag value. + // + // Tagging or untagging a CMK can allow or deny permission to the CMK. For details, + // see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) + // in the AWS Key Management Service Developer Guide. Tags []*Tag `type:"list"` // A flag that indicates whether there are more items in the list. When this @@ -12694,7 +14008,8 @@ type ListRetirableGrantsInput struct { // you just received. Marker *string `min:"1" type:"string"` - // The retiring principal for which to list grants. + // The retiring principal for which to list grants. Enter a principal in your + // AWS account. // // To specify the retiring principal, use the Amazon Resource Name (ARN) (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) // of an AWS principal. Valid AWS principals include AWS accounts (root), IAM @@ -12809,9 +14124,89 @@ func (s *MalformedPolicyDocumentException) StatusCode() int { return s.RespMetadata.StatusCode } -// RequestID returns the service's response RequestID for request. -func (s *MalformedPolicyDocumentException) RequestID() string { - return s.RespMetadata.RequestID +// RequestID returns the service's response RequestID for request. +func (s *MalformedPolicyDocumentException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Describes the configuration of this multi-Region CMK. This field appears +// only when the CMK is a primary or replica of a multi-Region CMK. +// +// For more information about any listed CMK, use the DescribeKey operation. +type MultiRegionConfiguration struct { + _ struct{} `type:"structure"` + + // Indicates whether the CMK is a PRIMARY or REPLICA key. + MultiRegionKeyType *string `type:"string" enum:"MultiRegionKeyType"` + + // Displays the key ARN and Region of the primary key. This field includes the + // current CMK if it is the primary key. + PrimaryKey *MultiRegionKey `type:"structure"` + + // displays the key ARNs and Regions of all replica keys. This field includes + // the current CMK if it is a replica key. + ReplicaKeys []*MultiRegionKey `type:"list"` +} + +// String returns the string representation +func (s MultiRegionConfiguration) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MultiRegionConfiguration) GoString() string { + return s.String() +} + +// SetMultiRegionKeyType sets the MultiRegionKeyType field's value. +func (s *MultiRegionConfiguration) SetMultiRegionKeyType(v string) *MultiRegionConfiguration { + s.MultiRegionKeyType = &v + return s +} + +// SetPrimaryKey sets the PrimaryKey field's value. +func (s *MultiRegionConfiguration) SetPrimaryKey(v *MultiRegionKey) *MultiRegionConfiguration { + s.PrimaryKey = v + return s +} + +// SetReplicaKeys sets the ReplicaKeys field's value. +func (s *MultiRegionConfiguration) SetReplicaKeys(v []*MultiRegionKey) *MultiRegionConfiguration { + s.ReplicaKeys = v + return s +} + +// Describes the primary or replica key in a multi-Region key. +type MultiRegionKey struct { + _ struct{} `type:"structure"` + + // Displays the key ARN of a primary or replica key of a multi-Region key. + Arn *string `min:"20" type:"string"` + + // Displays the AWS Region of a primary or replica key in a multi-Region key. + Region *string `min:"1" type:"string"` +} + +// String returns the string representation +func (s MultiRegionKey) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s MultiRegionKey) GoString() string { + return s.String() +} + +// SetArn sets the Arn field's value. +func (s *MultiRegionKey) SetArn(v string) *MultiRegionKey { + s.Arn = &v + return s +} + +// SetRegion sets the Region field's value. +func (s *MultiRegionKey) SetRegion(v string) *MultiRegionKey { + s.Region = &v + return s } // The request was rejected because the specified entity or resource could not @@ -12888,9 +14283,9 @@ type PutKeyPolicyInput struct { // The default value is false. BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` - // A unique identifier for the customer master key (CMK). + // Sets the key policy on the specified customer master key (CMK). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -13050,9 +14445,9 @@ type ReEncryptInput struct { // a symmetric or asymmetric CMK with a KeyUsage value of ENCRYPT_DECRYPT. To // find the KeyUsage value of a CMK, use the DescribeKey operation. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -13072,7 +14467,9 @@ type ReEncryptInput struct { // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` @@ -13100,20 +14497,19 @@ type ReEncryptInput struct { // in the AWS Key Management Service Developer Guide. SourceEncryptionContext map[string]*string `type:"map"` - // A unique identifier for the CMK that is used to decrypt the ciphertext before - // it reencrypts it using the destination CMK. + // Specifies the customer master key (CMK) that AWS KMS will use to decrypt + // the ciphertext before it is re-encrypted. Enter a key ID of the CMK that + // was used to encrypt the ciphertext. // // This parameter is required only when the ciphertext was encrypted under an - // asymmetric CMK. Otherwise, AWS KMS uses the metadata that it adds to the - // ciphertext blob to determine which CMK was used to encrypt the ciphertext. - // However, you can use this parameter to ensure that a particular CMK (of any - // kind) is used to decrypt the ciphertext before it is reencrypted. + // asymmetric CMK. If you used a symmetric CMK, AWS KMS can get the CMK from + // metadata that it adds to the symmetric ciphertext blob. However, it is always + // recommended as a best practice. This practice ensures that you use the CMK + // that you intend. // - // If you specify a KeyId value, the decrypt part of the ReEncrypt operation - // succeeds only if the specified CMK was used to encrypt the ciphertext. - // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -13277,19 +14673,272 @@ func (s *ReEncryptOutput) SetSourceKeyId(v string) *ReEncryptOutput { return s } +type ReplicateKeyInput struct { + _ struct{} `type:"structure"` + + // A flag to indicate whether to bypass the key policy lockout safety check. + // + // Setting this value to true increases the risk that the CMK becomes unmanageable. + // Do not set this value to true indiscriminately. + // + // For more information, refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) + // section in the AWS Key Management Service Developer Guide. + // + // Use this parameter only when you intend to prevent the principal that is + // making the request from making a subsequent PutKeyPolicy request on the CMK. + // + // The default value is false. + BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` + + // A description of the CMK. Use a description that helps you decide whether + // the CMK is appropriate for a task. The default value is an empty string (no + // description). + // + // The description is not a shared property of multi-Region keys. You can specify + // the same description or a different description for each key in a set of + // related multi-Region keys. AWS KMS does not synchronize this property. + Description *string `type:"string"` + + // Identifies the multi-Region primary key that is being replicated. To determine + // whether a CMK is a multi-Region primary key, use the DescribeKey operation + // to check the value of the MultiRegionKeyType property. + // + // Specify the key ID or key ARN of a multi-Region primary key. + // + // For example: + // + // * Key ID: mrk-1234abcd12ab34cd56ef1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // + // KeyId is a required field + KeyId *string `min:"1" type:"string" required:"true"` + + // The key policy to attach to the CMK. This parameter is optional. If you do + // not provide a key policy, AWS KMS attaches the default key policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default) + // to the CMK. + // + // The key policy is not a shared property of multi-Region keys. You can specify + // the same key policy or a different key policy for each key in a set of related + // multi-Region keys. AWS KMS does not synchronize this property. + // + // If you provide a key policy, it must meet the following criteria: + // + // * If you don't set BypassPolicyLockoutSafetyCheck to true, the key policy + // must give the caller kms:PutKeyPolicy permission on the replica CMK. This + // reduces the risk that the CMK becomes unmanageable. For more information, + // refer to the scenario in the Default Key Policy (https://docs.aws.amazon.com/kms/latest/developerguide/key-policies.html#key-policy-default-allow-root-enable-iam) + // section of the AWS Key Management Service Developer Guide . + // + // * Each statement in the key policy must contain one or more principals. + // The principals in the key policy must exist and be visible to AWS KMS. + // When you create a new AWS principal (for example, an IAM user or role), + // you might need to enforce a delay before including the new principal in + // a key policy because the new principal might not be immediately visible + // to AWS KMS. For more information, see Changes that I make are not always + // immediately visible (https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency) + // in the AWS Identity and Access Management User Guide. + // + // * The key policy size quota is 32 kilobytes (32768 bytes). + Policy *string `min:"1" type:"string"` + + // The Region ID of the AWS Region for this replica key. + // + // Enter the Region ID, such as us-east-1 or ap-southeast-2. For a list of AWS + // Regions in which AWS KMS is supported, see AWS KMS service endpoints (https://docs.aws.amazon.com/general/latest/gr/kms.html#kms_region) + // in the Amazon Web Services General Reference. + // + // The replica must be in a different AWS Region than its primary key and other + // replicas of that primary key, but in the same AWS partition. AWS KMS must + // be available in the replica Region. If the Region is not enabled by default, + // the AWS account must be enabled in the Region. + // + // For information about AWS partitions, see Amazon Resource Names (ARNs) in + // the Amazon Web Services General Reference. (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // For information about enabling and disabling Regions, see Enabling a Region + // (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable) + // and Disabling a Region (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-disable) + // in the Amazon Web Services General Reference. + // + // ReplicaRegion is a required field + ReplicaRegion *string `min:"1" type:"string" required:"true"` + + // Assigns one or more tags to the replica key. Use this parameter to tag the + // CMK when it is created. To tag an existing CMK, use the TagResource operation. + // + // Tagging or untagging a CMK can allow or deny permission to the CMK. For details, + // see Using ABAC in AWS KMS (https://docs.aws.amazon.com/kms/latest/developerguide/abac.html) + // in the AWS Key Management Service Developer Guide. + // + // To use this parameter, you must have kms:TagResource (https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) + // permission in an IAM policy. + // + // Tags are not a shared property of multi-Region keys. You can specify the + // same tags or different tags for each key in a set of related multi-Region + // keys. AWS KMS does not synchronize this property. + // + // Each tag consists of a tag key and a tag value. Both the tag key and the + // tag value are required, but the tag value can be an empty (null) string. + // You cannot have more than one tag on a CMK with the same tag key. If you + // specify an existing tag key with a different tag value, AWS KMS replaces + // the current tag value with the specified one. + // + // When you assign tags to an AWS resource, AWS generates a cost allocation + // report with usage and costs aggregated by tags. Tags can also be used to + // control access to a CMK. For details, see Tagging Keys (https://docs.aws.amazon.com/kms/latest/developerguide/tagging-keys.html). + Tags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ReplicateKeyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicateKeyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ReplicateKeyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ReplicateKeyInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.Policy != nil && len(*s.Policy) < 1 { + invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) + } + if s.ReplicaRegion == nil { + invalidParams.Add(request.NewErrParamRequired("ReplicaRegion")) + } + if s.ReplicaRegion != nil && len(*s.ReplicaRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("ReplicaRegion", 1)) + } + if s.Tags != nil { + for i, v := range s.Tags { + if v == nil { + continue + } + if err := v.Validate(); err != nil { + invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) + } + } + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value. +func (s *ReplicateKeyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *ReplicateKeyInput { + s.BypassPolicyLockoutSafetyCheck = &v + return s +} + +// SetDescription sets the Description field's value. +func (s *ReplicateKeyInput) SetDescription(v string) *ReplicateKeyInput { + s.Description = &v + return s +} + +// SetKeyId sets the KeyId field's value. +func (s *ReplicateKeyInput) SetKeyId(v string) *ReplicateKeyInput { + s.KeyId = &v + return s +} + +// SetPolicy sets the Policy field's value. +func (s *ReplicateKeyInput) SetPolicy(v string) *ReplicateKeyInput { + s.Policy = &v + return s +} + +// SetReplicaRegion sets the ReplicaRegion field's value. +func (s *ReplicateKeyInput) SetReplicaRegion(v string) *ReplicateKeyInput { + s.ReplicaRegion = &v + return s +} + +// SetTags sets the Tags field's value. +func (s *ReplicateKeyInput) SetTags(v []*Tag) *ReplicateKeyInput { + s.Tags = v + return s +} + +type ReplicateKeyOutput struct { + _ struct{} `type:"structure"` + + // Displays details about the new replica CMK, including its Amazon Resource + // Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) + // and key state (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html). + // It also includes the ARN and AWS Region of its primary key and other replica + // keys. + ReplicaKeyMetadata *KeyMetadata `type:"structure"` + + // The key policy of the new replica key. The value is a key policy document + // in JSON format. + ReplicaPolicy *string `min:"1" type:"string"` + + // The tags on the new replica key. The value is a list of tag key and tag value + // pairs. + ReplicaTags []*Tag `type:"list"` +} + +// String returns the string representation +func (s ReplicateKeyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ReplicateKeyOutput) GoString() string { + return s.String() +} + +// SetReplicaKeyMetadata sets the ReplicaKeyMetadata field's value. +func (s *ReplicateKeyOutput) SetReplicaKeyMetadata(v *KeyMetadata) *ReplicateKeyOutput { + s.ReplicaKeyMetadata = v + return s +} + +// SetReplicaPolicy sets the ReplicaPolicy field's value. +func (s *ReplicateKeyOutput) SetReplicaPolicy(v string) *ReplicateKeyOutput { + s.ReplicaPolicy = &v + return s +} + +// SetReplicaTags sets the ReplicaTags field's value. +func (s *ReplicateKeyOutput) SetReplicaTags(v []*Tag) *ReplicateKeyOutput { + s.ReplicaTags = v + return s +} + type RetireGrantInput struct { _ struct{} `type:"structure"` - // Unique identifier of the grant to retire. The grant ID is returned in the - // response to a CreateGrant operation. + // Identifies the grant to retire. To get the grant ID, use CreateGrant, ListGrants, + // or ListRetirableGrants. // // * Grant ID Example - 0123456789012345678901234567890123456789012345678901234567890123 GrantId *string `min:"1" type:"string"` - // Token that identifies the grant to be retired. + // Identifies the grant to be retired. You can use a grant token to identify + // a new grant even before it has achieved eventual consistency. + // + // Only the CreateGrant operation returns a grant token. For details, see Grant + // token (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#grant_token) + // and Eventual consistency (https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-eventual-consistency) + // in the AWS Key Management Service Developer Guide. GrantToken *string `min:"1" type:"string"` - // The Amazon Resource Name (ARN) of the CMK associated with the grant. + // The key ARN CMK associated with the grant. To find the key ARN, use the ListKeys + // operation. // // For example: arn:aws:kms:us-east-2:444455556666:key/1234abcd-12ab-34cd-56ef-1234567890ab KeyId *string `min:"1" type:"string"` @@ -13359,15 +15008,17 @@ func (s RetireGrantOutput) GoString() string { type RevokeGrantInput struct { _ struct{} `type:"structure"` - // Identifier of the grant to be revoked. + // Identifies the grant to revoke. To get the grant ID, use CreateGrant, ListGrants, + // or ListRetirableGrants. // // GrantId is a required field GrantId *string `min:"1" type:"string" required:"true"` - // A unique identifier for the customer master key associated with the grant. + // A unique identifier for the customer master key (CMK) associated with the + // grant. To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. To specify - // a CMK in a different AWS account, you must use the key ARN. + // Specify the key ID or key ARN of the CMK. To specify a CMK in a different + // AWS account, you must use the key ARN. // // For example: // @@ -13444,7 +15095,7 @@ type ScheduleKeyDeletionInput struct { // The unique identifier of the customer master key (CMK) to delete. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -13460,6 +15111,10 @@ type ScheduleKeyDeletionInput struct { // The waiting period, specified in number of days. After the waiting period // ends, AWS KMS deletes the customer master key (CMK). // + // If the CMK is a multi-Region primary key with replicas, the waiting period + // begins when the last of its replica keys is deleted. Otherwise, the waiting + // period begins immediately. + // // This value is optional. If you include a value, it must be between 7 and // 30, inclusive. If you do not include a value, it defaults to 30. PendingWindowInDays *int64 `min:"1" type:"integer"` @@ -13510,11 +15165,29 @@ type ScheduleKeyDeletionOutput struct { _ struct{} `type:"structure"` // The date and time after which AWS KMS deletes the customer master key (CMK). + // + // If the CMK is a multi-Region primary key with replica keys, this field does + // not appear. The deletion date for the primary key isn't known until its last + // replica key is deleted. DeletionDate *time.Time `type:"timestamp"` // The Amazon Resource Name (key ARN (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-ARN)) // of the CMK whose deletion is scheduled. KeyId *string `min:"1" type:"string"` + + // The current status of the CMK. + // + // For more information about how key state affects the use of a CMK, see Key + // state: Effect on your CMK (https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) + // in the AWS Key Management Service Developer Guide. + KeyState *string `type:"string" enum:"KeyState"` + + // The waiting period before the CMK is deleted. + // + // If the CMK is a multi-Region primary key with replicas, the waiting period + // begins when the last of its replica keys is deleted. Otherwise, the waiting + // period begins immediately. + PendingWindowInDays *int64 `min:"1" type:"integer"` } // String returns the string representation @@ -13539,12 +15212,26 @@ func (s *ScheduleKeyDeletionOutput) SetKeyId(v string) *ScheduleKeyDeletionOutpu return s } +// SetKeyState sets the KeyState field's value. +func (s *ScheduleKeyDeletionOutput) SetKeyState(v string) *ScheduleKeyDeletionOutput { + s.KeyState = &v + return s +} + +// SetPendingWindowInDays sets the PendingWindowInDays field's value. +func (s *ScheduleKeyDeletionOutput) SetPendingWindowInDays(v int64) *ScheduleKeyDeletionOutput { + s.PendingWindowInDays = &v + return s +} + type SignInput struct { _ struct{} `type:"structure"` // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` @@ -13552,9 +15239,9 @@ type SignInput struct { // CMK to sign the message. The KeyUsage type of the CMK must be SIGN_VERIFY. // To find the KeyUsage of a CMK, use the DescribeKey operation. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -13838,9 +15525,9 @@ func (s *TagException) RequestID() string { type TagResourceInput struct { _ struct{} `type:"structure"` - // A unique identifier for the CMK you are tagging. + // Identifies a customer managed CMK in the account and Region. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -13853,7 +15540,14 @@ type TagResourceInput struct { // KeyId is a required field KeyId *string `min:"1" type:"string" required:"true"` - // One or more tags. Each tag consists of a tag key and a tag value. + // One or more tags. + // + // Each tag consists of a tag key and a tag value. The tag value can be an empty + // (null) string. + // + // You cannot have more than one tag on a CMK with the same tag key. If you + // specify an existing tag key with a different tag value, AWS KMS replaces + // the current tag value with the specified one. // // Tags is a required field Tags []*Tag `type:"list" required:"true"` @@ -13984,9 +15678,9 @@ func (s *UnsupportedOperationException) RequestID() string { type UntagResourceInput struct { _ struct{} `type:"structure"` - // A unique identifier for the CMK from which you are removing tags. + // Identifies the CMK from which you are removing tags. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -14070,14 +15764,15 @@ type UpdateAliasInput struct { // AliasName is a required field AliasName *string `min:"1" type:"string" required:"true"` - // Identifies the CMK to associate with the alias. When the update operation - // completes, the alias will point to this CMK. + // Identifies the customer managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#customer-cmk) + // to associate with the alias. You don't have permission to associate an alias + // with an AWS managed CMK (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#aws-managed-cmk). // // The CMK must be in the same AWS account and Region as the alias. Also, the // new target CMK must be the same type as the current target CMK (both symmetric // or both asymmetric) and they must have the same key usage. // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -14267,9 +15962,9 @@ type UpdateKeyDescriptionInput struct { // Description is a required field Description *string `type:"string" required:"true"` - // A unique identifier for the customer master key (CMK). + // Updates the description of the specified customer master key (CMK). // - // Specify the key ID or the Amazon Resource Name (ARN) of the CMK. + // Specify the key ID or key ARN of the CMK. // // For example: // @@ -14338,12 +16033,101 @@ func (s UpdateKeyDescriptionOutput) GoString() string { return s.String() } +type UpdatePrimaryRegionInput struct { + _ struct{} `type:"structure"` + + // Identifies the current primary key. When the operation completes, this CMK + // will be a replica key. + // + // Specify the key ID or key ARN of a multi-Region primary key. + // + // For example: + // + // * Key ID: mrk-1234abcd12ab34cd56ef1234567890ab + // + // * Key ARN: arn:aws:kms:us-east-2:111122223333:key/mrk-1234abcd12ab34cd56ef1234567890ab + // + // To get the key ID and key ARN for a CMK, use ListKeys or DescribeKey. + // + // KeyId is a required field + KeyId *string `min:"1" type:"string" required:"true"` + + // The AWS Region of the new primary key. Enter the Region ID, such as us-east-1 + // or ap-southeast-2. There must be an existing replica key in this Region. + // + // When the operation completes, the multi-Region key in this Region will be + // the primary key. + // + // PrimaryRegion is a required field + PrimaryRegion *string `min:"1" type:"string" required:"true"` +} + +// String returns the string representation +func (s UpdatePrimaryRegionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePrimaryRegionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *UpdatePrimaryRegionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "UpdatePrimaryRegionInput"} + if s.KeyId == nil { + invalidParams.Add(request.NewErrParamRequired("KeyId")) + } + if s.KeyId != nil && len(*s.KeyId) < 1 { + invalidParams.Add(request.NewErrParamMinLen("KeyId", 1)) + } + if s.PrimaryRegion == nil { + invalidParams.Add(request.NewErrParamRequired("PrimaryRegion")) + } + if s.PrimaryRegion != nil && len(*s.PrimaryRegion) < 1 { + invalidParams.Add(request.NewErrParamMinLen("PrimaryRegion", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetKeyId sets the KeyId field's value. +func (s *UpdatePrimaryRegionInput) SetKeyId(v string) *UpdatePrimaryRegionInput { + s.KeyId = &v + return s +} + +// SetPrimaryRegion sets the PrimaryRegion field's value. +func (s *UpdatePrimaryRegionInput) SetPrimaryRegion(v string) *UpdatePrimaryRegionInput { + s.PrimaryRegion = &v + return s +} + +type UpdatePrimaryRegionOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s UpdatePrimaryRegionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UpdatePrimaryRegionOutput) GoString() string { + return s.String() +} + type VerifyInput struct { _ struct{} `type:"structure"` // A list of grant tokens. // - // For more information, see Grant Tokens (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) + // Use a grant token when your permission to call this operation comes from + // a new grant that has not yet achieved eventual consistency. For more information, + // see Grant token (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token) // in the AWS Key Management Service Developer Guide. GrantTokens []*string `type:"list"` @@ -14351,9 +16135,9 @@ type VerifyInput struct { // This must be the same CMK that was used to generate the signature. If you // specify a different CMK, the signature verification fails. // - // To specify a CMK, use its key ID, Amazon Resource Name (ARN), alias name, - // or alias ARN. When using an alias name, prefix it with "alias/". To specify - // a CMK in a different AWS account, you must use the key ARN or alias ARN. + // To specify a CMK, use its key ID, key ARN, alias name, or alias ARN. When + // using an alias name, prefix it with "alias/". To specify a CMK in a different + // AWS account, you must use the key ARN or alias ARN. // // For example: // @@ -14830,6 +16614,9 @@ func KeyManagerType_Values() []string { } const ( + // KeyStateCreating is a KeyState enum value + KeyStateCreating = "Creating" + // KeyStateEnabled is a KeyState enum value KeyStateEnabled = "Enabled" @@ -14842,18 +16629,27 @@ const ( // KeyStatePendingImport is a KeyState enum value KeyStatePendingImport = "PendingImport" + // KeyStatePendingReplicaDeletion is a KeyState enum value + KeyStatePendingReplicaDeletion = "PendingReplicaDeletion" + // KeyStateUnavailable is a KeyState enum value KeyStateUnavailable = "Unavailable" + + // KeyStateUpdating is a KeyState enum value + KeyStateUpdating = "Updating" ) // KeyState_Values returns all elements of the KeyState enum func KeyState_Values() []string { return []string{ + KeyStateCreating, KeyStateEnabled, KeyStateDisabled, KeyStatePendingDeletion, KeyStatePendingImport, + KeyStatePendingReplicaDeletion, KeyStateUnavailable, + KeyStateUpdating, } } @@ -14889,6 +16685,22 @@ func MessageType_Values() []string { } } +const ( + // MultiRegionKeyTypePrimary is a MultiRegionKeyType enum value + MultiRegionKeyTypePrimary = "PRIMARY" + + // MultiRegionKeyTypeReplica is a MultiRegionKeyType enum value + MultiRegionKeyTypeReplica = "REPLICA" +) + +// MultiRegionKeyType_Values returns all elements of the MultiRegionKeyType enum +func MultiRegionKeyType_Values() []string { + return []string{ + MultiRegionKeyTypePrimary, + MultiRegionKeyTypeReplica, + } +} + const ( // OriginTypeAwsKms is a OriginType enum value OriginTypeAwsKms = "AWS_KMS" diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/api.go b/vendor/github.com/aws/aws-sdk-go/service/sso/api.go new file mode 100644 index 0000000000..4498f285e4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sso/api.go @@ -0,0 +1,1210 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sso + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/credentials" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +const opGetRoleCredentials = "GetRoleCredentials" + +// GetRoleCredentialsRequest generates a "aws/request.Request" representing the +// client's request for the GetRoleCredentials 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 GetRoleCredentials for more information on using the GetRoleCredentials +// 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 GetRoleCredentialsRequest method. +// req, resp := client.GetRoleCredentialsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials +func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) { + op := &request.Operation{ + Name: opGetRoleCredentials, + HTTPMethod: "GET", + HTTPPath: "/federation/credentials", + } + + if input == nil { + input = &GetRoleCredentialsInput{} + } + + output = &GetRoleCredentialsOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + return +} + +// GetRoleCredentials API operation for AWS Single Sign-On. +// +// Returns the STS short-term credentials for a given role name that is assigned +// to the user. +// +// 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 AWS Single Sign-On's +// API operation GetRoleCredentials for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// Indicates that a problem occurred with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// * UnauthorizedException +// Indicates that the request is not authorized. This can happen due to an invalid +// access token in the request. +// +// * TooManyRequestsException +// Indicates that the request is being made too frequently and is more than +// what the server can handle. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials +func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) { + req, out := c.GetRoleCredentialsRequest(input) + return out, req.Send() +} + +// GetRoleCredentialsWithContext is the same as GetRoleCredentials with the addition of +// the ability to pass a context and additional request options. +// +// See GetRoleCredentials 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 *SSO) GetRoleCredentialsWithContext(ctx aws.Context, input *GetRoleCredentialsInput, opts ...request.Option) (*GetRoleCredentialsOutput, error) { + req, out := c.GetRoleCredentialsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListAccountRoles = "ListAccountRoles" + +// ListAccountRolesRequest generates a "aws/request.Request" representing the +// client's request for the ListAccountRoles 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 ListAccountRoles for more information on using the ListAccountRoles +// 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 ListAccountRolesRequest method. +// req, resp := client.ListAccountRolesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles +func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) { + op := &request.Operation{ + Name: opListAccountRoles, + HTTPMethod: "GET", + HTTPPath: "/assignment/roles", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListAccountRolesInput{} + } + + output = &ListAccountRolesOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + return +} + +// ListAccountRoles API operation for AWS Single Sign-On. +// +// Lists all roles that are assigned to the user for a given AWS account. +// +// 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 AWS Single Sign-On's +// API operation ListAccountRoles for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// Indicates that a problem occurred with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// * UnauthorizedException +// Indicates that the request is not authorized. This can happen due to an invalid +// access token in the request. +// +// * TooManyRequestsException +// Indicates that the request is being made too frequently and is more than +// what the server can handle. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles +func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) { + req, out := c.ListAccountRolesRequest(input) + return out, req.Send() +} + +// ListAccountRolesWithContext is the same as ListAccountRoles with the addition of +// the ability to pass a context and additional request options. +// +// See ListAccountRoles 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 *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRolesInput, opts ...request.Option) (*ListAccountRolesOutput, error) { + req, out := c.ListAccountRolesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListAccountRolesPages iterates over the pages of a ListAccountRoles operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListAccountRoles 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 ListAccountRoles operation. +// pageNum := 0 +// err := client.ListAccountRolesPages(params, +// func(page *sso.ListAccountRolesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error { + return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListAccountRolesPagesWithContext same as ListAccountRolesPages 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 *SSO) ListAccountRolesPagesWithContext(ctx aws.Context, input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAccountRolesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAccountRolesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListAccountRolesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListAccounts = "ListAccounts" + +// ListAccountsRequest generates a "aws/request.Request" representing the +// client's request for the ListAccounts 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 ListAccounts for more information on using the ListAccounts +// 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 ListAccountsRequest method. +// req, resp := client.ListAccountsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts +func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) { + op := &request.Operation{ + Name: opListAccounts, + HTTPMethod: "GET", + HTTPPath: "/assignment/accounts", + Paginator: &request.Paginator{ + InputTokens: []string{"nextToken"}, + OutputTokens: []string{"nextToken"}, + LimitToken: "maxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListAccountsInput{} + } + + output = &ListAccountsOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + return +} + +// ListAccounts API operation for AWS Single Sign-On. +// +// Lists all AWS accounts assigned to the user. These AWS accounts are assigned +// by the administrator of the account. For more information, see Assign User +// Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers) +// in the AWS SSO User Guide. This operation returns a paginated response. +// +// 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 AWS Single Sign-On's +// API operation ListAccounts for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// Indicates that a problem occurred with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// * UnauthorizedException +// Indicates that the request is not authorized. This can happen due to an invalid +// access token in the request. +// +// * TooManyRequestsException +// Indicates that the request is being made too frequently and is more than +// what the server can handle. +// +// * ResourceNotFoundException +// The specified resource doesn't exist. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts +func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) { + req, out := c.ListAccountsRequest(input) + return out, req.Send() +} + +// ListAccountsWithContext is the same as ListAccounts with the addition of +// the ability to pass a context and additional request options. +// +// See ListAccounts 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 *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) { + req, out := c.ListAccountsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListAccountsPages iterates over the pages of a ListAccounts operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListAccounts 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 ListAccounts operation. +// pageNum := 0 +// err := client.ListAccountsPages(params, +// func(page *sso.ListAccountsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error { + return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListAccountsPagesWithContext same as ListAccountsPages 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 *SSO) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListAccountsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListAccountsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opLogout = "Logout" + +// LogoutRequest generates a "aws/request.Request" representing the +// client's request for the Logout 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 Logout for more information on using the Logout +// 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 LogoutRequest method. +// req, resp := client.LogoutRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout +func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) { + op := &request.Operation{ + Name: opLogout, + HTTPMethod: "POST", + HTTPPath: "/logout", + } + + if input == nil { + input = &LogoutInput{} + } + + output = &LogoutOutput{} + req = c.newRequest(op, input, output) + req.Config.Credentials = credentials.AnonymousCredentials + req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// Logout API operation for AWS Single Sign-On. +// +// Removes the client- and server-side session that is associated with the user. +// +// 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 AWS Single Sign-On's +// API operation Logout for usage and error information. +// +// Returned Error Types: +// * InvalidRequestException +// Indicates that a problem occurred with the input to the request. For example, +// a required parameter might be missing or out of range. +// +// * UnauthorizedException +// Indicates that the request is not authorized. This can happen due to an invalid +// access token in the request. +// +// * TooManyRequestsException +// Indicates that the request is being made too frequently and is more than +// what the server can handle. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout +func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) { + req, out := c.LogoutRequest(input) + return out, req.Send() +} + +// LogoutWithContext is the same as Logout with the addition of +// the ability to pass a context and additional request options. +// +// See Logout 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 *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...request.Option) (*LogoutOutput, error) { + req, out := c.LogoutRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// Provides information about your AWS account. +type AccountInfo struct { + _ struct{} `type:"structure"` + + // The identifier of the AWS account that is assigned to the user. + AccountId *string `locationName:"accountId" type:"string"` + + // The display name of the AWS account that is assigned to the user. + AccountName *string `locationName:"accountName" type:"string"` + + // The email address of the AWS account that is assigned to the user. + EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"` +} + +// String returns the string representation +func (s AccountInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AccountInfo) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *AccountInfo) SetAccountId(v string) *AccountInfo { + s.AccountId = &v + return s +} + +// SetAccountName sets the AccountName field's value. +func (s *AccountInfo) SetAccountName(v string) *AccountInfo { + s.AccountName = &v + return s +} + +// SetEmailAddress sets the EmailAddress field's value. +func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo { + s.EmailAddress = &v + return s +} + +type GetRoleCredentialsInput struct { + _ struct{} `type:"structure"` + + // The token issued by the CreateToken API call. For more information, see CreateToken + // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) + // in the AWS SSO OIDC API Reference Guide. + // + // AccessToken is a required field + AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` + + // The identifier for the AWS account that is assigned to the user. + // + // AccountId is a required field + AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"` + + // The friendly name of the role that is assigned to the user. + // + // RoleName is a required field + RoleName *string `location:"querystring" locationName:"role_name" type:"string" required:"true"` +} + +// String returns the string representation +func (s GetRoleCredentialsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRoleCredentialsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetRoleCredentialsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetRoleCredentialsInput"} + if s.AccessToken == nil { + invalidParams.Add(request.NewErrParamRequired("AccessToken")) + } + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.RoleName == nil { + invalidParams.Add(request.NewErrParamRequired("RoleName")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessToken sets the AccessToken field's value. +func (s *GetRoleCredentialsInput) SetAccessToken(v string) *GetRoleCredentialsInput { + s.AccessToken = &v + return s +} + +// SetAccountId sets the AccountId field's value. +func (s *GetRoleCredentialsInput) SetAccountId(v string) *GetRoleCredentialsInput { + s.AccountId = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *GetRoleCredentialsInput) SetRoleName(v string) *GetRoleCredentialsInput { + s.RoleName = &v + return s +} + +type GetRoleCredentialsOutput struct { + _ struct{} `type:"structure"` + + // The credentials for the role that is assigned to the user. + RoleCredentials *RoleCredentials `locationName:"roleCredentials" type:"structure"` +} + +// String returns the string representation +func (s GetRoleCredentialsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetRoleCredentialsOutput) GoString() string { + return s.String() +} + +// SetRoleCredentials sets the RoleCredentials field's value. +func (s *GetRoleCredentialsOutput) SetRoleCredentials(v *RoleCredentials) *GetRoleCredentialsOutput { + s.RoleCredentials = v + return s +} + +// Indicates that a problem occurred with the input to the request. For example, +// a required parameter might be missing or out of range. +type InvalidRequestException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s InvalidRequestException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s InvalidRequestException) GoString() string { + return s.String() +} + +func newErrorInvalidRequestException(v protocol.ResponseMetadata) error { + return &InvalidRequestException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InvalidRequestException) Code() string { + return "InvalidRequestException" +} + +// Message returns the exception's message. +func (s *InvalidRequestException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InvalidRequestException) OrigErr() error { + return nil +} + +func (s *InvalidRequestException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InvalidRequestException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InvalidRequestException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListAccountRolesInput struct { + _ struct{} `type:"structure"` + + // The token issued by the CreateToken API call. For more information, see CreateToken + // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) + // in the AWS SSO OIDC API Reference Guide. + // + // AccessToken is a required field + AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` + + // The identifier for the AWS account that is assigned to the user. + // + // AccountId is a required field + AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"` + + // The number of items that clients can request per page. + MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"` + + // The page token from the previous response output when you request subsequent + // pages. + NextToken *string `location:"querystring" locationName:"next_token" type:"string"` +} + +// String returns the string representation +func (s ListAccountRolesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAccountRolesInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAccountRolesInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAccountRolesInput"} + if s.AccessToken == nil { + invalidParams.Add(request.NewErrParamRequired("AccessToken")) + } + if s.AccountId == nil { + invalidParams.Add(request.NewErrParamRequired("AccountId")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessToken sets the AccessToken field's value. +func (s *ListAccountRolesInput) SetAccessToken(v string) *ListAccountRolesInput { + s.AccessToken = &v + return s +} + +// SetAccountId sets the AccountId field's value. +func (s *ListAccountRolesInput) SetAccountId(v string) *ListAccountRolesInput { + s.AccountId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAccountRolesInput) SetMaxResults(v int64) *ListAccountRolesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAccountRolesInput) SetNextToken(v string) *ListAccountRolesInput { + s.NextToken = &v + return s +} + +type ListAccountRolesOutput struct { + _ struct{} `type:"structure"` + + // The page token client that is used to retrieve the list of accounts. + NextToken *string `locationName:"nextToken" type:"string"` + + // A paginated response with the list of roles and the next token if more results + // are available. + RoleList []*RoleInfo `locationName:"roleList" type:"list"` +} + +// String returns the string representation +func (s ListAccountRolesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAccountRolesOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAccountRolesOutput) SetNextToken(v string) *ListAccountRolesOutput { + s.NextToken = &v + return s +} + +// SetRoleList sets the RoleList field's value. +func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOutput { + s.RoleList = v + return s +} + +type ListAccountsInput struct { + _ struct{} `type:"structure"` + + // The token issued by the CreateToken API call. For more information, see CreateToken + // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) + // in the AWS SSO OIDC API Reference Guide. + // + // AccessToken is a required field + AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` + + // This is the number of items clients can request per page. + MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"` + + // (Optional) When requesting subsequent pages, this is the page token from + // the previous response output. + NextToken *string `location:"querystring" locationName:"next_token" type:"string"` +} + +// String returns the string representation +func (s ListAccountsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAccountsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListAccountsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"} + if s.AccessToken == nil { + invalidParams.Add(request.NewErrParamRequired("AccessToken")) + } + if s.MaxResults != nil && *s.MaxResults < 1 { + invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessToken sets the AccessToken field's value. +func (s *ListAccountsInput) SetAccessToken(v string) *ListAccountsInput { + s.AccessToken = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput { + s.NextToken = &v + return s +} + +type ListAccountsOutput struct { + _ struct{} `type:"structure"` + + // A paginated response with the list of account information and the next token + // if more results are available. + AccountList []*AccountInfo `locationName:"accountList" type:"list"` + + // The page token client that is used to retrieve the list of accounts. + NextToken *string `locationName:"nextToken" type:"string"` +} + +// String returns the string representation +func (s ListAccountsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ListAccountsOutput) GoString() string { + return s.String() +} + +// SetAccountList sets the AccountList field's value. +func (s *ListAccountsOutput) SetAccountList(v []*AccountInfo) *ListAccountsOutput { + s.AccountList = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput { + s.NextToken = &v + return s +} + +type LogoutInput struct { + _ struct{} `type:"structure"` + + // The token issued by the CreateToken API call. For more information, see CreateToken + // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html) + // in the AWS SSO OIDC API Reference Guide. + // + // AccessToken is a required field + AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"` +} + +// String returns the string representation +func (s LogoutInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogoutInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *LogoutInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "LogoutInput"} + if s.AccessToken == nil { + invalidParams.Add(request.NewErrParamRequired("AccessToken")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAccessToken sets the AccessToken field's value. +func (s *LogoutInput) SetAccessToken(v string) *LogoutInput { + s.AccessToken = &v + return s +} + +type LogoutOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s LogoutOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s LogoutOutput) GoString() string { + return s.String() +} + +// The specified resource doesn't exist. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Provides information about the role credentials that are assigned to the +// user. +type RoleCredentials struct { + _ struct{} `type:"structure"` + + // The identifier used for the temporary security credentials. For more information, + // see Using Temporary Security Credentials to Request Access to AWS Resources + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) + // in the AWS IAM User Guide. + AccessKeyId *string `locationName:"accessKeyId" type:"string"` + + // The date on which temporary security credentials expire. + Expiration *int64 `locationName:"expiration" type:"long"` + + // The key that is used to sign the request. For more information, see Using + // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) + // in the AWS IAM User Guide. + SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"` + + // The token used for temporary credentials. For more information, see Using + // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html) + // in the AWS IAM User Guide. + SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"` +} + +// String returns the string representation +func (s RoleCredentials) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RoleCredentials) GoString() string { + return s.String() +} + +// SetAccessKeyId sets the AccessKeyId field's value. +func (s *RoleCredentials) SetAccessKeyId(v string) *RoleCredentials { + s.AccessKeyId = &v + return s +} + +// SetExpiration sets the Expiration field's value. +func (s *RoleCredentials) SetExpiration(v int64) *RoleCredentials { + s.Expiration = &v + return s +} + +// SetSecretAccessKey sets the SecretAccessKey field's value. +func (s *RoleCredentials) SetSecretAccessKey(v string) *RoleCredentials { + s.SecretAccessKey = &v + return s +} + +// SetSessionToken sets the SessionToken field's value. +func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials { + s.SessionToken = &v + return s +} + +// Provides information about the role that is assigned to the user. +type RoleInfo struct { + _ struct{} `type:"structure"` + + // The identifier of the AWS account assigned to the user. + AccountId *string `locationName:"accountId" type:"string"` + + // The friendly name of the role that is assigned to the user. + RoleName *string `locationName:"roleName" type:"string"` +} + +// String returns the string representation +func (s RoleInfo) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RoleInfo) GoString() string { + return s.String() +} + +// SetAccountId sets the AccountId field's value. +func (s *RoleInfo) SetAccountId(v string) *RoleInfo { + s.AccountId = &v + return s +} + +// SetRoleName sets the RoleName field's value. +func (s *RoleInfo) SetRoleName(v string) *RoleInfo { + s.RoleName = &v + return s +} + +// Indicates that the request is being made too frequently and is more than +// what the server can handle. +type TooManyRequestsException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s TooManyRequestsException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s TooManyRequestsException) GoString() string { + return s.String() +} + +func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { + return &TooManyRequestsException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *TooManyRequestsException) Code() string { + return "TooManyRequestsException" +} + +// Message returns the exception's message. +func (s *TooManyRequestsException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *TooManyRequestsException) OrigErr() error { + return nil +} + +func (s *TooManyRequestsException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *TooManyRequestsException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *TooManyRequestsException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Indicates that the request is not authorized. This can happen due to an invalid +// access token in the request. +type UnauthorizedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation +func (s UnauthorizedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s UnauthorizedException) GoString() string { + return s.String() +} + +func newErrorUnauthorizedException(v protocol.ResponseMetadata) error { + return &UnauthorizedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *UnauthorizedException) Code() string { + return "UnauthorizedException" +} + +// Message returns the exception's message. +func (s *UnauthorizedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *UnauthorizedException) OrigErr() error { + return nil +} + +func (s *UnauthorizedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *UnauthorizedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *UnauthorizedException) RequestID() string { + return s.RespMetadata.RequestID +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go new file mode 100644 index 0000000000..92d82b2afb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sso/doc.go @@ -0,0 +1,44 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package sso provides the client and types for making API +// requests to AWS Single Sign-On. +// +// AWS Single Sign-On Portal is a web service that makes it easy for you to +// assign user access to AWS SSO resources such as the user portal. Users can +// get AWS account applications and roles assigned to them and get federated +// into the application. +// +// For general information about AWS SSO, see What is AWS Single Sign-On? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) +// in the AWS SSO User Guide. +// +// This API reference guide describes the AWS SSO Portal operations that you +// can call programatically and includes detailed information on data types +// and errors. +// +// AWS provides SDKs that consist of libraries and sample code for various programming +// languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs +// provide a convenient way to create programmatic access to AWS SSO and other +// AWS services. For more information about the AWS SDKs, including how to download +// and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/). +// +// See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service. +// +// See sso package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/ +// +// Using the Client +// +// To contact AWS Single Sign-On with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS Single Sign-On client SSO for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/sso/#New +package sso diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go new file mode 100644 index 0000000000..77a6792e35 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sso/errors.go @@ -0,0 +1,44 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sso + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeInvalidRequestException for service response error code + // "InvalidRequestException". + // + // Indicates that a problem occurred with the input to the request. For example, + // a required parameter might be missing or out of range. + ErrCodeInvalidRequestException = "InvalidRequestException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The specified resource doesn't exist. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeTooManyRequestsException for service response error code + // "TooManyRequestsException". + // + // Indicates that the request is being made too frequently and is more than + // what the server can handle. + ErrCodeTooManyRequestsException = "TooManyRequestsException" + + // ErrCodeUnauthorizedException for service response error code + // "UnauthorizedException". + // + // Indicates that the request is not authorized. This can happen due to an invalid + // access token in the request. + ErrCodeUnauthorizedException = "UnauthorizedException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "InvalidRequestException": newErrorInvalidRequestException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "TooManyRequestsException": newErrorTooManyRequestsException, + "UnauthorizedException": newErrorUnauthorizedException, +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/service.go b/vendor/github.com/aws/aws-sdk-go/service/sso/service.go new file mode 100644 index 0000000000..35175331fc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sso/service.go @@ -0,0 +1,104 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package sso + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// SSO provides the API operation methods for making requests to +// AWS Single Sign-On. See this package's package overview docs +// for details on the service. +// +// SSO methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type SSO struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "SSO" // Name of service. + EndpointsID = "portal.sso" // ID to lookup a service endpoint with. + ServiceID = "SSO" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the SSO client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// mySession := session.Must(session.NewSession()) +// +// // Create a SSO client from just a session. +// svc := sso.New(mySession) +// +// // Create a SSO client with additional configuration +// svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "awsssoportal" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName string) *SSO { + svc := &SSO{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2019-06-10", + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a SSO operation and runs any +// custom request initialization. +func (c *SSO) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go b/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go new file mode 100644 index 0000000000..4cac247c18 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go/service/sso/ssoiface/interface.go @@ -0,0 +1,86 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package ssoiface provides an interface to enable mocking the AWS Single Sign-On service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package ssoiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/sso" +) + +// SSOAPI provides an interface to enable mocking the +// sso.SSO service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // AWS Single Sign-On. +// func myFunc(svc ssoiface.SSOAPI) bool { +// // Make svc.GetRoleCredentials request +// } +// +// func main() { +// sess := session.New() +// svc := sso.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockSSOClient struct { +// ssoiface.SSOAPI +// } +// func (m *mockSSOClient) GetRoleCredentials(input *sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockSSOClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type SSOAPI interface { + GetRoleCredentials(*sso.GetRoleCredentialsInput) (*sso.GetRoleCredentialsOutput, error) + GetRoleCredentialsWithContext(aws.Context, *sso.GetRoleCredentialsInput, ...request.Option) (*sso.GetRoleCredentialsOutput, error) + GetRoleCredentialsRequest(*sso.GetRoleCredentialsInput) (*request.Request, *sso.GetRoleCredentialsOutput) + + ListAccountRoles(*sso.ListAccountRolesInput) (*sso.ListAccountRolesOutput, error) + ListAccountRolesWithContext(aws.Context, *sso.ListAccountRolesInput, ...request.Option) (*sso.ListAccountRolesOutput, error) + ListAccountRolesRequest(*sso.ListAccountRolesInput) (*request.Request, *sso.ListAccountRolesOutput) + + ListAccountRolesPages(*sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool) error + ListAccountRolesPagesWithContext(aws.Context, *sso.ListAccountRolesInput, func(*sso.ListAccountRolesOutput, bool) bool, ...request.Option) error + + ListAccounts(*sso.ListAccountsInput) (*sso.ListAccountsOutput, error) + ListAccountsWithContext(aws.Context, *sso.ListAccountsInput, ...request.Option) (*sso.ListAccountsOutput, error) + ListAccountsRequest(*sso.ListAccountsInput) (*request.Request, *sso.ListAccountsOutput) + + ListAccountsPages(*sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool) error + ListAccountsPagesWithContext(aws.Context, *sso.ListAccountsInput, func(*sso.ListAccountsOutput, bool) bool, ...request.Option) error + + Logout(*sso.LogoutInput) (*sso.LogoutOutput, error) + LogoutWithContext(aws.Context, *sso.LogoutInput, ...request.Option) (*sso.LogoutOutput, error) + LogoutRequest(*sso.LogoutInput) (*request.Request, *sso.LogoutOutput) +} + +var _ SSOAPI = (*sso.SSO)(nil) diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go index bfc4372f9f..3cffd533d9 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/api.go @@ -57,65 +57,38 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // AssumeRole API operation for AWS Security Token Service. // // Returns a set of temporary security credentials that you can use to access -// AWS resources that you might not normally have access to. These temporary -// credentials consist of an access key ID, a secret access key, and a security -// token. Typically, you use AssumeRole within your account or for cross-account -// access. For a comparison of AssumeRole with other API operations that produce -// temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the AWS STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) -// in the IAM User Guide. -// -// You cannot use AWS account root user credentials to call AssumeRole. You -// must use credentials for an IAM user or an IAM role to call AssumeRole. -// -// For cross-account access, imagine that you own multiple accounts and need -// to access resources in each account. You could create long-term credentials -// in each account to access those resources. However, managing all those credentials -// and remembering which one can access which account can be time consuming. -// Instead, you can create one set of long-term credentials in one account. -// Then use temporary security credentials to access all the other accounts -// by assuming roles in those accounts. For more information about roles, see -// IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html) -// in the IAM User Guide. -// -// Session Duration -// -// By default, the temporary security credentials created by AssumeRole last -// for one hour. However, you can use the optional DurationSeconds parameter -// to specify the duration of your session. You can provide a value from 900 -// seconds (15 minutes) up to the maximum session duration setting for the role. -// This setting can have a value from 1 hour to 12 hours. To learn how to view -// the maximum value for your role, see View the Maximum Session Duration Setting -// for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) -// in the IAM User Guide. The maximum session duration limit applies when you -// use the AssumeRole* API operations or the assume-role* CLI commands. However -// the limit does not apply when you use those operations to create a console -// URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) +// Amazon Web Services resources that you might not normally have access to. +// These temporary credentials consist of an access key ID, a secret access +// key, and a security token. Typically, you use AssumeRole within your account +// or for cross-account access. For a comparison of AssumeRole with other API +// operations that produce temporary credentials, see Requesting Temporary Security +// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // Permissions // // The temporary security credentials created by AssumeRole can be used to make -// API calls to any AWS service with the following exception: You cannot call -// the AWS STS GetFederationToken or GetSessionToken API operations. +// API calls to any Amazon Web Services service with the following exception: +// You cannot call the STS GetFederationToken or GetSessionToken API operations. // // (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policies to -// use as managed session policies. The plain text that you use for both inline +// use as managed session policies. The plaintext that you use for both inline // and managed session policies can't exceed 2,048 characters. Passing policies // to this operation returns new temporary credentials. The resulting session's // permissions are the intersection of the role's identity-based policy and // the session policies. You can use the role's temporary credentials in subsequent -// AWS API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed -// by the identity-based policy of the role that is being assumed. For more -// information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) +// Amazon Web Services API calls to access resources in the account that owns +// the role. You cannot use session policies to grant more permissions than +// those allowed by the identity-based policy of the role that is being assumed. +// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // -// To assume a role from a different account, your AWS account must be trusted -// by the role. The trust relationship is defined in the role's trust policy -// when the role is created. That trust policy states which accounts are allowed +// To assume a role from a different account, your account must be trusted by +// the role. The trust relationship is defined in the role's trust policy when +// the role is created. That trust policy states which accounts are allowed // to delegate that access to users in the account. // // A user who wants to access a role in a different account must also have permissions @@ -157,12 +130,12 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // // (Optional) You can include multi-factor authentication (MFA) information // when you call AssumeRole. This is useful for cross-account scenarios to ensure -// that the user that assumes the role has been authenticated with an AWS MFA -// device. In that scenario, the trust policy of the role being assumed includes -// a condition that tests for MFA authentication. If the caller does not include -// valid MFA information, the request to assume the role is denied. The condition -// in a trust policy that tests for MFA authentication might look like the following -// example. +// that the user that assumes the role has been authenticated with an Amazon +// Web Services MFA device. In that scenario, the trust policy of the role being +// assumed includes a condition that tests for MFA authentication. If the caller +// does not include valid MFA information, the request to assume the role is +// denied. The condition in a trust policy that tests for MFA authentication +// might look like the following example. // // "Condition": {"Bool": {"aws:MultiFactorAuthPresent": true}} // @@ -188,11 +161,11 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies -// and session tags combined was too large. An AWS conversion compresses the -// session policy document, session policy ARNs, and session tags into a packed -// binary format that has a separate limit. The error message indicates by percentage -// how close the policies and tags are to the upper size limit. For more information, -// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) +// and session tags combined was too large. An Amazon Web Services conversion +// compresses the session policy document, session policy ARNs, and session +// tags into a packed binary format that has a separate limit. The error message +// indicates by percentage how close the policies and tags are to the upper +// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy @@ -204,7 +177,8 @@ func (c *STS) AssumeRoleRequest(input *AssumeRoleInput) (req *request.Request, o // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating -// and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// and Deactivating Amazon Web Services STS in an Amazon Web Services Region +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // * ErrCodeExpiredTokenException "ExpiredTokenException" @@ -280,16 +254,17 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // // Returns a set of temporary security credentials for users who have been authenticated // via a SAML authentication response. This operation provides a mechanism for -// tying an enterprise identity store or directory to role-based AWS access -// without user-specific credentials or configuration. For a comparison of AssumeRoleWithSAML -// with the other API operations that produce temporary credentials, see Requesting -// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the AWS STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// tying an enterprise identity store or directory to role-based Amazon Web +// Services access without user-specific credentials or configuration. For a +// comparison of AssumeRoleWithSAML with the other API operations that produce +// temporary credentials, see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // The temporary security credentials returned by this operation consist of // an access key ID, a secret access key, and a security token. Applications -// can use these temporary security credentials to sign calls to AWS services. +// can use these temporary security credentials to sign calls to Amazon Web +// Services services. // // Session Duration // @@ -308,32 +283,42 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // URL. For more information, see Using IAM Roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html) // in the IAM User Guide. // +// Role chaining (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#iam-term-role-chaining) +// limits your CLI or Amazon Web Services API role session to a maximum of one +// hour. When you use the AssumeRole API operation to assume a role, you can +// specify the duration of your role session with the DurationSeconds parameter. +// You can specify a parameter value of up to 43200 seconds (12 hours), depending +// on the maximum session duration setting for your role. However, if you assume +// a role using role chaining and provide a DurationSeconds parameter value +// greater than one hour, the operation fails. +// // Permissions // // The temporary security credentials created by AssumeRoleWithSAML can be used -// to make API calls to any AWS service with the following exception: you cannot -// call the STS GetFederationToken or GetSessionToken API operations. +// to make API calls to any Amazon Web Services service with the following exception: +// you cannot call the STS GetFederationToken or GetSessionToken API operations. // // (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policies to -// use as managed session policies. The plain text that you use for both inline +// use as managed session policies. The plaintext that you use for both inline // and managed session policies can't exceed 2,048 characters. Passing policies // to this operation returns new temporary credentials. The resulting session's // permissions are the intersection of the role's identity-based policy and // the session policies. You can use the role's temporary credentials in subsequent -// AWS API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed -// by the identity-based policy of the role that is being assumed. For more -// information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) +// Amazon Web Services API calls to access resources in the account that owns +// the role. You cannot use session policies to grant more permissions than +// those allowed by the identity-based policy of the role that is being assumed. +// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // -// Calling AssumeRoleWithSAML does not require the use of AWS security credentials. -// The identity of the caller is validated by using keys in the metadata document -// that is uploaded for the SAML provider entity for your identity provider. +// Calling AssumeRoleWithSAML does not require the use of Amazon Web Services +// security credentials. The identity of the caller is validated by using keys +// in the metadata document that is uploaded for the SAML provider entity for +// your identity provider. // -// Calling AssumeRoleWithSAML can result in an entry in your AWS CloudTrail -// logs. The entry includes the value in the NameID element of the SAML assertion. +// Calling AssumeRoleWithSAML can result in an entry in your CloudTrail logs. +// The entry includes the value in the NameID element of the SAML assertion. // We recommend that you use a NameIDType that is not associated with any personally // identifiable information (PII). For example, you could instead use the persistent // identifier (urn:oasis:names:tc:SAML:2.0:nameid-format:persistent). @@ -346,16 +331,16 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // -// You can pass up to 50 session tags. The plain text session tag keys can’t +// You can pass up to 50 session tags. The plaintext session tag keys can’t // exceed 128 characters and the values can’t exceed 256 characters. For these // and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // -// An AWS conversion compresses the passed session policies and session tags -// into a packed binary format that has a separate limit. Your request can fail -// for this limit even if your plain text meets the other requirements. The -// PackedPolicySize response element indicates by percentage how close the policies -// and tags for your request are to the upper size limit. +// An Amazon Web Services conversion compresses the passed session policies +// and session tags into a packed binary format that has a separate limit. Your +// request can fail for this limit even if your plaintext meets the other requirements. +// The PackedPolicySize response element indicates by percentage how close the +// policies and tags for your request are to the upper size limit. // // You can pass a session tag with the same key as a tag that is attached to // the role. When you do, session tags override the role's tags with the same @@ -375,10 +360,11 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // SAML Configuration // // Before your application can call AssumeRoleWithSAML, you must configure your -// SAML identity provider (IdP) to issue the claims required by AWS. Additionally, -// you must use AWS Identity and Access Management (IAM) to create a SAML provider -// entity in your AWS account that represents your identity provider. You must -// also create an IAM role that specifies this SAML provider in its trust policy. +// SAML identity provider (IdP) to issue the claims required by Amazon Web Services. +// Additionally, you must use Identity and Access Management (IAM) to create +// a SAML provider entity in your Amazon Web Services account that represents +// your identity provider. You must also create an IAM role that specifies this +// SAML provider in its trust policy. // // For more information, see the following resources: // @@ -408,11 +394,11 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies -// and session tags combined was too large. An AWS conversion compresses the -// session policy document, session policy ARNs, and session tags into a packed -// binary format that has a separate limit. The error message indicates by percentage -// how close the policies and tags are to the upper size limit. For more information, -// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) +// and session tags combined was too large. An Amazon Web Services conversion +// compresses the session policy document, session policy ARNs, and session +// tags into a packed binary format that has a separate limit. The error message +// indicates by percentage how close the policies and tags are to the upper +// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy @@ -428,8 +414,9 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // can also mean that the claim has expired or has been explicitly revoked. // // * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" -// The web identity token that was passed could not be validated by AWS. Get -// a new identity token from the identity provider and then retry the request. +// The web identity token that was passed could not be validated by Amazon Web +// Services. Get a new identity token from the identity provider and then retry +// the request. // // * ErrCodeExpiredTokenException "ExpiredTokenException" // The web identity token that was passed is expired or is not valid. Get a @@ -439,7 +426,8 @@ func (c *STS) AssumeRoleWithSAMLRequest(input *AssumeRoleWithSAMLInput) (req *re // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating -// and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// and Deactivating Amazon Web Services STS in an Amazon Web Services Region +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithSAML @@ -515,30 +503,33 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // Connect-compatible identity provider. // // For mobile applications, we recommend that you use Amazon Cognito. You can -// use Amazon Cognito with the AWS SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) -// and the AWS SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/) -// to uniquely identify a user. You can also supply the user with a consistent -// identity throughout the lifetime of an application. +// use Amazon Cognito with the Amazon Web Services SDK for iOS Developer Guide +// (http://aws.amazon.com/sdkforios/) and the Amazon Web Services SDK for Android +// Developer Guide (http://aws.amazon.com/sdkforandroid/) to uniquely identify +// a user. You can also supply the user with a consistent identity throughout +// the lifetime of an application. // // To learn more about Amazon Cognito, see Amazon Cognito Overview (https://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/cognito-auth.html#d0e840) -// in AWS SDK for Android Developer Guide and Amazon Cognito Overview (https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664) -// in the AWS SDK for iOS Developer Guide. -// -// Calling AssumeRoleWithWebIdentity does not require the use of AWS security -// credentials. Therefore, you can distribute an application (for example, on -// mobile devices) that requests temporary security credentials without including -// long-term AWS credentials in the application. You also don't need to deploy -// server-based proxy services that use long-term AWS credentials. Instead, -// the identity of the caller is validated by using a token from the web identity -// provider. For a comparison of AssumeRoleWithWebIdentity with the other API -// operations that produce temporary credentials, see Requesting Temporary Security -// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the AWS STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// in Amazon Web Services SDK for Android Developer Guide and Amazon Cognito +// Overview (https://docs.aws.amazon.com/mobile/sdkforios/developerguide/cognito-auth.html#d0e664) +// in the Amazon Web Services SDK for iOS Developer Guide. +// +// Calling AssumeRoleWithWebIdentity does not require the use of Amazon Web +// Services security credentials. Therefore, you can distribute an application +// (for example, on mobile devices) that requests temporary security credentials +// without including long-term Amazon Web Services credentials in the application. +// You also don't need to deploy server-based proxy services that use long-term +// Amazon Web Services credentials. Instead, the identity of the caller is validated +// by using a token from the web identity provider. For a comparison of AssumeRoleWithWebIdentity +// with the other API operations that produce temporary credentials, see Requesting +// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // The temporary security credentials returned by this API consist of an access // key ID, a secret access key, and a security token. Applications can use these -// temporary security credentials to sign calls to AWS service API operations. +// temporary security credentials to sign calls to Amazon Web Services service +// API operations. // // Session Duration // @@ -558,21 +549,22 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // Permissions // // The temporary security credentials created by AssumeRoleWithWebIdentity can -// be used to make API calls to any AWS service with the following exception: -// you cannot call the STS GetFederationToken or GetSessionToken API operations. +// be used to make API calls to any Amazon Web Services service with the following +// exception: you cannot call the STS GetFederationToken or GetSessionToken +// API operations. // // (Optional) You can pass inline or managed session policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policies to -// use as managed session policies. The plain text that you use for both inline +// use as managed session policies. The plaintext that you use for both inline // and managed session policies can't exceed 2,048 characters. Passing policies // to this operation returns new temporary credentials. The resulting session's // permissions are the intersection of the role's identity-based policy and // the session policies. You can use the role's temporary credentials in subsequent -// AWS API calls to access resources in the account that owns the role. You -// cannot use session policies to grant more permissions than those allowed -// by the identity-based policy of the role that is being assumed. For more -// information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) +// Amazon Web Services API calls to access resources in the account that owns +// the role. You cannot use session policies to grant more permissions than +// those allowed by the identity-based policy of the role that is being assumed. +// For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // // Tags @@ -583,16 +575,16 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // -// You can pass up to 50 session tags. The plain text session tag keys can’t +// You can pass up to 50 session tags. The plaintext session tag keys can’t // exceed 128 characters and the values can’t exceed 256 characters. For these // and additional limits, see IAM and STS Character Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // -// An AWS conversion compresses the passed session policies and session tags -// into a packed binary format that has a separate limit. Your request can fail -// for this limit even if your plain text meets the other requirements. The -// PackedPolicySize response element indicates by percentage how close the policies -// and tags for your request are to the upper size limit. +// An Amazon Web Services conversion compresses the passed session policies +// and session tags into a packed binary format that has a separate limit. Your +// request can fail for this limit even if your plaintext meets the other requirements. +// The PackedPolicySize response element indicates by percentage how close the +// policies and tags for your request are to the upper size limit. // // You can pass a session tag with the same key as a tag that is attached to // the role. When you do, the session tag overrides the role tag with the same @@ -617,9 +609,9 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // the identity provider that is associated with the identity token. In other // words, the identity provider must be specified in the role's trust policy. // -// Calling AssumeRoleWithWebIdentity can result in an entry in your AWS CloudTrail +// Calling AssumeRoleWithWebIdentity can result in an entry in your CloudTrail // logs. The entry includes the Subject (http://openid.net/specs/openid-connect-core-1_0.html#Claims) -// of the provided Web Identity Token. We recommend that you avoid using any +// of the provided web identity token. We recommend that you avoid using any // personally identifiable information (PII) in this field. For example, you // could instead use a GUID or a pairwise identifier, as suggested in the OIDC // specification (http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes). @@ -633,10 +625,10 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // * Web Identity Federation Playground (https://aws.amazon.com/blogs/aws/the-aws-web-identity-federation-playground/). // Walk through the process of authenticating through Login with Amazon, // Facebook, or Google, getting temporary security credentials, and then -// using those credentials to make a request to AWS. +// using those credentials to make a request to Amazon Web Services. // -// * AWS SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) and -// AWS SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/). +// * Amazon Web Services SDK for iOS Developer Guide (http://aws.amazon.com/sdkforios/) +// and Amazon Web Services SDK for Android Developer Guide (http://aws.amazon.com/sdkforandroid/). // These toolkits contain sample apps that show how to invoke the identity // providers. The toolkits then show how to use the information from these // providers to get and use temporary security credentials. @@ -660,11 +652,11 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies -// and session tags combined was too large. An AWS conversion compresses the -// session policy document, session policy ARNs, and session tags into a packed -// binary format that has a separate limit. The error message indicates by percentage -// how close the policies and tags are to the upper size limit. For more information, -// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) +// and session tags combined was too large. An Amazon Web Services conversion +// compresses the session policy document, session policy ARNs, and session +// tags into a packed binary format that has a separate limit. The error message +// indicates by percentage how close the policies and tags are to the upper +// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy @@ -687,8 +679,9 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // error persists, the identity provider might be down or not responding. // // * ErrCodeInvalidIdentityTokenException "InvalidIdentityToken" -// The web identity token that was passed could not be validated by AWS. Get -// a new identity token from the identity provider and then retry the request. +// The web identity token that was passed could not be validated by Amazon Web +// Services. Get a new identity token from the identity provider and then retry +// the request. // // * ErrCodeExpiredTokenException "ExpiredTokenException" // The web identity token that was passed is expired or is not valid. Get a @@ -698,7 +691,8 @@ func (c *STS) AssumeRoleWithWebIdentityRequest(input *AssumeRoleWithWebIdentityI // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating -// and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// and Deactivating Amazon Web Services STS in an Amazon Web Services Region +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/AssumeRoleWithWebIdentity @@ -768,16 +762,18 @@ func (c *STS) DecodeAuthorizationMessageRequest(input *DecodeAuthorizationMessag // DecodeAuthorizationMessage API operation for AWS Security Token Service. // // Decodes additional information about the authorization status of a request -// from an encoded message returned in response to an AWS request. +// from an encoded message returned in response to an Amazon Web Services request. // // For example, if a user is not authorized to perform an operation that he // or she has requested, the request returns a Client.UnauthorizedOperation -// response (an HTTP 403 response). Some AWS operations additionally return -// an encoded message that can provide details about this authorization failure. +// response (an HTTP 403 response). Some Amazon Web Services operations additionally +// return an encoded message that can provide details about this authorization +// failure. // -// Only certain AWS operations return an encoded authorization message. The -// documentation for an individual operation indicates whether that operation -// returns an encoded message in addition to returning an HTTP code. +// Only certain Amazon Web Services operations return an encoded authorization +// message. The documentation for an individual operation indicates whether +// that operation returns an encoded message in addition to returning an HTTP +// code. // // The message is encoded because the details of the authorization status can // constitute privileged information that the user who requested the operation @@ -888,12 +884,12 @@ func (c *STS) GetAccessKeyInfoRequest(input *GetAccessKeyInfoInput) (req *reques // in the IAM User Guide. // // When you pass an access key ID to this operation, it returns the ID of the -// AWS account to which the keys belong. Access key IDs beginning with AKIA -// are long-term credentials for an IAM user or the AWS account root user. Access -// key IDs beginning with ASIA are temporary credentials that are created using -// STS operations. If the account in the response belongs to you, you can sign -// in as the root user and review your root user access keys. Then, you can -// pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) +// Amazon Web Services account to which the keys belong. Access key IDs beginning +// with AKIA are long-term credentials for an IAM user or the Amazon Web Services +// account root user. Access key IDs beginning with ASIA are temporary credentials +// that are created using STS operations. If the account in the response belongs +// to you, you can sign in as the root user and review your root user access +// keys. Then, you can pull a credentials report (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_getting-report.html) // to learn which IAM user owns the keys. To learn who requested the temporary // credentials for an ASIA access key, view the STS events in your CloudTrail // logs (https://docs.aws.amazon.com/IAM/latest/UserGuide/cloudtrail-integration.html) @@ -1069,7 +1065,7 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re // For a comparison of GetFederationToken with the other API operations that // produce temporary credentials, see Requesting Temporary Security Credentials // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the AWS STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // You can create a mobile-based or browser-based app that can authenticate @@ -1081,11 +1077,11 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re // in the IAM User Guide. // // You can also call GetFederationToken using the security credentials of an -// AWS account root user, but we do not recommend it. Instead, we recommend -// that you create an IAM user for the purpose of the proxy application. Then -// attach a policy to the IAM user that limits federated users to only the actions -// and resources that they need to access. For more information, see IAM Best -// Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) +// Amazon Web Services account root user, but we do not recommend it. Instead, +// we recommend that you create an IAM user for the purpose of the proxy application. +// Then attach a policy to the IAM user that limits federated users to only +// the actions and resources that they need to access. For more information, +// see IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) // in the IAM User Guide. // // Session duration @@ -1093,15 +1089,81 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re // The temporary credentials are valid for the specified duration, from 900 // seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default // session duration is 43,200 seconds (12 hours). Temporary credentials that -// are obtained by using AWS account root user credentials have a maximum duration -// of 3,600 seconds (1 hour). +// are obtained by using Amazon Web Services account root user credentials have +// a maximum duration of 3,600 seconds (1 hour). // // Permissions // // You can use the temporary credentials created by GetFederationToken in any -// AWS service except the following: +// Amazon Web Services service except the following: // -// * You cannot call any IAM operations using the AWS CLI or the AWS API. +// * You cannot call any IAM operations using the CLI or the Amazon Web Services +// API. +// +// * You cannot call any STS operations except GetCallerIdentity. +// +// You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) +// to this operation. You can pass a single JSON policy document to use as an +// inline session policy. You can also specify up to 10 managed policies to +// use as managed session policies. The plaintext that you use for both inline +// and managed session policies can't exceed 2,048 characters. +// +// Though the session policy parameters are optional, if you do not pass a policy, +// then the resulting federated user session has no permissions. When you pass +// session policies, the session permissions are the intersection of the IAM +// user policies and the session policies that you pass. This gives you a way +// to further restrict the permissions for a federated user. You cannot use +// session policies to grant more permissions than those that are defined in +// the permissions policy of the IAM user. For more information, see Session +// Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) +// in the IAM User Guide. For information about using GetFederationToken to +// create temporary security credentials, see GetFederationToken—Federation +// Through a Custom Identity Broker (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getfederationtoken). +// +// You can use the credentials to access a resource that has a resource-based +// policy. If that policy specifically references the federated user session +// in the Principal element of the policy, the session has the permissions allowed +// by the policy. These permissions are granted in addition to the permissions +// granted by the session policies. +// +// Tags +// +// (Optional) You can pass tag key-value pairs to your session. These are called +// session tags. For more information about session tags, see Passing Session +// Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) +// in the IAM User Guide. +// +// You can create a mobile-based or browser-based app that can authenticate +// users using a web identity provider like Login with Amazon, Facebook, Google, +// or an OpenID Connect-compatible identity provider. In this case, we recommend +// that you use Amazon Cognito (http://aws.amazon.com/cognito/) or AssumeRoleWithWebIdentity. +// For more information, see Federation Through a Web-based Identity Provider +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_assumerolewithwebidentity) +// in the IAM User Guide. +// +// You can also call GetFederationToken using the security credentials of an +// Amazon Web Services account root user, but we do not recommend it. Instead, +// we recommend that you create an IAM user for the purpose of the proxy application. +// Then attach a policy to the IAM user that limits federated users to only +// the actions and resources that they need to access. For more information, +// see IAM Best Practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html) +// in the IAM User Guide. +// +// Session duration +// +// The temporary credentials are valid for the specified duration, from 900 +// seconds (15 minutes) up to a maximum of 129,600 seconds (36 hours). The default +// session duration is 43,200 seconds (12 hours). Temporary credentials that +// are obtained by using Amazon Web Services account root user credentials have +// a maximum duration of 3,600 seconds (1 hour). +// +// Permissions +// +// You can use the temporary credentials created by GetFederationToken in any +// Amazon Web Services service except the following: +// +// * You cannot call any IAM operations using the CLI or the Amazon Web Services +// API. // // * You cannot call any STS operations except GetCallerIdentity. // @@ -1163,11 +1225,11 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re // // * ErrCodePackedPolicyTooLargeException "PackedPolicyTooLarge" // The request was rejected because the total packed size of the session policies -// and session tags combined was too large. An AWS conversion compresses the -// session policy document, session policy ARNs, and session tags into a packed -// binary format that has a separate limit. The error message indicates by percentage -// how close the policies and tags are to the upper size limit. For more information, -// see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) +// and session tags combined was too large. An Amazon Web Services conversion +// compresses the session policy document, session policy ARNs, and session +// tags into a packed binary format that has a separate limit. The error message +// indicates by percentage how close the policies and tags are to the upper +// size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy @@ -1179,7 +1241,8 @@ func (c *STS) GetFederationTokenRequest(input *GetFederationTokenInput) (req *re // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating -// and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// and Deactivating Amazon Web Services STS in an Amazon Web Services Region +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetFederationToken @@ -1248,51 +1311,53 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request. // GetSessionToken API operation for AWS Security Token Service. // -// Returns a set of temporary credentials for an AWS account or IAM user. The -// credentials consist of an access key ID, a secret access key, and a security -// token. Typically, you use GetSessionToken if you want to use MFA to protect -// programmatic calls to specific AWS API operations like Amazon EC2 StopInstances. -// MFA-enabled IAM users would need to call GetSessionToken and submit an MFA -// code that is associated with their MFA device. Using the temporary security -// credentials that are returned from the call, IAM users can then make programmatic -// calls to API operations that require MFA authentication. If you do not supply -// a correct MFA code, then the API returns an access denied error. For a comparison -// of GetSessionToken with the other API operations that produce temporary credentials, -// see Requesting Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) -// and Comparing the AWS STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) +// Returns a set of temporary credentials for an Amazon Web Services account +// or IAM user. The credentials consist of an access key ID, a secret access +// key, and a security token. Typically, you use GetSessionToken if you want +// to use MFA to protect programmatic calls to specific Amazon Web Services +// API operations like Amazon EC2 StopInstances. MFA-enabled IAM users would +// need to call GetSessionToken and submit an MFA code that is associated with +// their MFA device. Using the temporary security credentials that are returned +// from the call, IAM users can then make programmatic calls to API operations +// that require MFA authentication. If you do not supply a correct MFA code, +// then the API returns an access denied error. For a comparison of GetSessionToken +// with the other API operations that produce temporary credentials, see Requesting +// Temporary Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html) +// and Comparing the STS API operations (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#stsapi_comparison) // in the IAM User Guide. // // Session Duration // -// The GetSessionToken operation must be called by using the long-term AWS security -// credentials of the AWS account root user or an IAM user. Credentials that -// are created by IAM users are valid for the duration that you specify. This -// duration can range from 900 seconds (15 minutes) up to a maximum of 129,600 -// seconds (36 hours), with a default of 43,200 seconds (12 hours). Credentials -// based on account credentials can range from 900 seconds (15 minutes) up to -// 3,600 seconds (1 hour), with a default of 1 hour. +// The GetSessionToken operation must be called by using the long-term Amazon +// Web Services security credentials of the Amazon Web Services account root +// user or an IAM user. Credentials that are created by IAM users are valid +// for the duration that you specify. This duration can range from 900 seconds +// (15 minutes) up to a maximum of 129,600 seconds (36 hours), with a default +// of 43,200 seconds (12 hours). Credentials based on account credentials can +// range from 900 seconds (15 minutes) up to 3,600 seconds (1 hour), with a +// default of 1 hour. // // Permissions // // The temporary security credentials created by GetSessionToken can be used -// to make API calls to any AWS service with the following exceptions: +// to make API calls to any Amazon Web Services service with the following exceptions: // // * You cannot call any IAM API operations unless MFA authentication information // is included in the request. // // * You cannot call any STS API except AssumeRole or GetCallerIdentity. // -// We recommend that you do not call GetSessionToken with AWS account root user -// credentials. Instead, follow our best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users) +// We recommend that you do not call GetSessionToken with Amazon Web Services +// account root user credentials. Instead, follow our best practices (https://docs.aws.amazon.com/IAM/latest/UserGuide/best-practices.html#create-iam-users) // by creating one or more IAM users, giving them the necessary permissions, -// and using IAM users for everyday interaction with AWS. +// and using IAM users for everyday interaction with Amazon Web Services. // // The credentials that are returned by GetSessionToken are based on permissions // associated with the user whose credentials were used to call the operation. -// If GetSessionToken is called using AWS account root user credentials, the -// temporary credentials have root user permissions. Similarly, if GetSessionToken -// is called using the credentials of an IAM user, the temporary credentials -// have the same permissions as the IAM user. +// If GetSessionToken is called using Amazon Web Services account root user +// credentials, the temporary credentials have root user permissions. Similarly, +// if GetSessionToken is called using the credentials of an IAM user, the temporary +// credentials have the same permissions as the IAM user. // // For more information about using GetSessionToken to create temporary credentials, // go to Temporary Credentials for Users in Untrusted Environments (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_request.html#api_getsessiontoken) @@ -1310,7 +1375,8 @@ func (c *STS) GetSessionTokenRequest(input *GetSessionTokenInput) (req *request. // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating -// and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) +// and Deactivating Amazon Web Services STS in an Amazon Web Services Region +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. // // See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15/GetSessionToken @@ -1338,14 +1404,15 @@ func (c *STS) GetSessionTokenWithContext(ctx aws.Context, input *GetSessionToken type AssumeRoleInput struct { _ struct{} `type:"structure"` - // The duration, in seconds, of the role session. The value can range from 900 - // seconds (15 minutes) up to the maximum session duration setting for the role. - // This setting can have a value from 1 hour to 12 hours. If you specify a value - // higher than this setting, the operation fails. For example, if you specify - // a session duration of 12 hours, but your administrator set the maximum session - // duration to 6 hours, your operation fails. To learn how to view the maximum - // value for your role, see View the Maximum Session Duration Setting for a - // Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) + // The duration, in seconds, of the role session. The value specified can can + // range from 900 seconds (15 minutes) up to the maximum session duration that + // is set for the role. The maximum session duration setting can have a value + // from 1 hour to 12 hours. If you specify a value higher than this setting + // or the administrator setting (whichever is lower), the operation fails. For + // example, if you specify a session duration of 12 hours, but your administrator + // set the maximum session duration to 6 hours, your operation fails. To learn + // how to view the maximum value for your role, see View the Maximum Session + // Duration Setting for a Role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html#id_roles_use_view-role-max-session) // in the IAM User Guide. // // By default, the value is set to 3600 seconds. @@ -1355,7 +1422,7 @@ type AssumeRoleInput struct { // to the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the - // AWS Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) + // Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` @@ -1367,8 +1434,8 @@ type AssumeRoleInput struct { // of the trusting account might send an external ID to the administrator of // the trusted account. That way, only someone with the ID can assume the role, // rather than everyone in the account. For more information about the external - // ID, see How to Use an External ID When Granting Access to Your AWS Resources - // to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) + // ID, see How to Use an External ID When Granting Access to Your Amazon Web + // Services Resources to a Third Party (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html) // in the IAM User Guide. // // The regex used to validate this parameter is a string of characters consisting @@ -1381,23 +1448,24 @@ type AssumeRoleInput struct { // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use - // the role's temporary credentials in subsequent AWS API calls to access resources - // in the account that owns the role. You cannot use session policies to grant - // more permissions than those allowed by the identity-based policy of the role - // that is being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // the role's temporary credentials in subsequent Amazon Web Services API calls + // to access resources in the account that owns the role. You cannot use session + // policies to grant more permissions than those allowed by the identity-based + // policy of the role that is being assumed. For more information, see Session + // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // - // The plain text that you use for both inline and managed session policies - // can't exceed 2,048 characters. The JSON policy characters can be any ASCII - // character from the space character to the end of the valid character list - // (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), - // and carriage return (\u000D) characters. - // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want @@ -1405,24 +1473,24 @@ type AssumeRoleInput struct { // as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plain text that you use for both inline and managed session - // policies can't exceed 2,048 characters. For more information about ARNs, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the AWS General Reference. + // However, the plaintext that you use for both inline and managed session policies + // can't exceed 2,048 characters. For more information about ARNs, see Amazon + // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials - // in subsequent AWS API calls to access resources in the account that owns - // the role. You cannot use session policies to grant more permissions than - // those allowed by the identity-based policy of the role that is being assumed. - // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // in subsequent Amazon Web Services API calls to access resources in the account + // that owns the role. You cannot use session policies to grant more permissions + // than those allowed by the identity-based policy of the role that is being + // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` @@ -1439,7 +1507,7 @@ type AssumeRoleInput struct { // account that owns the role. The role session name is also used in the ARN // of the assumed role principal. This means that subsequent cross-account API // requests that use the temporary security credentials will expose the role - // session name to the external account in their AWS CloudTrail logs. + // session name to the external account in their CloudTrail logs. // // The regex used to validate this parameter is a string of characters consisting // of upper- and lower-case alphanumeric characters with no spaces. You can @@ -1459,22 +1527,41 @@ type AssumeRoleInput struct { // also include underscores or any of the following characters: =,.@- SerialNumber *string `min:"9" type:"string"` + // The source identity specified by the principal that is calling the AssumeRole + // operation. + // + // You can require users to specify a source identity when they assume a role. + // You do this by using the sts:SourceIdentity condition key in a role trust + // policy. You can use source identity information in CloudTrail logs to determine + // who took actions with a role. You can use the aws:SourceIdentity condition + // key to further control access to Amazon Web Services resources based on the + // value of source identity. For more information about using source identity, + // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can + // also include underscores or any of the following characters: =,.@-. You cannot + // use a value that begins with the text aws:. This prefix is reserved for Amazon + // Web Services internal use. + SourceIdentity *string `min:"2" type:"string"` + // A list of session tags that you want to pass. Each session tag consists of // a key name and an associated value. For more information about session tags, - // see Tagging AWS STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) + // see Tagging STS Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // - // This parameter is optional. You can pass up to 50 session tags. The plain - // text session tag keys can’t exceed 128 characters, and the values can’t - // exceed 256 characters. For these and additional limits, see IAM and STS Character + // This parameter is optional. You can pass up to 50 session tags. The plaintext + // session tag keys can’t exceed 128 characters, and the values can’t exceed + // 256 characters. For these and additional limits, see IAM and STS Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. // // You can pass a session tag with the same key as a tag that is already attached // to the role. When you do, session tags override a role tag with the same @@ -1489,15 +1576,16 @@ type AssumeRoleInput struct { // Additionally, if you used temporary credentials to perform this operation, // the new session inherits any transitive session tags from the calling session. // If you pass a session tag with the same key as an inherited tag, the operation - // fails. To view the inherited tags for a session, see the AWS CloudTrail logs. + // fails. To view the inherited tags for a session, see the CloudTrail logs. // For more information, see Viewing Session Tags in CloudTrail (https://docs.aws.amazon.com/IAM/latest/UserGuide/session-tags.html#id_session-tags_ctlogs) // in the IAM User Guide. Tags []*Tag `type:"list"` // The value provided by the MFA device, if the trust policy of the role being - // assumed requires MFA (that is, if the policy includes a condition that tests - // for MFA). If the role being assumed requires MFA and if the TokenCode value - // is missing or expired, the AssumeRole call returns an "access denied" error. + // assumed requires MFA. (In other words, if the policy includes a condition + // that tests for MFA). If the role being assumed requires MFA and if the TokenCode + // value is missing or expired, the AssumeRole call returns an "access denied" + // error. // // The format for this parameter, as described by its regex pattern, is a sequence // of six numeric digits. @@ -1554,6 +1642,9 @@ func (s *AssumeRoleInput) Validate() error { if s.SerialNumber != nil && len(*s.SerialNumber) < 9 { invalidParams.Add(request.NewErrParamMinLen("SerialNumber", 9)) } + if s.SourceIdentity != nil && len(*s.SourceIdentity) < 2 { + invalidParams.Add(request.NewErrParamMinLen("SourceIdentity", 2)) + } if s.TokenCode != nil && len(*s.TokenCode) < 6 { invalidParams.Add(request.NewErrParamMinLen("TokenCode", 6)) } @@ -1626,6 +1717,12 @@ func (s *AssumeRoleInput) SetSerialNumber(v string) *AssumeRoleInput { return s } +// SetSourceIdentity sets the SourceIdentity field's value. +func (s *AssumeRoleInput) SetSourceIdentity(v string) *AssumeRoleInput { + s.SourceIdentity = &v + return s +} + // SetTags sets the Tags field's value. func (s *AssumeRoleInput) SetTags(v []*Tag) *AssumeRoleInput { s.Tags = v @@ -1645,7 +1742,8 @@ func (s *AssumeRoleInput) SetTransitiveTagKeys(v []*string) *AssumeRoleInput { } // Contains the response to a successful AssumeRole request, including temporary -// AWS credentials that can be used to make AWS requests. +// Amazon Web Services credentials that can be used to make Amazon Web Services +// requests. type AssumeRoleOutput struct { _ struct{} `type:"structure"` @@ -1668,6 +1766,23 @@ type AssumeRoleOutput struct { // packed size is greater than 100 percent, which means the policies and tags // exceeded the allowed space. PackedPolicySize *int64 `type:"integer"` + + // The source identity specified by the principal that is calling the AssumeRole + // operation. + // + // You can require users to specify a source identity when they assume a role. + // You do this by using the sts:SourceIdentity condition key in a role trust + // policy. You can use source identity information in CloudTrail logs to determine + // who took actions with a role. You can use the aws:SourceIdentity condition + // key to further control access to Amazon Web Services resources based on the + // value of source identity. For more information about using source identity, + // see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can + // also include underscores or any of the following characters: =,.@- + SourceIdentity *string `min:"2" type:"string"` } // String returns the string representation @@ -1698,6 +1813,12 @@ func (s *AssumeRoleOutput) SetPackedPolicySize(v int64) *AssumeRoleOutput { return s } +// SetSourceIdentity sets the SourceIdentity field's value. +func (s *AssumeRoleOutput) SetSourceIdentity(v string) *AssumeRoleOutput { + s.SourceIdentity = &v + return s +} + type AssumeRoleWithSAMLInput struct { _ struct{} `type:"structure"` @@ -1721,7 +1842,7 @@ type AssumeRoleWithSAMLInput struct { // to the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the - // AWS Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) + // Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` @@ -1730,23 +1851,24 @@ type AssumeRoleWithSAMLInput struct { // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use - // the role's temporary credentials in subsequent AWS API calls to access resources - // in the account that owns the role. You cannot use session policies to grant - // more permissions than those allowed by the identity-based policy of the role - // that is being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // the role's temporary credentials in subsequent Amazon Web Services API calls + // to access resources in the account that owns the role. You cannot use session + // policies to grant more permissions than those allowed by the identity-based + // policy of the role that is being assumed. For more information, see Session + // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // - // The plain text that you use for both inline and managed session policies - // can't exceed 2,048 characters. The JSON policy characters can be any ASCII - // character from the space character to the end of the valid character list - // (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), - // and carriage return (\u000D) characters. - // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want @@ -1754,24 +1876,24 @@ type AssumeRoleWithSAMLInput struct { // as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plain text that you use for both inline and managed session - // policies can't exceed 2,048 characters. For more information about ARNs, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the AWS General Reference. + // However, the plaintext that you use for both inline and managed session policies + // can't exceed 2,048 characters. For more information about ARNs, see Amazon + // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials - // in subsequent AWS API calls to access resources in the account that owns - // the role. You cannot use session policies to grant more permissions than - // those allowed by the identity-based policy of the role that is being assumed. - // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // in subsequent Amazon Web Services API calls to access resources in the account + // that owns the role. You cannot use session policies to grant more permissions + // than those allowed by the identity-based policy of the role that is being + // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` @@ -1786,7 +1908,7 @@ type AssumeRoleWithSAMLInput struct { // RoleArn is a required field RoleArn *string `min:"20" type:"string" required:"true"` - // The base-64 encoded SAML authentication response provided by the IdP. + // The base64 encoded SAML authentication response provided by the IdP. // // For more information, see Configuring a Relying Party and Adding Claims (https://docs.aws.amazon.com/IAM/latest/UserGuide/create-role-saml-IdP-tasks.html) // in the IAM User Guide. @@ -1886,7 +2008,8 @@ func (s *AssumeRoleWithSAMLInput) SetSAMLAssertion(v string) *AssumeRoleWithSAML } // Contains the response to a successful AssumeRoleWithSAML request, including -// temporary AWS credentials that can be used to make AWS requests. +// temporary Amazon Web Services credentials that can be used to make Amazon +// Web Services requests. type AssumeRoleWithSAMLOutput struct { _ struct{} `type:"structure"` @@ -1908,10 +2031,17 @@ type AssumeRoleWithSAMLOutput struct { // The value of the Issuer element of the SAML assertion. Issuer *string `type:"string"` - // A hash value based on the concatenation of the Issuer response value, the - // AWS account ID, and the friendly name (the last part of the ARN) of the SAML - // provider in IAM. The combination of NameQualifier and Subject can be used - // to uniquely identify a federated user. + // A hash value based on the concatenation of the following: + // + // * The Issuer response value. + // + // * The Amazon Web Services account ID. + // + // * The friendly name (the last part of the ARN) of the SAML provider in + // IAM. + // + // The combination of NameQualifier and Subject can be used to uniquely identify + // a federated user. // // The following pseudocode shows how the hash value is calculated: // @@ -1925,6 +2055,26 @@ type AssumeRoleWithSAMLOutput struct { // exceeded the allowed space. PackedPolicySize *int64 `type:"integer"` + // The value in the SourceIdentity attribute in the SAML assertion. + // + // You can require users to set a source identity value when they assume a role. + // You do this by using the sts:SourceIdentity condition key in a role trust + // policy. That way, actions that are taken with the role are associated with + // that user. After the source identity is set, the value cannot be changed. + // It is present in the request for all actions that are taken by the role and + // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining) + // sessions. You can configure your SAML identity provider to use an attribute + // associated with your users, like user name or email, as the source identity + // when calling AssumeRoleWithSAML. You do this by adding an attribute to the + // SAML assertion. For more information about using source identity, see Monitor + // and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can + // also include underscores or any of the following characters: =,.@- + SourceIdentity *string `min:"2" type:"string"` + // The value of the NameID element in the Subject element of the SAML assertion. Subject *string `type:"string"` @@ -1985,6 +2135,12 @@ func (s *AssumeRoleWithSAMLOutput) SetPackedPolicySize(v int64) *AssumeRoleWithS return s } +// SetSourceIdentity sets the SourceIdentity field's value. +func (s *AssumeRoleWithSAMLOutput) SetSourceIdentity(v string) *AssumeRoleWithSAMLOutput { + s.SourceIdentity = &v + return s +} + // SetSubject sets the Subject field's value. func (s *AssumeRoleWithSAMLOutput) SetSubject(v string) *AssumeRoleWithSAMLOutput { s.Subject = &v @@ -2017,7 +2173,7 @@ type AssumeRoleWithWebIdentityInput struct { // to the federation endpoint for a console sign-in token takes a SessionDuration // parameter that specifies the maximum length of the console session. For more // information, see Creating a URL that Enables Federated Users to Access the - // AWS Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) + // Management Console (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers_enable-console-custom-url.html) // in the IAM User Guide. DurationSeconds *int64 `min:"900" type:"integer"` @@ -2026,23 +2182,24 @@ type AssumeRoleWithWebIdentityInput struct { // This parameter is optional. Passing policies to this operation returns new // temporary credentials. The resulting session's permissions are the intersection // of the role's identity-based policy and the session policies. You can use - // the role's temporary credentials in subsequent AWS API calls to access resources - // in the account that owns the role. You cannot use session policies to grant - // more permissions than those allowed by the identity-based policy of the role - // that is being assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // the role's temporary credentials in subsequent Amazon Web Services API calls + // to access resources in the account that owns the role. You cannot use session + // policies to grant more permissions than those allowed by the identity-based + // policy of the role that is being assumed. For more information, see Session + // Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. // - // The plain text that you use for both inline and managed session policies - // can't exceed 2,048 characters. The JSON policy characters can be any ASCII - // character from the space character to the end of the valid character list - // (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), - // and carriage return (\u000D) characters. - // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want @@ -2050,24 +2207,24 @@ type AssumeRoleWithWebIdentityInput struct { // as the role. // // This parameter is optional. You can provide up to 10 managed policy ARNs. - // However, the plain text that you use for both inline and managed session - // policies can't exceed 2,048 characters. For more information about ARNs, - // see Amazon Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the AWS General Reference. + // However, the plaintext that you use for both inline and managed session policies + // can't exceed 2,048 characters. For more information about ARNs, see Amazon + // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. // // Passing policies to this operation returns new temporary credentials. The // resulting session's permissions are the intersection of the role's identity-based // policy and the session policies. You can use the role's temporary credentials - // in subsequent AWS API calls to access resources in the account that owns - // the role. You cannot use session policies to grant more permissions than - // those allowed by the identity-based policy of the role that is being assumed. - // For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) + // in subsequent Amazon Web Services API calls to access resources in the account + // that owns the role. You cannot use session policies to grant more permissions + // than those allowed by the identity-based policy of the role that is being + // assumed. For more information, see Session Policies (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // in the IAM User Guide. PolicyArns []*PolicyDescriptorType `type:"list"` @@ -2207,7 +2364,8 @@ func (s *AssumeRoleWithWebIdentityInput) SetWebIdentityToken(v string) *AssumeRo } // Contains the response to a successful AssumeRoleWithWebIdentity request, -// including temporary AWS credentials that can be used to make AWS requests. +// including temporary Amazon Web Services credentials that can be used to make +// Amazon Web Services requests. type AssumeRoleWithWebIdentityOutput struct { _ struct{} `type:"structure"` @@ -2242,6 +2400,29 @@ type AssumeRoleWithWebIdentityOutput struct { // in the AssumeRoleWithWebIdentity request. Provider *string `type:"string"` + // The value of the source identity that is returned in the JSON web token (JWT) + // from the identity provider. + // + // You can require users to set a source identity value when they assume a role. + // You do this by using the sts:SourceIdentity condition key in a role trust + // policy. That way, actions that are taken with the role are associated with + // that user. After the source identity is set, the value cannot be changed. + // It is present in the request for all actions that are taken by the role and + // persists across chained role (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts#iam-term-role-chaining) + // sessions. You can configure your identity provider to use an attribute associated + // with your users, like user name or email, as the source identity when calling + // AssumeRoleWithWebIdentity. You do this by adding a claim to the JSON web + // token. To learn more about OIDC tokens and claims, see Using Tokens with + // User Pools (https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html) + // in the Amazon Cognito Developer Guide. For more information about using source + // identity, see Monitor and control actions taken with assumed roles (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_control-access_monitor.html) + // in the IAM User Guide. + // + // The regex used to validate this parameter is a string of characters consisting + // of upper- and lower-case alphanumeric characters with no spaces. You can + // also include underscores or any of the following characters: =,.@- + SourceIdentity *string `min:"2" type:"string"` + // The unique user identifier that is returned by the identity provider. This // identifier is associated with the WebIdentityToken that was submitted with // the AssumeRoleWithWebIdentity call. The identifier is typically unique to @@ -2291,6 +2472,12 @@ func (s *AssumeRoleWithWebIdentityOutput) SetProvider(v string) *AssumeRoleWithW return s } +// SetSourceIdentity sets the SourceIdentity field's value. +func (s *AssumeRoleWithWebIdentityOutput) SetSourceIdentity(v string) *AssumeRoleWithWebIdentityOutput { + s.SourceIdentity = &v + return s +} + // SetSubjectFromWebIdentityToken sets the SubjectFromWebIdentityToken field's value. func (s *AssumeRoleWithWebIdentityOutput) SetSubjectFromWebIdentityToken(v string) *AssumeRoleWithWebIdentityOutput { s.SubjectFromWebIdentityToken = &v @@ -2311,8 +2498,8 @@ type AssumedRoleUser struct { Arn *string `min:"20" type:"string" required:"true"` // A unique identifier that contains the role ID and the role session name of - // the role that is being assumed. The role ID is generated by AWS when the - // role is created. + // the role that is being assumed. The role ID is generated by Amazon Web Services + // when the role is created. // // AssumedRoleId is a required field AssumedRoleId *string `min:"2" type:"string" required:"true"` @@ -2340,7 +2527,7 @@ func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser { return s } -// AWS credentials for API authentication. +// Amazon Web Services credentials for API authentication. type Credentials struct { _ struct{} `type:"structure"` @@ -2441,8 +2628,8 @@ func (s *DecodeAuthorizationMessageInput) SetEncodedMessage(v string) *DecodeAut } // A document that contains additional information about the authorization status -// of a request from an encoded message that is returned in response to an AWS -// request. +// of a request from an encoded message that is returned in response to an Amazon +// Web Services request. type DecodeAuthorizationMessageOutput struct { _ struct{} `type:"structure"` @@ -2554,7 +2741,7 @@ func (s *GetAccessKeyInfoInput) SetAccessKeyId(v string) *GetAccessKeyInfoInput type GetAccessKeyInfoOutput struct { _ struct{} `type:"structure"` - // The number used to identify the AWS account. + // The number used to identify the Amazon Web Services account. Account *string `type:"string"` } @@ -2593,11 +2780,11 @@ func (s GetCallerIdentityInput) GoString() string { type GetCallerIdentityOutput struct { _ struct{} `type:"structure"` - // The AWS account ID number of the account that owns or contains the calling - // entity. + // The Amazon Web Services account ID number of the account that owns or contains + // the calling entity. Account *string `type:"string"` - // The AWS ARN associated with the calling entity. + // The Amazon Web Services ARN associated with the calling entity. Arn *string `min:"20" type:"string"` // The unique identifier of the calling entity. The exact value depends on the @@ -2641,9 +2828,10 @@ type GetFederationTokenInput struct { // The duration, in seconds, that the session should last. Acceptable durations // for federation sessions range from 900 seconds (15 minutes) to 129,600 seconds // (36 hours), with 43,200 seconds (12 hours) as the default. Sessions obtained - // using AWS account root user credentials are restricted to a maximum of 3,600 - // seconds (one hour). If the specified duration is longer than one hour, the - // session obtained by using root user credentials defaults to one hour. + // using Amazon Web Services account root user credentials are restricted to + // a maximum of 3,600 seconds (one hour). If the specified duration is longer + // than one hour, the session obtained by using root user credentials defaults + // to one hour. DurationSeconds *int64 `min:"900" type:"integer"` // The name of the federated user. The name is used as an identifier for the @@ -2682,17 +2870,17 @@ type GetFederationTokenInput struct { // by the policy. These permissions are granted in addition to the permissions // that are granted by the session policies. // - // The plain text that you use for both inline and managed session policies - // can't exceed 2,048 characters. The JSON policy characters can be any ASCII - // character from the space character to the end of the valid character list - // (\u0020 through \u00FF). It can also include the tab (\u0009), linefeed (\u000A), - // and carriage return (\u000D) characters. - // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // The plaintext that you use for both inline and managed session policies can't + // exceed 2,048 characters. The JSON policy characters can be any ASCII character + // from the space character to the end of the valid character list (\u0020 through + // \u00FF). It can also include the tab (\u0009), linefeed (\u000A), and carriage + // return (\u000D) characters. + // + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. Policy *string `min:"1" type:"string"` // The Amazon Resource Names (ARNs) of the IAM managed policies that you want @@ -2702,11 +2890,11 @@ type GetFederationTokenInput struct { // You must pass an inline or managed session policy (https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies.html#policies_session) // to this operation. You can pass a single JSON policy document to use as an // inline session policy. You can also specify up to 10 managed policies to - // use as managed session policies. The plain text that you use for both inline + // use as managed session policies. The plaintext that you use for both inline // and managed session policies can't exceed 2,048 characters. You can provide // up to 10 managed policy ARNs. For more information about ARNs, see Amazon - // Resource Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the AWS General Reference. + // Resource Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. // // This parameter is optional. However, if you do not pass any session policies, // then the resulting federated user session has no permissions. @@ -2725,11 +2913,11 @@ type GetFederationTokenInput struct { // by the policy. These permissions are granted in addition to the permissions // that are granted by the session policies. // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. PolicyArns []*PolicyDescriptorType `type:"list"` // A list of session tags. Each session tag consists of a key name and an associated @@ -2737,17 +2925,17 @@ type GetFederationTokenInput struct { // in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // - // This parameter is optional. You can pass up to 50 session tags. The plain - // text session tag keys can’t exceed 128 characters and the values can’t - // exceed 256 characters. For these and additional limits, see IAM and STS Character + // This parameter is optional. You can pass up to 50 session tags. The plaintext + // session tag keys can’t exceed 128 characters and the values can’t exceed + // 256 characters. For these and additional limits, see IAM and STS Character // Limits (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-limits.html#reference_iam-limits-entity-length) // in the IAM User Guide. // - // An AWS conversion compresses the passed session policies and session tags - // into a packed binary format that has a separate limit. Your request can fail - // for this limit even if your plain text meets the other requirements. The - // PackedPolicySize response element indicates by percentage how close the policies - // and tags for your request are to the upper size limit. + // An Amazon Web Services conversion compresses the passed session policies + // and session tags into a packed binary format that has a separate limit. Your + // request can fail for this limit even if your plaintext meets the other requirements. + // The PackedPolicySize response element indicates by percentage how close the + // policies and tags for your request are to the upper size limit. // // You can pass a session tag with the same key as a tag that is already attached // to the user you are federating. When you do, session tags override a user @@ -2844,7 +3032,8 @@ func (s *GetFederationTokenInput) SetTags(v []*Tag) *GetFederationTokenInput { } // Contains the response to a successful GetFederationToken request, including -// temporary AWS credentials that can be used to make AWS requests. +// temporary Amazon Web Services credentials that can be used to make Amazon +// Web Services requests. type GetFederationTokenOutput struct { _ struct{} `type:"structure"` @@ -2902,9 +3091,9 @@ type GetSessionTokenInput struct { // The duration, in seconds, that the credentials should remain valid. Acceptable // durations for IAM user sessions range from 900 seconds (15 minutes) to 129,600 // seconds (36 hours), with 43,200 seconds (12 hours) as the default. Sessions - // for AWS account owners are restricted to a maximum of 3,600 seconds (one - // hour). If the duration is longer than one hour, the session for AWS account - // owners defaults to one hour. + // for Amazon Web Services account owners are restricted to a maximum of 3,600 + // seconds (one hour). If the duration is longer than one hour, the session + // for Amazon Web Services account owners defaults to one hour. DurationSeconds *int64 `min:"900" type:"integer"` // The identification number of the MFA device that is associated with the IAM @@ -2912,7 +3101,7 @@ type GetSessionTokenInput struct { // user has a policy that requires MFA authentication. The value is either the // serial number for a hardware device (such as GAHT12345678) or an Amazon Resource // Name (ARN) for a virtual device (such as arn:aws:iam::123456789012:mfa/user). - // You can find the device for an IAM user by going to the AWS Management Console + // You can find the device for an IAM user by going to the Management Console // and viewing the user's security credentials. // // The regex used to validate this parameter is a string of characters consisting @@ -2979,7 +3168,8 @@ func (s *GetSessionTokenInput) SetTokenCode(v string) *GetSessionTokenInput { } // Contains the response to a successful GetSessionToken request, including -// temporary AWS credentials that can be used to make AWS requests. +// temporary Amazon Web Services credentials that can be used to make Amazon +// Web Services requests. type GetSessionTokenOutput struct { _ struct{} `type:"structure"` @@ -3014,8 +3204,8 @@ type PolicyDescriptorType struct { // The Amazon Resource Name (ARN) of the IAM managed policy to use as a session // policy for the role. For more information about ARNs, see Amazon Resource - // Names (ARNs) and AWS Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the AWS General Reference. + // Names (ARNs) and Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) + // in the Amazon Web Services General Reference. Arn *string `locationName:"arn" min:"20" type:"string"` } @@ -3050,9 +3240,9 @@ func (s *PolicyDescriptorType) SetArn(v string) *PolicyDescriptorType { // You can pass custom key-value pair attributes when you assume a role or federate // a user. These are called session tags. You can then use the session tags -// to control access to resources. For more information, see Tagging AWS STS -// Sessions (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) -// in the IAM User Guide. +// to control access to resources. For more information, see Tagging STS Sessions +// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) in +// the IAM User Guide. type Tag struct { _ struct{} `type:"structure"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go index cb1debbaa4..2d98d92353 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/doc.go @@ -3,11 +3,11 @@ // Package sts provides the client and types for making API // requests to AWS Security Token Service. // -// AWS Security Token Service (STS) enables you to request temporary, limited-privilege -// credentials for AWS Identity and Access Management (IAM) users or for users -// that you authenticate (federated users). This guide provides descriptions -// of the STS API. For more information about using this service, see Temporary -// Security Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). +// Security Token Service (STS) enables you to request temporary, limited-privilege +// credentials for Identity and Access Management (IAM) users or for users that +// you authenticate (federated users). This guide provides descriptions of the +// STS API. For more information about using this service, see Temporary Security +// Credentials (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html). // // See https://docs.aws.amazon.com/goto/WebAPI/sts-2011-06-15 for more information on this service. // diff --git a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go index a233f542ef..7897d70c87 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go +++ b/vendor/github.com/aws/aws-sdk-go/service/sts/errors.go @@ -42,8 +42,9 @@ const ( // ErrCodeInvalidIdentityTokenException for service response error code // "InvalidIdentityToken". // - // The web identity token that was passed could not be validated by AWS. Get - // a new identity token from the identity provider and then retry the request. + // The web identity token that was passed could not be validated by Amazon Web + // Services. Get a new identity token from the identity provider and then retry + // the request. ErrCodeInvalidIdentityTokenException = "InvalidIdentityToken" // ErrCodeMalformedPolicyDocumentException for service response error code @@ -57,11 +58,11 @@ const ( // "PackedPolicyTooLarge". // // The request was rejected because the total packed size of the session policies - // and session tags combined was too large. An AWS conversion compresses the - // session policy document, session policy ARNs, and session tags into a packed - // binary format that has a separate limit. The error message indicates by percentage - // how close the policies and tags are to the upper size limit. For more information, - // see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) + // and session tags combined was too large. An Amazon Web Services conversion + // compresses the session policy document, session policy ARNs, and session + // tags into a packed binary format that has a separate limit. The error message + // indicates by percentage how close the policies and tags are to the upper + // size limit. For more information, see Passing Session Tags in STS (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_session-tags.html) // in the IAM User Guide. // // You could receive this error even though you meet other defined session policy @@ -76,7 +77,8 @@ const ( // STS is not activated in the requested region for the account that is being // asked to generate credentials. The account administrator must use the IAM // console to activate STS in that region. For more information, see Activating - // and Deactivating AWS STS in an AWS Region (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) + // and Deactivating Amazon Web Services STS in an Amazon Web Services Region + // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_enable-regions.html) // in the IAM User Guide. ErrCodeRegionDisabledException = "RegionDisabledException" ) diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go new file mode 100644 index 0000000000..70bb981e9b --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.pb.go @@ -0,0 +1,1476 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListDiskLocationsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListDiskLocationsRequest) Reset() { + *x = ListDiskLocationsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskLocationsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskLocationsRequest) ProtoMessage() {} + +func (x *ListDiskLocationsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskLocationsRequest.ProtoReflect.Descriptor instead. +func (*ListDiskLocationsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{0} +} + +type DiskLocation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Adapter string `protobuf:"bytes,1,opt,name=Adapter,proto3" json:"Adapter,omitempty"` + Bus string `protobuf:"bytes,2,opt,name=Bus,proto3" json:"Bus,omitempty"` + Target string `protobuf:"bytes,3,opt,name=Target,proto3" json:"Target,omitempty"` + LUNID string `protobuf:"bytes,4,opt,name=LUNID,proto3" json:"LUNID,omitempty"` +} + +func (x *DiskLocation) Reset() { + *x = DiskLocation{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskLocation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskLocation) ProtoMessage() {} + +func (x *DiskLocation) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskLocation.ProtoReflect.Descriptor instead. +func (*DiskLocation) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *DiskLocation) GetAdapter() string { + if x != nil { + return x.Adapter + } + return "" +} + +func (x *DiskLocation) GetBus() string { + if x != nil { + return x.Bus + } + return "" +} + +func (x *DiskLocation) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +func (x *DiskLocation) GetLUNID() string { + if x != nil { + return x.LUNID + } + return "" +} + +type ListDiskLocationsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map of disk number and associated with each disk device. + DiskLocations map[uint32]*DiskLocation `protobuf:"bytes,1,rep,name=disk_locations,json=diskLocations,proto3" json:"disk_locations,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *ListDiskLocationsResponse) Reset() { + *x = ListDiskLocationsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskLocationsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskLocationsResponse) ProtoMessage() {} + +func (x *ListDiskLocationsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskLocationsResponse.ProtoReflect.Descriptor instead. +func (*ListDiskLocationsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *ListDiskLocationsResponse) GetDiskLocations() map[uint32]*DiskLocation { + if x != nil { + return x.DiskLocations + } + return nil +} + +type PartitionDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk to partition. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *PartitionDiskRequest) Reset() { + *x = PartitionDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartitionDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartitionDiskRequest) ProtoMessage() {} + +func (x *PartitionDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PartitionDiskRequest.ProtoReflect.Descriptor instead. +func (*PartitionDiskRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{3} +} + +func (x *PartitionDiskRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type PartitionDiskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PartitionDiskResponse) Reset() { + *x = PartitionDiskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PartitionDiskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PartitionDiskResponse) ProtoMessage() {} + +func (x *PartitionDiskResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PartitionDiskResponse.ProtoReflect.Descriptor instead. +func (*PartitionDiskResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{4} +} + +type RescanRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RescanRequest) Reset() { + *x = RescanRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RescanRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RescanRequest) ProtoMessage() {} + +func (x *RescanRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RescanRequest.ProtoReflect.Descriptor instead. +func (*RescanRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{5} +} + +type RescanResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RescanResponse) Reset() { + *x = RescanResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RescanResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RescanResponse) ProtoMessage() {} + +func (x *RescanResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RescanResponse.ProtoReflect.Descriptor instead. +func (*RescanResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{6} +} + +type ListDiskIDsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListDiskIDsRequest) Reset() { + *x = ListDiskIDsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskIDsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskIDsRequest) ProtoMessage() {} + +func (x *ListDiskIDsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskIDsRequest.ProtoReflect.Descriptor instead. +func (*ListDiskIDsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{7} +} + +type DiskIDs struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The disk page83 id. + Page83 string `protobuf:"bytes,1,opt,name=page83,proto3" json:"page83,omitempty"` + // The disk serial number. + SerialNumber string `protobuf:"bytes,2,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` +} + +func (x *DiskIDs) Reset() { + *x = DiskIDs{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DiskIDs) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DiskIDs) ProtoMessage() {} + +func (x *DiskIDs) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DiskIDs.ProtoReflect.Descriptor instead. +func (*DiskIDs) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *DiskIDs) GetPage83() string { + if x != nil { + return x.Page83 + } + return "" +} + +func (x *DiskIDs) GetSerialNumber() string { + if x != nil { + return x.SerialNumber + } + return "" +} + +type ListDiskIDsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Map of disk numbers and disk identifiers associated with each disk device. + DiskIDs map[uint32]*DiskIDs `protobuf:"bytes,1,rep,name=diskIDs,proto3" json:"diskIDs,omitempty" protobuf_key:"varint,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // the case is intentional for protoc to generate the field as DiskIDs +} + +func (x *ListDiskIDsResponse) Reset() { + *x = ListDiskIDsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListDiskIDsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListDiskIDsResponse) ProtoMessage() {} + +func (x *ListDiskIDsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListDiskIDsResponse.ProtoReflect.Descriptor instead. +func (*ListDiskIDsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *ListDiskIDsResponse) GetDiskIDs() map[uint32]*DiskIDs { + if x != nil { + return x.DiskIDs + } + return nil +} + +type GetDiskStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk to get the stats from. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *GetDiskStatsRequest) Reset() { + *x = GetDiskStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStatsRequest) ProtoMessage() {} + +func (x *GetDiskStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStatsRequest.ProtoReflect.Descriptor instead. +func (*GetDiskStatsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{10} +} + +func (x *GetDiskStatsRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type GetDiskStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total size of the volume. + TotalBytes int64 `protobuf:"varint,1,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` +} + +func (x *GetDiskStatsResponse) Reset() { + *x = GetDiskStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStatsResponse) ProtoMessage() {} + +func (x *GetDiskStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStatsResponse.ProtoReflect.Descriptor instead. +func (*GetDiskStatsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{11} +} + +func (x *GetDiskStatsResponse) GetTotalBytes() int64 { + if x != nil { + return x.TotalBytes + } + return 0 +} + +type SetDiskStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` + // Online state to set for the disk. true for online, false for offline. + IsOnline bool `protobuf:"varint,2,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` +} + +func (x *SetDiskStateRequest) Reset() { + *x = SetDiskStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetDiskStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDiskStateRequest) ProtoMessage() {} + +func (x *SetDiskStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDiskStateRequest.ProtoReflect.Descriptor instead. +func (*SetDiskStateRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{12} +} + +func (x *SetDiskStateRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +func (x *SetDiskStateRequest) GetIsOnline() bool { + if x != nil { + return x.IsOnline + } + return false +} + +type SetDiskStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SetDiskStateResponse) Reset() { + *x = SetDiskStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetDiskStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetDiskStateResponse) ProtoMessage() {} + +func (x *SetDiskStateResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetDiskStateResponse.ProtoReflect.Descriptor instead. +func (*SetDiskStateResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{13} +} + +type GetDiskStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *GetDiskStateRequest) Reset() { + *x = GetDiskStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStateRequest) ProtoMessage() {} + +func (x *GetDiskStateRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStateRequest.ProtoReflect.Descriptor instead. +func (*GetDiskStateRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetDiskStateRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type GetDiskStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Online state of the disk. true for online, false for offline. + IsOnline bool `protobuf:"varint,1,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"` +} + +func (x *GetDiskStateResponse) Reset() { + *x = GetDiskStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskStateResponse) ProtoMessage() {} + +func (x *GetDiskStateResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskStateResponse.ProtoReflect.Descriptor instead. +func (*GetDiskStateResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP(), []int{15} +} + +func (x *GetDiskStateResponse) GetIsOnline() bool { + if x != nil { + return x.IsOnline + } + return false +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x68, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x41, 0x64, 0x61, 0x70, 0x74, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, + 0x42, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x42, 0x75, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x4c, 0x55, 0x4e, 0x49, 0x44, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4c, 0x55, 0x4e, 0x49, 0x44, 0x22, 0xc8, 0x01, 0x0a, + 0x19, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x0e, 0x64, 0x69, + 0x73, 0x6b, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x64, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x1a, 0x52, 0x0a, 0x12, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x31, 0x2e, + 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x37, 0x0a, 0x14, 0x50, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0x17, 0x0a, 0x15, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x65, 0x73, + 0x63, 0x61, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x52, 0x65, + 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x14, 0x0a, 0x12, + 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x46, 0x0a, 0x07, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x12, 0x16, 0x0a, + 0x06, 0x70, 0x61, 0x67, 0x65, 0x38, 0x33, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, + 0x61, 0x67, 0x65, 0x38, 0x33, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x4c, + 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, + 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x69, 0x73, + 0x6b, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x64, 0x69, 0x73, 0x6b, 0x49, + 0x44, 0x73, 0x1a, 0x47, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x45, 0x6e, 0x74, + 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x03, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x36, 0x0a, 0x13, 0x47, + 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x22, 0x37, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x53, 0x0a, 0x13, + 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x6f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, + 0x65, 0x22, 0x16, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x13, 0x47, 0x65, 0x74, + 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x22, 0x33, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, + 0x6f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, + 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x32, 0xe6, 0x03, 0x0a, 0x04, 0x44, 0x69, 0x73, 0x6b, 0x12, + 0x52, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x44, 0x69, 0x73, 0x6b, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x31, 0x0a, 0x06, 0x52, + 0x65, 0x73, 0x63, 0x61, 0x6e, 0x12, 0x11, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x63, 0x61, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x73, 0x63, 0x61, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x40, + 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x12, 0x16, 0x2e, + 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x44, + 0x69, 0x73, 0x6b, 0x49, 0x44, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, + 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x69, + 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, + 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, + 0x38, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, + 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, + 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x64, 0x69, 0x73, 0x6b, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 18) +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_goTypes = []interface{}{ + (*ListDiskLocationsRequest)(nil), // 0: v1.ListDiskLocationsRequest + (*DiskLocation)(nil), // 1: v1.DiskLocation + (*ListDiskLocationsResponse)(nil), // 2: v1.ListDiskLocationsResponse + (*PartitionDiskRequest)(nil), // 3: v1.PartitionDiskRequest + (*PartitionDiskResponse)(nil), // 4: v1.PartitionDiskResponse + (*RescanRequest)(nil), // 5: v1.RescanRequest + (*RescanResponse)(nil), // 6: v1.RescanResponse + (*ListDiskIDsRequest)(nil), // 7: v1.ListDiskIDsRequest + (*DiskIDs)(nil), // 8: v1.DiskIDs + (*ListDiskIDsResponse)(nil), // 9: v1.ListDiskIDsResponse + (*GetDiskStatsRequest)(nil), // 10: v1.GetDiskStatsRequest + (*GetDiskStatsResponse)(nil), // 11: v1.GetDiskStatsResponse + (*SetDiskStateRequest)(nil), // 12: v1.SetDiskStateRequest + (*SetDiskStateResponse)(nil), // 13: v1.SetDiskStateResponse + (*GetDiskStateRequest)(nil), // 14: v1.GetDiskStateRequest + (*GetDiskStateResponse)(nil), // 15: v1.GetDiskStateResponse + nil, // 16: v1.ListDiskLocationsResponse.DiskLocationsEntry + nil, // 17: v1.ListDiskIDsResponse.DiskIDsEntry +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_depIdxs = []int32{ + 16, // 0: v1.ListDiskLocationsResponse.disk_locations:type_name -> v1.ListDiskLocationsResponse.DiskLocationsEntry + 17, // 1: v1.ListDiskIDsResponse.diskIDs:type_name -> v1.ListDiskIDsResponse.DiskIDsEntry + 1, // 2: v1.ListDiskLocationsResponse.DiskLocationsEntry.value:type_name -> v1.DiskLocation + 8, // 3: v1.ListDiskIDsResponse.DiskIDsEntry.value:type_name -> v1.DiskIDs + 0, // 4: v1.Disk.ListDiskLocations:input_type -> v1.ListDiskLocationsRequest + 3, // 5: v1.Disk.PartitionDisk:input_type -> v1.PartitionDiskRequest + 5, // 6: v1.Disk.Rescan:input_type -> v1.RescanRequest + 7, // 7: v1.Disk.ListDiskIDs:input_type -> v1.ListDiskIDsRequest + 10, // 8: v1.Disk.GetDiskStats:input_type -> v1.GetDiskStatsRequest + 12, // 9: v1.Disk.SetDiskState:input_type -> v1.SetDiskStateRequest + 14, // 10: v1.Disk.GetDiskState:input_type -> v1.GetDiskStateRequest + 2, // 11: v1.Disk.ListDiskLocations:output_type -> v1.ListDiskLocationsResponse + 4, // 12: v1.Disk.PartitionDisk:output_type -> v1.PartitionDiskResponse + 6, // 13: v1.Disk.Rescan:output_type -> v1.RescanResponse + 9, // 14: v1.Disk.ListDiskIDs:output_type -> v1.ListDiskIDsResponse + 11, // 15: v1.Disk.GetDiskStats:output_type -> v1.GetDiskStatsResponse + 13, // 16: v1.Disk.SetDiskState:output_type -> v1.SetDiskStateResponse + 15, // 17: v1.Disk.GetDiskState:output_type -> v1.GetDiskStateResponse + 11, // [11:18] is the sub-list for method output_type + 4, // [4:11] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskLocationsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskLocation); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskLocationsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartitionDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PartitionDiskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RescanRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RescanResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskIDsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DiskIDs); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListDiskIDsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetDiskStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetDiskStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskStateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 18, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_disk_v1_api_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// DiskClient is the client API for Disk service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type DiskClient interface { + // ListDiskLocations returns locations of all + // disk devices enumerated by the host. + ListDiskLocations(ctx context.Context, in *ListDiskLocationsRequest, opts ...grpc.CallOption) (*ListDiskLocationsResponse, error) + // PartitionDisk initializes and partitions a disk device with the GPT partition style + // (if the disk has not been partitioned already) and returns the resulting volume device ID. + PartitionDisk(ctx context.Context, in *PartitionDiskRequest, opts ...grpc.CallOption) (*PartitionDiskResponse, error) + // Rescan refreshes the host's storage cache. + Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) + // ListDiskIDs returns a map of DiskID objects where the key is the disk number. + ListDiskIDs(ctx context.Context, in *ListDiskIDsRequest, opts ...grpc.CallOption) (*ListDiskIDsResponse, error) + // GetDiskStats returns the stats of a disk (currently it returns the disk size). + GetDiskStats(ctx context.Context, in *GetDiskStatsRequest, opts ...grpc.CallOption) (*GetDiskStatsResponse, error) + // SetDiskState sets the offline/online state of a disk. + SetDiskState(ctx context.Context, in *SetDiskStateRequest, opts ...grpc.CallOption) (*SetDiskStateResponse, error) + // GetDiskState gets the offline/online state of a disk. + GetDiskState(ctx context.Context, in *GetDiskStateRequest, opts ...grpc.CallOption) (*GetDiskStateResponse, error) +} + +type diskClient struct { + cc grpc.ClientConnInterface +} + +func NewDiskClient(cc grpc.ClientConnInterface) DiskClient { + return &diskClient{cc} +} + +func (c *diskClient) ListDiskLocations(ctx context.Context, in *ListDiskLocationsRequest, opts ...grpc.CallOption) (*ListDiskLocationsResponse, error) { + out := new(ListDiskLocationsResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/ListDiskLocations", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) PartitionDisk(ctx context.Context, in *PartitionDiskRequest, opts ...grpc.CallOption) (*PartitionDiskResponse, error) { + out := new(PartitionDiskResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/PartitionDisk", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) { + out := new(RescanResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/Rescan", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) ListDiskIDs(ctx context.Context, in *ListDiskIDsRequest, opts ...grpc.CallOption) (*ListDiskIDsResponse, error) { + out := new(ListDiskIDsResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/ListDiskIDs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) GetDiskStats(ctx context.Context, in *GetDiskStatsRequest, opts ...grpc.CallOption) (*GetDiskStatsResponse, error) { + out := new(GetDiskStatsResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/GetDiskStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) SetDiskState(ctx context.Context, in *SetDiskStateRequest, opts ...grpc.CallOption) (*SetDiskStateResponse, error) { + out := new(SetDiskStateResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/SetDiskState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *diskClient) GetDiskState(ctx context.Context, in *GetDiskStateRequest, opts ...grpc.CallOption) (*GetDiskStateResponse, error) { + out := new(GetDiskStateResponse) + err := c.cc.Invoke(ctx, "/v1.Disk/GetDiskState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// DiskServer is the server API for Disk service. +type DiskServer interface { + // ListDiskLocations returns locations of all + // disk devices enumerated by the host. + ListDiskLocations(context.Context, *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) + // PartitionDisk initializes and partitions a disk device with the GPT partition style + // (if the disk has not been partitioned already) and returns the resulting volume device ID. + PartitionDisk(context.Context, *PartitionDiskRequest) (*PartitionDiskResponse, error) + // Rescan refreshes the host's storage cache. + Rescan(context.Context, *RescanRequest) (*RescanResponse, error) + // ListDiskIDs returns a map of DiskID objects where the key is the disk number. + ListDiskIDs(context.Context, *ListDiskIDsRequest) (*ListDiskIDsResponse, error) + // GetDiskStats returns the stats of a disk (currently it returns the disk size). + GetDiskStats(context.Context, *GetDiskStatsRequest) (*GetDiskStatsResponse, error) + // SetDiskState sets the offline/online state of a disk. + SetDiskState(context.Context, *SetDiskStateRequest) (*SetDiskStateResponse, error) + // GetDiskState gets the offline/online state of a disk. + GetDiskState(context.Context, *GetDiskStateRequest) (*GetDiskStateResponse, error) +} + +// UnimplementedDiskServer can be embedded to have forward compatible implementations. +type UnimplementedDiskServer struct { +} + +func (*UnimplementedDiskServer) ListDiskLocations(context.Context, *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDiskLocations not implemented") +} +func (*UnimplementedDiskServer) PartitionDisk(context.Context, *PartitionDiskRequest) (*PartitionDiskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PartitionDisk not implemented") +} +func (*UnimplementedDiskServer) Rescan(context.Context, *RescanRequest) (*RescanResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rescan not implemented") +} +func (*UnimplementedDiskServer) ListDiskIDs(context.Context, *ListDiskIDsRequest) (*ListDiskIDsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListDiskIDs not implemented") +} +func (*UnimplementedDiskServer) GetDiskStats(context.Context, *GetDiskStatsRequest) (*GetDiskStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDiskStats not implemented") +} +func (*UnimplementedDiskServer) SetDiskState(context.Context, *SetDiskStateRequest) (*SetDiskStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetDiskState not implemented") +} +func (*UnimplementedDiskServer) GetDiskState(context.Context, *GetDiskStateRequest) (*GetDiskStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDiskState not implemented") +} + +func RegisterDiskServer(s *grpc.Server, srv DiskServer) { + s.RegisterService(&_Disk_serviceDesc, srv) +} + +func _Disk_ListDiskLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDiskLocationsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).ListDiskLocations(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/ListDiskLocations", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).ListDiskLocations(ctx, req.(*ListDiskLocationsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_PartitionDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PartitionDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).PartitionDisk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/PartitionDisk", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).PartitionDisk(ctx, req.(*PartitionDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_Rescan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RescanRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).Rescan(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/Rescan", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).Rescan(ctx, req.(*RescanRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_ListDiskIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListDiskIDsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).ListDiskIDs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/ListDiskIDs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).ListDiskIDs(ctx, req.(*ListDiskIDsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_GetDiskStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).GetDiskStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/GetDiskStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).GetDiskStats(ctx, req.(*GetDiskStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_SetDiskState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetDiskStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).SetDiskState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/SetDiskState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).SetDiskState(ctx, req.(*SetDiskStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Disk_GetDiskState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(DiskServer).GetDiskState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Disk/GetDiskState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(DiskServer).GetDiskState(ctx, req.(*GetDiskStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Disk_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Disk", + HandlerType: (*DiskServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListDiskLocations", + Handler: _Disk_ListDiskLocations_Handler, + }, + { + MethodName: "PartitionDisk", + Handler: _Disk_PartitionDisk_Handler, + }, + { + MethodName: "Rescan", + Handler: _Disk_Rescan_Handler, + }, + { + MethodName: "ListDiskIDs", + Handler: _Disk_ListDiskIDs_Handler, + }, + { + MethodName: "GetDiskStats", + Handler: _Disk_GetDiskStats_Handler, + }, + { + MethodName: "SetDiskState", + Handler: _Disk_SetDiskState_Handler, + }, + { + MethodName: "GetDiskState", + Handler: _Disk_GetDiskState_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto new file mode 100644 index 0000000000..f73f412d6e --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1/api.proto @@ -0,0 +1,111 @@ +syntax = "proto3"; + +package v1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1"; + +service Disk { + // ListDiskLocations returns locations of all + // disk devices enumerated by the host. + rpc ListDiskLocations(ListDiskLocationsRequest) returns (ListDiskLocationsResponse) {} + + // PartitionDisk initializes and partitions a disk device with the GPT partition style + // (if the disk has not been partitioned already) and returns the resulting volume device ID. + rpc PartitionDisk(PartitionDiskRequest) returns (PartitionDiskResponse) {} + + // Rescan refreshes the host's storage cache. + rpc Rescan(RescanRequest) returns (RescanResponse) {} + + // ListDiskIDs returns a map of DiskID objects where the key is the disk number. + rpc ListDiskIDs(ListDiskIDsRequest) returns (ListDiskIDsResponse) {} + + // GetDiskStats returns the stats of a disk (currently it returns the disk size). + rpc GetDiskStats(GetDiskStatsRequest) returns (GetDiskStatsResponse) {} + + // SetDiskState sets the offline/online state of a disk. + rpc SetDiskState(SetDiskStateRequest) returns (SetDiskStateResponse) {} + + // GetDiskState gets the offline/online state of a disk. + rpc GetDiskState(GetDiskStateRequest) returns (GetDiskStateResponse) {} +} + +message ListDiskLocationsRequest { + // Intentionally empty. +} + +message DiskLocation { + string Adapter = 1; + string Bus = 2; + string Target = 3; + string LUNID = 4; +} + +message ListDiskLocationsResponse { + // Map of disk number and associated with each disk device. + map disk_locations = 1; +} + +message PartitionDiskRequest { + // Disk device number of the disk to partition. + uint32 disk_number = 1; +} + +message PartitionDiskResponse { + // Intentionally empty. +} + +message RescanRequest { + // Intentionally empty. +} + +message RescanResponse { + // Intentionally empty. +} + +message ListDiskIDsRequest { + // Intentionally empty. +} + +message DiskIDs { + // The disk page83 id. + string page83 = 1; + // The disk serial number. + string serial_number = 2; +} + +message ListDiskIDsResponse { + // Map of disk numbers and disk identifiers associated with each disk device. + map diskIDs = 1; // the case is intentional for protoc to generate the field as DiskIDs +} + +message GetDiskStatsRequest { + // Disk device number of the disk to get the stats from. + uint32 disk_number = 1; +} + +message GetDiskStatsResponse { + // Total size of the volume. + int64 total_bytes = 1; +} + +message SetDiskStateRequest { + // Disk device number of the disk. + uint32 disk_number = 1; + + // Online state to set for the disk. true for online, false for offline. + bool is_online = 2; +} + +message SetDiskStateResponse { + // Intentionally empty. +} + +message GetDiskStateRequest { + // Disk device number of the disk. + uint32 disk_number = 1; +} + +message GetDiskStateResponse { + // Online state of the disk. true for online, false for offline. + bool is_online = 1; +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.pb.go deleted file mode 100644 index 27324f1ead..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.pb.go +++ /dev/null @@ -1,1028 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.proto - -package v1beta2 - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type ListDiskLocationsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListDiskLocationsRequest) Reset() { *m = ListDiskLocationsRequest{} } -func (m *ListDiskLocationsRequest) String() string { return proto.CompactTextString(m) } -func (*ListDiskLocationsRequest) ProtoMessage() {} -func (*ListDiskLocationsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{0} -} - -func (m *ListDiskLocationsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListDiskLocationsRequest.Unmarshal(m, b) -} -func (m *ListDiskLocationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListDiskLocationsRequest.Marshal(b, m, deterministic) -} -func (m *ListDiskLocationsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListDiskLocationsRequest.Merge(m, src) -} -func (m *ListDiskLocationsRequest) XXX_Size() int { - return xxx_messageInfo_ListDiskLocationsRequest.Size(m) -} -func (m *ListDiskLocationsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListDiskLocationsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListDiskLocationsRequest proto.InternalMessageInfo - -type DiskLocation struct { - Adapter string `protobuf:"bytes,1,opt,name=Adapter,proto3" json:"Adapter,omitempty"` - Bus string `protobuf:"bytes,2,opt,name=Bus,proto3" json:"Bus,omitempty"` - Target string `protobuf:"bytes,3,opt,name=Target,proto3" json:"Target,omitempty"` - LUNID string `protobuf:"bytes,4,opt,name=LUNID,proto3" json:"LUNID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DiskLocation) Reset() { *m = DiskLocation{} } -func (m *DiskLocation) String() string { return proto.CompactTextString(m) } -func (*DiskLocation) ProtoMessage() {} -func (*DiskLocation) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{1} -} - -func (m *DiskLocation) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DiskLocation.Unmarshal(m, b) -} -func (m *DiskLocation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DiskLocation.Marshal(b, m, deterministic) -} -func (m *DiskLocation) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiskLocation.Merge(m, src) -} -func (m *DiskLocation) XXX_Size() int { - return xxx_messageInfo_DiskLocation.Size(m) -} -func (m *DiskLocation) XXX_DiscardUnknown() { - xxx_messageInfo_DiskLocation.DiscardUnknown(m) -} - -var xxx_messageInfo_DiskLocation proto.InternalMessageInfo - -func (m *DiskLocation) GetAdapter() string { - if m != nil { - return m.Adapter - } - return "" -} - -func (m *DiskLocation) GetBus() string { - if m != nil { - return m.Bus - } - return "" -} - -func (m *DiskLocation) GetTarget() string { - if m != nil { - return m.Target - } - return "" -} - -func (m *DiskLocation) GetLUNID() string { - if m != nil { - return m.LUNID - } - return "" -} - -type ListDiskLocationsResponse struct { - // Map of disk device IDs and associated with each disk device - DiskLocations map[string]*DiskLocation `protobuf:"bytes,1,rep,name=disk_locations,json=diskLocations,proto3" json:"disk_locations,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListDiskLocationsResponse) Reset() { *m = ListDiskLocationsResponse{} } -func (m *ListDiskLocationsResponse) String() string { return proto.CompactTextString(m) } -func (*ListDiskLocationsResponse) ProtoMessage() {} -func (*ListDiskLocationsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{2} -} - -func (m *ListDiskLocationsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListDiskLocationsResponse.Unmarshal(m, b) -} -func (m *ListDiskLocationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListDiskLocationsResponse.Marshal(b, m, deterministic) -} -func (m *ListDiskLocationsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListDiskLocationsResponse.Merge(m, src) -} -func (m *ListDiskLocationsResponse) XXX_Size() int { - return xxx_messageInfo_ListDiskLocationsResponse.Size(m) -} -func (m *ListDiskLocationsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListDiskLocationsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListDiskLocationsResponse proto.InternalMessageInfo - -func (m *ListDiskLocationsResponse) GetDiskLocations() map[string]*DiskLocation { - if m != nil { - return m.DiskLocations - } - return nil -} - -type PartitionDiskRequest struct { - // Disk device ID of the disk to partition - DiskID string `protobuf:"bytes,1,opt,name=diskID,proto3" json:"diskID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PartitionDiskRequest) Reset() { *m = PartitionDiskRequest{} } -func (m *PartitionDiskRequest) String() string { return proto.CompactTextString(m) } -func (*PartitionDiskRequest) ProtoMessage() {} -func (*PartitionDiskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{3} -} - -func (m *PartitionDiskRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PartitionDiskRequest.Unmarshal(m, b) -} -func (m *PartitionDiskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PartitionDiskRequest.Marshal(b, m, deterministic) -} -func (m *PartitionDiskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartitionDiskRequest.Merge(m, src) -} -func (m *PartitionDiskRequest) XXX_Size() int { - return xxx_messageInfo_PartitionDiskRequest.Size(m) -} -func (m *PartitionDiskRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PartitionDiskRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PartitionDiskRequest proto.InternalMessageInfo - -func (m *PartitionDiskRequest) GetDiskID() string { - if m != nil { - return m.DiskID - } - return "" -} - -type PartitionDiskResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PartitionDiskResponse) Reset() { *m = PartitionDiskResponse{} } -func (m *PartitionDiskResponse) String() string { return proto.CompactTextString(m) } -func (*PartitionDiskResponse) ProtoMessage() {} -func (*PartitionDiskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{4} -} - -func (m *PartitionDiskResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PartitionDiskResponse.Unmarshal(m, b) -} -func (m *PartitionDiskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PartitionDiskResponse.Marshal(b, m, deterministic) -} -func (m *PartitionDiskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PartitionDiskResponse.Merge(m, src) -} -func (m *PartitionDiskResponse) XXX_Size() int { - return xxx_messageInfo_PartitionDiskResponse.Size(m) -} -func (m *PartitionDiskResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PartitionDiskResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PartitionDiskResponse proto.InternalMessageInfo - -type RescanRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RescanRequest) Reset() { *m = RescanRequest{} } -func (m *RescanRequest) String() string { return proto.CompactTextString(m) } -func (*RescanRequest) ProtoMessage() {} -func (*RescanRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{5} -} - -func (m *RescanRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RescanRequest.Unmarshal(m, b) -} -func (m *RescanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RescanRequest.Marshal(b, m, deterministic) -} -func (m *RescanRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RescanRequest.Merge(m, src) -} -func (m *RescanRequest) XXX_Size() int { - return xxx_messageInfo_RescanRequest.Size(m) -} -func (m *RescanRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RescanRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RescanRequest proto.InternalMessageInfo - -type RescanResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RescanResponse) Reset() { *m = RescanResponse{} } -func (m *RescanResponse) String() string { return proto.CompactTextString(m) } -func (*RescanResponse) ProtoMessage() {} -func (*RescanResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{6} -} - -func (m *RescanResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RescanResponse.Unmarshal(m, b) -} -func (m *RescanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RescanResponse.Marshal(b, m, deterministic) -} -func (m *RescanResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RescanResponse.Merge(m, src) -} -func (m *RescanResponse) XXX_Size() int { - return xxx_messageInfo_RescanResponse.Size(m) -} -func (m *RescanResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RescanResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RescanResponse proto.InternalMessageInfo - -type ListDiskIDsRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListDiskIDsRequest) Reset() { *m = ListDiskIDsRequest{} } -func (m *ListDiskIDsRequest) String() string { return proto.CompactTextString(m) } -func (*ListDiskIDsRequest) ProtoMessage() {} -func (*ListDiskIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{7} -} - -func (m *ListDiskIDsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListDiskIDsRequest.Unmarshal(m, b) -} -func (m *ListDiskIDsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListDiskIDsRequest.Marshal(b, m, deterministic) -} -func (m *ListDiskIDsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListDiskIDsRequest.Merge(m, src) -} -func (m *ListDiskIDsRequest) XXX_Size() int { - return xxx_messageInfo_ListDiskIDsRequest.Size(m) -} -func (m *ListDiskIDsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListDiskIDsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListDiskIDsRequest proto.InternalMessageInfo - -type DiskIDs struct { - // Map of Disk ID types and Disk ID values - Identifiers map[string]string `protobuf:"bytes,1,rep,name=identifiers,proto3" json:"identifiers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DiskIDs) Reset() { *m = DiskIDs{} } -func (m *DiskIDs) String() string { return proto.CompactTextString(m) } -func (*DiskIDs) ProtoMessage() {} -func (*DiskIDs) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{8} -} - -func (m *DiskIDs) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DiskIDs.Unmarshal(m, b) -} -func (m *DiskIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DiskIDs.Marshal(b, m, deterministic) -} -func (m *DiskIDs) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiskIDs.Merge(m, src) -} -func (m *DiskIDs) XXX_Size() int { - return xxx_messageInfo_DiskIDs.Size(m) -} -func (m *DiskIDs) XXX_DiscardUnknown() { - xxx_messageInfo_DiskIDs.DiscardUnknown(m) -} - -var xxx_messageInfo_DiskIDs proto.InternalMessageInfo - -func (m *DiskIDs) GetIdentifiers() map[string]string { - if m != nil { - return m.Identifiers - } - return nil -} - -type ListDiskIDsResponse struct { - // Map of disk device numbers and IDs associated with each disk device - DiskIDs map[string]*DiskIDs `protobuf:"bytes,1,rep,name=diskIDs,proto3" json:"diskIDs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListDiskIDsResponse) Reset() { *m = ListDiskIDsResponse{} } -func (m *ListDiskIDsResponse) String() string { return proto.CompactTextString(m) } -func (*ListDiskIDsResponse) ProtoMessage() {} -func (*ListDiskIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{9} -} - -func (m *ListDiskIDsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListDiskIDsResponse.Unmarshal(m, b) -} -func (m *ListDiskIDsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListDiskIDsResponse.Marshal(b, m, deterministic) -} -func (m *ListDiskIDsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListDiskIDsResponse.Merge(m, src) -} -func (m *ListDiskIDsResponse) XXX_Size() int { - return xxx_messageInfo_ListDiskIDsResponse.Size(m) -} -func (m *ListDiskIDsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListDiskIDsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListDiskIDsResponse proto.InternalMessageInfo - -func (m *ListDiskIDsResponse) GetDiskIDs() map[string]*DiskIDs { - if m != nil { - return m.DiskIDs - } - return nil -} - -type DiskStatsRequest struct { - // Disk device ID of the disk to get the size from - DiskID string `protobuf:"bytes,1,opt,name=diskID,proto3" json:"diskID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DiskStatsRequest) Reset() { *m = DiskStatsRequest{} } -func (m *DiskStatsRequest) String() string { return proto.CompactTextString(m) } -func (*DiskStatsRequest) ProtoMessage() {} -func (*DiskStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{10} -} - -func (m *DiskStatsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DiskStatsRequest.Unmarshal(m, b) -} -func (m *DiskStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DiskStatsRequest.Marshal(b, m, deterministic) -} -func (m *DiskStatsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiskStatsRequest.Merge(m, src) -} -func (m *DiskStatsRequest) XXX_Size() int { - return xxx_messageInfo_DiskStatsRequest.Size(m) -} -func (m *DiskStatsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DiskStatsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DiskStatsRequest proto.InternalMessageInfo - -func (m *DiskStatsRequest) GetDiskID() string { - if m != nil { - return m.DiskID - } - return "" -} - -type DiskStatsResponse struct { - //Total size of the volume - DiskSize int64 `protobuf:"varint,1,opt,name=diskSize,proto3" json:"diskSize,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DiskStatsResponse) Reset() { *m = DiskStatsResponse{} } -func (m *DiskStatsResponse) String() string { return proto.CompactTextString(m) } -func (*DiskStatsResponse) ProtoMessage() {} -func (*DiskStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{11} -} - -func (m *DiskStatsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DiskStatsResponse.Unmarshal(m, b) -} -func (m *DiskStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DiskStatsResponse.Marshal(b, m, deterministic) -} -func (m *DiskStatsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DiskStatsResponse.Merge(m, src) -} -func (m *DiskStatsResponse) XXX_Size() int { - return xxx_messageInfo_DiskStatsResponse.Size(m) -} -func (m *DiskStatsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DiskStatsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DiskStatsResponse proto.InternalMessageInfo - -func (m *DiskStatsResponse) GetDiskSize() int64 { - if m != nil { - return m.DiskSize - } - return 0 -} - -type SetAttachStateRequest struct { - // Disk device ID (number) of the disk which state will change - DiskID string `protobuf:"bytes,1,opt,name=diskID,proto3" json:"diskID,omitempty"` - // Online state to set for the disk. true for online, false for offline - IsOnline bool `protobuf:"varint,2,opt,name=isOnline,proto3" json:"isOnline,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetAttachStateRequest) Reset() { *m = SetAttachStateRequest{} } -func (m *SetAttachStateRequest) String() string { return proto.CompactTextString(m) } -func (*SetAttachStateRequest) ProtoMessage() {} -func (*SetAttachStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{12} -} - -func (m *SetAttachStateRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetAttachStateRequest.Unmarshal(m, b) -} -func (m *SetAttachStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetAttachStateRequest.Marshal(b, m, deterministic) -} -func (m *SetAttachStateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetAttachStateRequest.Merge(m, src) -} -func (m *SetAttachStateRequest) XXX_Size() int { - return xxx_messageInfo_SetAttachStateRequest.Size(m) -} -func (m *SetAttachStateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetAttachStateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SetAttachStateRequest proto.InternalMessageInfo - -func (m *SetAttachStateRequest) GetDiskID() string { - if m != nil { - return m.DiskID - } - return "" -} - -func (m *SetAttachStateRequest) GetIsOnline() bool { - if m != nil { - return m.IsOnline - } - return false -} - -type SetAttachStateResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetAttachStateResponse) Reset() { *m = SetAttachStateResponse{} } -func (m *SetAttachStateResponse) String() string { return proto.CompactTextString(m) } -func (*SetAttachStateResponse) ProtoMessage() {} -func (*SetAttachStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{13} -} - -func (m *SetAttachStateResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetAttachStateResponse.Unmarshal(m, b) -} -func (m *SetAttachStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetAttachStateResponse.Marshal(b, m, deterministic) -} -func (m *SetAttachStateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetAttachStateResponse.Merge(m, src) -} -func (m *SetAttachStateResponse) XXX_Size() int { - return xxx_messageInfo_SetAttachStateResponse.Size(m) -} -func (m *SetAttachStateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SetAttachStateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SetAttachStateResponse proto.InternalMessageInfo - -type GetAttachStateRequest struct { - // Disk device ID (number) of the disk - DiskID string `protobuf:"bytes,1,opt,name=diskID,proto3" json:"diskID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAttachStateRequest) Reset() { *m = GetAttachStateRequest{} } -func (m *GetAttachStateRequest) String() string { return proto.CompactTextString(m) } -func (*GetAttachStateRequest) ProtoMessage() {} -func (*GetAttachStateRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{14} -} - -func (m *GetAttachStateRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAttachStateRequest.Unmarshal(m, b) -} -func (m *GetAttachStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAttachStateRequest.Marshal(b, m, deterministic) -} -func (m *GetAttachStateRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAttachStateRequest.Merge(m, src) -} -func (m *GetAttachStateRequest) XXX_Size() int { - return xxx_messageInfo_GetAttachStateRequest.Size(m) -} -func (m *GetAttachStateRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAttachStateRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAttachStateRequest proto.InternalMessageInfo - -func (m *GetAttachStateRequest) GetDiskID() string { - if m != nil { - return m.DiskID - } - return "" -} - -type GetAttachStateResponse struct { - // Online state of the disk. true for online, false for offline - IsOnline bool `protobuf:"varint,1,opt,name=isOnline,proto3" json:"isOnline,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAttachStateResponse) Reset() { *m = GetAttachStateResponse{} } -func (m *GetAttachStateResponse) String() string { return proto.CompactTextString(m) } -func (*GetAttachStateResponse) ProtoMessage() {} -func (*GetAttachStateResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b8298108b4474af1, []int{15} -} - -func (m *GetAttachStateResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAttachStateResponse.Unmarshal(m, b) -} -func (m *GetAttachStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAttachStateResponse.Marshal(b, m, deterministic) -} -func (m *GetAttachStateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAttachStateResponse.Merge(m, src) -} -func (m *GetAttachStateResponse) XXX_Size() int { - return xxx_messageInfo_GetAttachStateResponse.Size(m) -} -func (m *GetAttachStateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAttachStateResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAttachStateResponse proto.InternalMessageInfo - -func (m *GetAttachStateResponse) GetIsOnline() bool { - if m != nil { - return m.IsOnline - } - return false -} - -func init() { - proto.RegisterType((*ListDiskLocationsRequest)(nil), "v1beta2.ListDiskLocationsRequest") - proto.RegisterType((*DiskLocation)(nil), "v1beta2.DiskLocation") - proto.RegisterType((*ListDiskLocationsResponse)(nil), "v1beta2.ListDiskLocationsResponse") - proto.RegisterMapType((map[string]*DiskLocation)(nil), "v1beta2.ListDiskLocationsResponse.DiskLocationsEntry") - proto.RegisterType((*PartitionDiskRequest)(nil), "v1beta2.PartitionDiskRequest") - proto.RegisterType((*PartitionDiskResponse)(nil), "v1beta2.PartitionDiskResponse") - proto.RegisterType((*RescanRequest)(nil), "v1beta2.RescanRequest") - proto.RegisterType((*RescanResponse)(nil), "v1beta2.RescanResponse") - proto.RegisterType((*ListDiskIDsRequest)(nil), "v1beta2.ListDiskIDsRequest") - proto.RegisterType((*DiskIDs)(nil), "v1beta2.DiskIDs") - proto.RegisterMapType((map[string]string)(nil), "v1beta2.DiskIDs.IdentifiersEntry") - proto.RegisterType((*ListDiskIDsResponse)(nil), "v1beta2.ListDiskIDsResponse") - proto.RegisterMapType((map[string]*DiskIDs)(nil), "v1beta2.ListDiskIDsResponse.DiskIDsEntry") - proto.RegisterType((*DiskStatsRequest)(nil), "v1beta2.DiskStatsRequest") - proto.RegisterType((*DiskStatsResponse)(nil), "v1beta2.DiskStatsResponse") - proto.RegisterType((*SetAttachStateRequest)(nil), "v1beta2.SetAttachStateRequest") - proto.RegisterType((*SetAttachStateResponse)(nil), "v1beta2.SetAttachStateResponse") - proto.RegisterType((*GetAttachStateRequest)(nil), "v1beta2.GetAttachStateRequest") - proto.RegisterType((*GetAttachStateResponse)(nil), "v1beta2.GetAttachStateResponse") -} - -func init() { - proto.RegisterFile("github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.proto", fileDescriptor_b8298108b4474af1) -} - -var fileDescriptor_b8298108b4474af1 = []byte{ - // 647 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xdd, 0x6e, 0xd3, 0x4c, - 0x10, 0xad, 0x9b, 0xb6, 0x69, 0x27, 0x5f, 0xf3, 0xa5, 0x4b, 0x92, 0xba, 0xe6, 0xaf, 0xdd, 0x0b, - 0x54, 0x40, 0xb5, 0x45, 0x00, 0x09, 0x51, 0x81, 0xd4, 0xd6, 0x55, 0x14, 0x88, 0xa0, 0x72, 0x40, - 0x48, 0xa8, 0x12, 0x72, 0x9c, 0xa5, 0x59, 0x25, 0xd8, 0xc1, 0xbb, 0xa9, 0x08, 0x0f, 0xc1, 0x73, - 0x70, 0xc7, 0xbb, 0xf0, 0x44, 0x68, 0xed, 0xb5, 0xbb, 0x4e, 0x9c, 0x46, 0x88, 0x3b, 0xcf, 0x99, - 0x99, 0xb3, 0x67, 0xfe, 0x64, 0x38, 0xbd, 0xa0, 0xbc, 0x3f, 0xee, 0x9a, 0x5e, 0xf0, 0xc5, 0x1a, - 0x8c, 0xbb, 0x24, 0xf4, 0x09, 0x27, 0xec, 0xc0, 0x63, 0xd4, 0xf2, 0x18, 0x3d, 0x18, 0x85, 0xc1, - 0xb7, 0x89, 0xe5, 0x0d, 0x29, 0xf1, 0xb9, 0xe5, 0x8e, 0xa8, 0xd5, 0xa3, 0x6c, 0x60, 0x5d, 0x3e, - 0xea, 0x12, 0xee, 0x36, 0x04, 0x60, 0x8e, 0xc2, 0x80, 0x07, 0xa8, 0x28, 0x21, 0x6c, 0x80, 0xde, - 0xa6, 0x8c, 0xdb, 0x94, 0x0d, 0xda, 0x81, 0xe7, 0x72, 0x1a, 0xf8, 0xcc, 0x21, 0x5f, 0xc7, 0x84, - 0x71, 0xdc, 0x87, 0xff, 0x54, 0x1c, 0xe9, 0x50, 0x3c, 0xea, 0xb9, 0x23, 0x4e, 0x42, 0x5d, 0xdb, - 0xd5, 0xf6, 0x37, 0x9c, 0xc4, 0x44, 0x15, 0x28, 0x1c, 0x8f, 0x99, 0xbe, 0x1c, 0xa1, 0xe2, 0x13, - 0xd5, 0x61, 0xed, 0x9d, 0x1b, 0x5e, 0x10, 0xae, 0x17, 0x22, 0x50, 0x5a, 0xa8, 0x0a, 0xab, 0xed, - 0xf7, 0x6f, 0x5a, 0xb6, 0xbe, 0x12, 0xc1, 0xb1, 0x81, 0x7f, 0x6b, 0xb0, 0x93, 0x23, 0x83, 0x8d, - 0x02, 0x9f, 0x11, 0x74, 0x0e, 0x65, 0x51, 0xc6, 0xa7, 0x61, 0xe2, 0xd1, 0xb5, 0xdd, 0xc2, 0x7e, - 0xa9, 0xf1, 0xd4, 0x94, 0x55, 0x98, 0x73, 0x73, 0xcd, 0x0c, 0x7a, 0xea, 0xf3, 0x70, 0xe2, 0x6c, - 0xf6, 0x54, 0xcc, 0xf8, 0x00, 0x68, 0x36, 0x48, 0x54, 0x34, 0x20, 0x13, 0x59, 0xa7, 0xf8, 0x44, - 0x0f, 0x61, 0xf5, 0xd2, 0x1d, 0x8e, 0x49, 0x54, 0x65, 0xa9, 0x51, 0x4b, 0x1f, 0x57, 0xb3, 0x9d, - 0x38, 0xe6, 0xf9, 0xf2, 0x33, 0x0d, 0x9b, 0x50, 0x3d, 0x73, 0x43, 0x4e, 0x05, 0x2e, 0x62, 0x64, - 0x5b, 0x45, 0x6b, 0x84, 0x82, 0x96, 0x2d, 0xd9, 0xa5, 0x85, 0xb7, 0xa1, 0x36, 0x15, 0x1f, 0xd7, - 0x80, 0xff, 0x87, 0x4d, 0x87, 0x30, 0xcf, 0xf5, 0x93, 0xc1, 0x54, 0xa0, 0x9c, 0x00, 0x32, 0xa4, - 0x0a, 0x28, 0xe9, 0x41, 0xcb, 0x4e, 0x07, 0xf8, 0x43, 0x83, 0xa2, 0x84, 0xd0, 0x09, 0x94, 0x68, - 0x8f, 0xf8, 0x9c, 0x7e, 0xa6, 0x24, 0x4c, 0x3a, 0xb8, 0x97, 0x29, 0xa2, 0x65, 0x33, 0xb3, 0x75, - 0x15, 0x13, 0x77, 0x4b, 0xcd, 0x32, 0x5e, 0x42, 0x65, 0x3a, 0x20, 0xa7, 0x53, 0x55, 0xb5, 0x53, - 0x1b, 0x6a, 0x4b, 0x7e, 0x6a, 0x70, 0x23, 0xa3, 0x53, 0x4e, 0xf8, 0x04, 0x8a, 0x71, 0x13, 0x12, - 0x61, 0xf7, 0x67, 0x46, 0xab, 0x84, 0x27, 0x62, 0x63, 0x81, 0x49, 0xa6, 0xd1, 0x8e, 0xd7, 0x35, - 0x71, 0xe4, 0x08, 0xbb, 0x97, 0x1d, 0x61, 0x65, 0xba, 0x7a, 0x55, 0xea, 0x03, 0xa8, 0x08, 0xb4, - 0xc3, 0x5d, 0xce, 0x16, 0x4d, 0xce, 0x82, 0x2d, 0x25, 0x56, 0xd6, 0x64, 0xc0, 0xba, 0x70, 0x77, - 0xe8, 0x77, 0x12, 0x85, 0x17, 0x9c, 0xd4, 0xc6, 0xaf, 0xa1, 0xd6, 0x21, 0xfc, 0x88, 0x73, 0xd7, - 0xeb, 0x8b, 0x2c, 0xb2, 0xe0, 0x05, 0x41, 0x46, 0xd9, 0x5b, 0x7f, 0x48, 0xfd, 0x58, 0xfc, 0xba, - 0x93, 0xda, 0x58, 0x87, 0xfa, 0x34, 0x99, 0xdc, 0x0a, 0x0b, 0x6a, 0xcd, 0xbf, 0x79, 0x06, 0x3f, - 0x81, 0x7a, 0x33, 0x97, 0x2a, 0x23, 0x40, 0xcb, 0x0a, 0x68, 0xfc, 0x5a, 0x81, 0x15, 0x51, 0x3f, - 0x3a, 0x87, 0xad, 0x99, 0x4b, 0x44, 0x7b, 0xd7, 0x5d, 0x69, 0x24, 0xc7, 0xc0, 0x8b, 0x0f, 0x19, - 0x2f, 0xa1, 0x33, 0xd8, 0xcc, 0xdc, 0x07, 0xba, 0x9d, 0xa6, 0xe5, 0xdd, 0x99, 0x71, 0x67, 0x9e, - 0x3b, 0x65, 0x3c, 0x84, 0xb5, 0xf8, 0x8e, 0x50, 0x3d, 0x8d, 0xcd, 0x5c, 0x9a, 0xb1, 0x3d, 0x83, - 0xa7, 0xc9, 0xaf, 0xa0, 0xa4, 0xec, 0x26, 0xba, 0x99, 0xbf, 0xb1, 0x31, 0xcd, 0xad, 0xeb, 0xd6, - 0x19, 0x2f, 0x21, 0x1b, 0x36, 0xd2, 0x05, 0x42, 0x3b, 0x99, 0xb5, 0x54, 0x17, 0xd0, 0x30, 0xf2, - 0x5c, 0x29, 0x4b, 0x07, 0xca, 0xd9, 0x45, 0x40, 0x57, 0x2d, 0xc8, 0x5d, 0x37, 0xe3, 0xee, 0x5c, - 0xbf, 0x4a, 0xda, 0x9c, 0x47, 0xda, 0x5c, 0x40, 0xda, 0x9c, 0x43, 0x7a, 0xfc, 0xe2, 0xe3, 0xe1, - 0x3f, 0xfc, 0xc7, 0xba, 0x6b, 0xd1, 0x4f, 0xec, 0xf1, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x68, - 0x06, 0xb4, 0xd5, 0x0d, 0x07, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// DiskClient is the client API for Disk service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type DiskClient interface { - // ListDiskLocations returns locations of all - // disk devices enumerated by the host - ListDiskLocations(ctx context.Context, in *ListDiskLocationsRequest, opts ...grpc.CallOption) (*ListDiskLocationsResponse, error) - // PartitionDisk initializes and partitions a disk device (if the disk has not - // been partitioned already) and returns the resulting volume device ID - PartitionDisk(ctx context.Context, in *PartitionDiskRequest, opts ...grpc.CallOption) (*PartitionDiskResponse, error) - // Rescan refreshes the host's storage cache - Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) - // ListDiskIDs returns a map of DiskID objects where the key is the disk number - ListDiskIDs(ctx context.Context, in *ListDiskIDsRequest, opts ...grpc.CallOption) (*ListDiskIDsResponse, error) - // DiskStats returns the stats for the disk - DiskStats(ctx context.Context, in *DiskStatsRequest, opts ...grpc.CallOption) (*DiskStatsResponse, error) - // SetAttachState sets the offline/online state of a disk - SetAttachState(ctx context.Context, in *SetAttachStateRequest, opts ...grpc.CallOption) (*SetAttachStateResponse, error) - // GetAttachState gets the offline/online state of a disk - GetAttachState(ctx context.Context, in *GetAttachStateRequest, opts ...grpc.CallOption) (*GetAttachStateResponse, error) -} - -type diskClient struct { - cc grpc.ClientConnInterface -} - -func NewDiskClient(cc grpc.ClientConnInterface) DiskClient { - return &diskClient{cc} -} - -func (c *diskClient) ListDiskLocations(ctx context.Context, in *ListDiskLocationsRequest, opts ...grpc.CallOption) (*ListDiskLocationsResponse, error) { - out := new(ListDiskLocationsResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/ListDiskLocations", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *diskClient) PartitionDisk(ctx context.Context, in *PartitionDiskRequest, opts ...grpc.CallOption) (*PartitionDiskResponse, error) { - out := new(PartitionDiskResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/PartitionDisk", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *diskClient) Rescan(ctx context.Context, in *RescanRequest, opts ...grpc.CallOption) (*RescanResponse, error) { - out := new(RescanResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/Rescan", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *diskClient) ListDiskIDs(ctx context.Context, in *ListDiskIDsRequest, opts ...grpc.CallOption) (*ListDiskIDsResponse, error) { - out := new(ListDiskIDsResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/ListDiskIDs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *diskClient) DiskStats(ctx context.Context, in *DiskStatsRequest, opts ...grpc.CallOption) (*DiskStatsResponse, error) { - out := new(DiskStatsResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/DiskStats", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *diskClient) SetAttachState(ctx context.Context, in *SetAttachStateRequest, opts ...grpc.CallOption) (*SetAttachStateResponse, error) { - out := new(SetAttachStateResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/SetAttachState", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *diskClient) GetAttachState(ctx context.Context, in *GetAttachStateRequest, opts ...grpc.CallOption) (*GetAttachStateResponse, error) { - out := new(GetAttachStateResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Disk/GetAttachState", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// DiskServer is the server API for Disk service. -type DiskServer interface { - // ListDiskLocations returns locations of all - // disk devices enumerated by the host - ListDiskLocations(context.Context, *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) - // PartitionDisk initializes and partitions a disk device (if the disk has not - // been partitioned already) and returns the resulting volume device ID - PartitionDisk(context.Context, *PartitionDiskRequest) (*PartitionDiskResponse, error) - // Rescan refreshes the host's storage cache - Rescan(context.Context, *RescanRequest) (*RescanResponse, error) - // ListDiskIDs returns a map of DiskID objects where the key is the disk number - ListDiskIDs(context.Context, *ListDiskIDsRequest) (*ListDiskIDsResponse, error) - // DiskStats returns the stats for the disk - DiskStats(context.Context, *DiskStatsRequest) (*DiskStatsResponse, error) - // SetAttachState sets the offline/online state of a disk - SetAttachState(context.Context, *SetAttachStateRequest) (*SetAttachStateResponse, error) - // GetAttachState gets the offline/online state of a disk - GetAttachState(context.Context, *GetAttachStateRequest) (*GetAttachStateResponse, error) -} - -// UnimplementedDiskServer can be embedded to have forward compatible implementations. -type UnimplementedDiskServer struct { -} - -func (*UnimplementedDiskServer) ListDiskLocations(ctx context.Context, req *ListDiskLocationsRequest) (*ListDiskLocationsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDiskLocations not implemented") -} -func (*UnimplementedDiskServer) PartitionDisk(ctx context.Context, req *PartitionDiskRequest) (*PartitionDiskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PartitionDisk not implemented") -} -func (*UnimplementedDiskServer) Rescan(ctx context.Context, req *RescanRequest) (*RescanResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Rescan not implemented") -} -func (*UnimplementedDiskServer) ListDiskIDs(ctx context.Context, req *ListDiskIDsRequest) (*ListDiskIDsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListDiskIDs not implemented") -} -func (*UnimplementedDiskServer) DiskStats(ctx context.Context, req *DiskStatsRequest) (*DiskStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DiskStats not implemented") -} -func (*UnimplementedDiskServer) SetAttachState(ctx context.Context, req *SetAttachStateRequest) (*SetAttachStateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SetAttachState not implemented") -} -func (*UnimplementedDiskServer) GetAttachState(ctx context.Context, req *GetAttachStateRequest) (*GetAttachStateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAttachState not implemented") -} - -func RegisterDiskServer(s *grpc.Server, srv DiskServer) { - s.RegisterService(&_Disk_serviceDesc, srv) -} - -func _Disk_ListDiskLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDiskLocationsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).ListDiskLocations(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/ListDiskLocations", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).ListDiskLocations(ctx, req.(*ListDiskLocationsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Disk_PartitionDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PartitionDiskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).PartitionDisk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/PartitionDisk", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).PartitionDisk(ctx, req.(*PartitionDiskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Disk_Rescan_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RescanRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).Rescan(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/Rescan", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).Rescan(ctx, req.(*RescanRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Disk_ListDiskIDs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListDiskIDsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).ListDiskIDs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/ListDiskIDs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).ListDiskIDs(ctx, req.(*ListDiskIDsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Disk_DiskStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DiskStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).DiskStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/DiskStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).DiskStats(ctx, req.(*DiskStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Disk_SetAttachState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SetAttachStateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).SetAttachState(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/SetAttachState", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).SetAttachState(ctx, req.(*SetAttachStateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Disk_GetAttachState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAttachStateRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(DiskServer).GetAttachState(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Disk/GetAttachState", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(DiskServer).GetAttachState(ctx, req.(*GetAttachStateRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Disk_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1beta2.Disk", - HandlerType: (*DiskServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListDiskLocations", - Handler: _Disk_ListDiskLocations_Handler, - }, - { - MethodName: "PartitionDisk", - Handler: _Disk_PartitionDisk_Handler, - }, - { - MethodName: "Rescan", - Handler: _Disk_Rescan_Handler, - }, - { - MethodName: "ListDiskIDs", - Handler: _Disk_ListDiskIDs_Handler, - }, - { - MethodName: "DiskStats", - Handler: _Disk_DiskStats_Handler, - }, - { - MethodName: "SetAttachState", - Handler: _Disk_SetAttachState_Handler, - }, - { - MethodName: "GetAttachState", - Handler: _Disk_GetAttachState_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.proto", -} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.proto deleted file mode 100644 index c9f6c8f8e2..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2/api.proto +++ /dev/null @@ -1,109 +0,0 @@ -syntax = "proto3"; - -package v1beta2; - -option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2"; - -service Disk { - // ListDiskLocations returns locations of all - // disk devices enumerated by the host - rpc ListDiskLocations(ListDiskLocationsRequest) returns (ListDiskLocationsResponse) {} - - // PartitionDisk initializes and partitions a disk device (if the disk has not - // been partitioned already) and returns the resulting volume device ID - rpc PartitionDisk(PartitionDiskRequest) returns (PartitionDiskResponse) {} - - // Rescan refreshes the host's storage cache - rpc Rescan(RescanRequest) returns (RescanResponse) {} - - // ListDiskIDs returns a map of DiskID objects where the key is the disk number - rpc ListDiskIDs(ListDiskIDsRequest) returns (ListDiskIDsResponse) {} - - // DiskStats returns the stats for the disk - rpc DiskStats(DiskStatsRequest) returns (DiskStatsResponse) {} - - // SetAttachState sets the offline/online state of a disk - rpc SetAttachState(SetAttachStateRequest) returns (SetAttachStateResponse) {} - - // GetAttachState gets the offline/online state of a disk - rpc GetAttachState(GetAttachStateRequest) returns (GetAttachStateResponse) {} -} - -message ListDiskLocationsRequest { - // Intentionally empty -} - -message DiskLocation { - string Adapter = 1; - string Bus = 2; - string Target = 3; - string LUNID = 4; -} - -message ListDiskLocationsResponse { - // Map of disk device IDs and associated with each disk device - map disk_locations = 1; -} - -message PartitionDiskRequest { - // Disk device ID of the disk to partition - string diskID = 1; -} - -message PartitionDiskResponse { - // Intentionally empty -} - -message RescanRequest { - // Intentionally empty -} - -message RescanResponse { - // Intentionally empty -} - -message ListDiskIDsRequest { - // Intentionally empty -} - -message DiskIDs { - // Map of Disk ID types and Disk ID values - map identifiers = 1; -} - -message ListDiskIDsResponse { - // Map of disk device numbers and IDs associated with each disk device - map diskIDs = 1; -} - -message DiskStatsRequest { - // Disk device ID of the disk to get the size from - string diskID = 1; -} - -message DiskStatsResponse { - //Total size of the volume - int64 diskSize = 1; -} - -message SetAttachStateRequest { - // Disk device ID (number) of the disk which state will change - string diskID = 1; - - // Online state to set for the disk. true for online, false for offline - bool isOnline = 2; -} - -message SetAttachStateResponse { -} - -message GetAttachStateRequest { - // Disk device ID (number) of the disk - string diskID = 1; -} - -message GetAttachStateResponse { - // Online state of the disk. true for online, false for offline - bool isOnline = 1; -} - diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go new file mode 100644 index 0000000000..8bf9cd6548 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.pb.go @@ -0,0 +1,1041 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type PathExistsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence we want to check in the host's filesystem + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *PathExistsRequest) Reset() { + *x = PathExistsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsRequest) ProtoMessage() {} + +func (x *PathExistsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathExistsRequest.ProtoReflect.Descriptor instead. +func (*PathExistsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *PathExistsRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type PathExistsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in PathExistsRequest exists in the host's filesystem + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` +} + +func (x *PathExistsResponse) Reset() { + *x = PathExistsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PathExistsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PathExistsResponse) ProtoMessage() {} + +func (x *PathExistsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PathExistsResponse.ProtoReflect.Descriptor instead. +func (*PathExistsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *PathExistsResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +type MkdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to create in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // Non-existent parent directories in the path will be automatically created. + // Directories will be created with Read and Write privileges of the Windows + // User account under which csi-proxy is started (typically LocalSystem). + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // The path parameter cannot already exist in the host's filesystem. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *MkdirRequest) Reset() { + *x = MkdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirRequest) ProtoMessage() {} + +func (x *MkdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirRequest.ProtoReflect.Descriptor instead. +func (*MkdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *MkdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type MkdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MkdirResponse) Reset() { + *x = MkdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MkdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MkdirResponse) ProtoMessage() {} + +func (x *MkdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MkdirResponse.ProtoReflect.Descriptor instead. +func (*MkdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{3} +} + +type RmdirRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path to remove in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // Depending on the context parameter of this function, the path prefix needs + // to match the paths specified either as kubelet-csi-plugins-path + // or as kubelet-pod-path parameters of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // Path cannot be a file of type symlink. + // Maximum path length will be capped to 260 characters. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` + // Force remove all contents under path (if any). + Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"` +} + +func (x *RmdirRequest) Reset() { + *x = RmdirRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirRequest) ProtoMessage() {} + +func (x *RmdirRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RmdirRequest.ProtoReflect.Descriptor instead. +func (*RmdirRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{4} +} + +func (x *RmdirRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *RmdirRequest) GetForce() bool { + if x != nil { + return x.Force + } + return false +} + +type RmdirResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *RmdirResponse) Reset() { + *x = RmdirResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RmdirResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmdirResponse) ProtoMessage() {} + +func (x *RmdirResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RmdirResponse.ProtoReflect.Descriptor instead. +func (*RmdirResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{5} +} + +type CreateSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path of the existing directory to be linked. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs needs to match the paths specified as + // kubelet-csi-plugins-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // source_path cannot already exist in the host filesystem. + // Maximum path length will be capped to 260 characters. + SourcePath string `protobuf:"bytes,1,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` + // Target path is the location of the new directory entry to be created in the host's filesystem. + // All special characters allowed by Windows in path names will be allowed + // except for restrictions noted below. For details, please check: + // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file + // + // Restrictions: + // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. + // The path prefix needs to match the paths specified as + // kubelet-pod-path parameter of csi-proxy. + // UNC paths of the form "\\server\share\path\file" are not allowed. + // All directory separators need to be backslash character: "\". + // Characters: .. / : | ? * in the path are not allowed. + // target_path needs to exist as a directory in the host that is empty. + // target_path cannot be a symbolic link. + // Maximum path length will be capped to 260 characters. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *CreateSymlinkRequest) Reset() { + *x = CreateSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkRequest) ProtoMessage() {} + +func (x *CreateSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSymlinkRequest.ProtoReflect.Descriptor instead. +func (*CreateSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateSymlinkRequest) GetSourcePath() string { + if x != nil { + return x.SourcePath + } + return "" +} + +func (x *CreateSymlinkRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type CreateSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CreateSymlinkResponse) Reset() { + *x = CreateSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSymlinkResponse) ProtoMessage() {} + +func (x *CreateSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSymlinkResponse.ProtoReflect.Descriptor instead. +func (*CreateSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{7} +} + +type IsSymlinkRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The path whose existence as a symlink we want to check in the host's filesystem. + Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` +} + +func (x *IsSymlinkRequest) Reset() { + *x = IsSymlinkRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkRequest) ProtoMessage() {} + +func (x *IsSymlinkRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsSymlinkRequest.ProtoReflect.Descriptor instead. +func (*IsSymlinkRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *IsSymlinkRequest) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +type IsSymlinkResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Indicates whether the path in IsSymlinkRequest is a symlink. + IsSymlink bool `protobuf:"varint,1,opt,name=is_symlink,json=isSymlink,proto3" json:"is_symlink,omitempty"` +} + +func (x *IsSymlinkResponse) Reset() { + *x = IsSymlinkResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsSymlinkResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsSymlinkResponse) ProtoMessage() {} + +func (x *IsSymlinkResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsSymlinkResponse.ProtoReflect.Descriptor instead. +func (*IsSymlinkResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP(), []int{9} +} + +func (x *IsSymlinkResponse) GetIsSymlink() bool { + if x != nil { + return x.IsSymlink + } + return false +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x46, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x70, 0x69, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x27, 0x0a, 0x11, + 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x2c, 0x0a, 0x12, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, + 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, + 0x73, 0x74, 0x73, 0x22, 0x22, 0x0a, 0x0c, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x6b, 0x64, 0x69, 0x72, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x0a, 0x0c, 0x52, 0x6d, 0x64, 0x69, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x14, 0x0a, 0x05, + 0x66, 0x6f, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x66, 0x6f, 0x72, + 0x63, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, + 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, + 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x0a, 0x10, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, + 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, + 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x22, 0x32, + 0x0a, 0x11, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, + 0x6e, 0x6b, 0x32, 0xaf, 0x02, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x12, 0x3d, 0x0a, 0x0a, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, + 0x15, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x74, 0x68, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x2e, 0x0a, 0x05, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x12, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x6b, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x2e, 0x0a, 0x05, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x12, 0x10, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x6d, 0x64, 0x69, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x46, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, + 0x6b, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, + 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x76, 0x31, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3a, 0x0a, 0x09, 0x49, 0x73, 0x53, 0x79, + 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x12, 0x14, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, + 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x76, 0x31, + 0x2e, 0x49, 0x73, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x42, 0x3e, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, + 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_goTypes = []interface{}{ + (*PathExistsRequest)(nil), // 0: v1.PathExistsRequest + (*PathExistsResponse)(nil), // 1: v1.PathExistsResponse + (*MkdirRequest)(nil), // 2: v1.MkdirRequest + (*MkdirResponse)(nil), // 3: v1.MkdirResponse + (*RmdirRequest)(nil), // 4: v1.RmdirRequest + (*RmdirResponse)(nil), // 5: v1.RmdirResponse + (*CreateSymlinkRequest)(nil), // 6: v1.CreateSymlinkRequest + (*CreateSymlinkResponse)(nil), // 7: v1.CreateSymlinkResponse + (*IsSymlinkRequest)(nil), // 8: v1.IsSymlinkRequest + (*IsSymlinkResponse)(nil), // 9: v1.IsSymlinkResponse +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_depIdxs = []int32{ + 0, // 0: v1.Filesystem.PathExists:input_type -> v1.PathExistsRequest + 2, // 1: v1.Filesystem.Mkdir:input_type -> v1.MkdirRequest + 4, // 2: v1.Filesystem.Rmdir:input_type -> v1.RmdirRequest + 6, // 3: v1.Filesystem.CreateSymlink:input_type -> v1.CreateSymlinkRequest + 8, // 4: v1.Filesystem.IsSymlink:input_type -> v1.IsSymlinkRequest + 1, // 5: v1.Filesystem.PathExists:output_type -> v1.PathExistsResponse + 3, // 6: v1.Filesystem.Mkdir:output_type -> v1.MkdirResponse + 5, // 7: v1.Filesystem.Rmdir:output_type -> v1.RmdirResponse + 7, // 8: v1.Filesystem.CreateSymlink:output_type -> v1.CreateSymlinkResponse + 9, // 9: v1.Filesystem.IsSymlink:output_type -> v1.IsSymlinkResponse + 5, // [5:10] is the sub-list for method output_type + 0, // [0:5] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PathExistsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MkdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RmdirResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsSymlinkResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 10, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_filesystem_v1_api_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// FilesystemClient is the client API for Filesystem service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type FilesystemClient interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) +} + +type filesystemClient struct { + cc grpc.ClientConnInterface +} + +func NewFilesystemClient(cc grpc.ClientConnInterface) FilesystemClient { + return &filesystemClient{cc} +} + +func (c *filesystemClient) PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) { + out := new(PathExistsResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/PathExists", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) { + out := new(MkdirResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/Mkdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) { + out := new(RmdirResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/Rmdir", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) CreateSymlink(ctx context.Context, in *CreateSymlinkRequest, opts ...grpc.CallOption) (*CreateSymlinkResponse, error) { + out := new(CreateSymlinkResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/CreateSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *filesystemClient) IsSymlink(ctx context.Context, in *IsSymlinkRequest, opts ...grpc.CallOption) (*IsSymlinkResponse, error) { + out := new(IsSymlinkResponse) + err := c.cc.Invoke(ctx, "/v1.Filesystem/IsSymlink", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FilesystemServer is the server API for Filesystem service. +type FilesystemServer interface { + // PathExists checks if the requested path exists in the host filesystem. + PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) + // Mkdir creates a directory at the requested path in the host filesystem. + Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. + Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) + // IsSymlink checks if a given path is a symlink. + IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) +} + +// UnimplementedFilesystemServer can be embedded to have forward compatible implementations. +type UnimplementedFilesystemServer struct { +} + +func (*UnimplementedFilesystemServer) PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PathExists not implemented") +} +func (*UnimplementedFilesystemServer) Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Mkdir not implemented") +} +func (*UnimplementedFilesystemServer) Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Rmdir not implemented") +} +func (*UnimplementedFilesystemServer) CreateSymlink(context.Context, *CreateSymlinkRequest) (*CreateSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSymlink not implemented") +} +func (*UnimplementedFilesystemServer) IsSymlink(context.Context, *IsSymlinkRequest) (*IsSymlinkResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsSymlink not implemented") +} + +func RegisterFilesystemServer(s *grpc.Server, srv FilesystemServer) { + s.RegisterService(&_Filesystem_serviceDesc, srv) +} + +func _Filesystem_PathExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PathExistsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).PathExists(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/PathExists", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).PathExists(ctx, req.(*PathExistsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Mkdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MkdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Mkdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/Mkdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Mkdir(ctx, req.(*MkdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_Rmdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RmdirRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).Rmdir(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/Rmdir", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).Rmdir(ctx, req.(*RmdirRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_CreateSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).CreateSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/CreateSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).CreateSymlink(ctx, req.(*CreateSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Filesystem_IsSymlink_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsSymlinkRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FilesystemServer).IsSymlink(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Filesystem/IsSymlink", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FilesystemServer).IsSymlink(ctx, req.(*IsSymlinkRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Filesystem_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Filesystem", + HandlerType: (*FilesystemServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "PathExists", + Handler: _Filesystem_PathExists_Handler, + }, + { + MethodName: "Mkdir", + Handler: _Filesystem_Mkdir_Handler, + }, + { + MethodName: "Rmdir", + Handler: _Filesystem_Rmdir_Handler, + }, + { + MethodName: "CreateSymlink", + Handler: _Filesystem_CreateSymlink_Handler, + }, + { + MethodName: "IsSymlink", + Handler: _Filesystem_IsSymlink_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto similarity index 65% rename from vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.proto rename to vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto index 3b4c0ab2f4..151a1ffd41 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.proto +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1/api.proto @@ -1,55 +1,37 @@ syntax = "proto3"; -package v1beta1; +package v1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1"; service Filesystem { - // PathExists checks if the requested path exists in the host's filesystem + // PathExists checks if the requested path exists in the host filesystem. rpc PathExists(PathExistsRequest) returns (PathExistsResponse) {} - // Mkdir creates a directory at the requested path in the host's filesystem + // Mkdir creates a directory at the requested path in the host filesystem. rpc Mkdir(MkdirRequest) returns (MkdirResponse) {} - // Rmdir removes the directory at the requested path in the host's filesystem. - // This may be used for unlinking a symlink created through LinkPath + // Rmdir removes the directory at the requested path in the host filesystem. + // This may be used for unlinking a symlink created through CreateSymlink. rpc Rmdir(RmdirRequest) returns (RmdirResponse) {} - // LinkPath creates a local directory symbolic link between a source path - // and target path in the host's filesystem - rpc LinkPath(LinkPathRequest) returns (LinkPathResponse) {} - - //IsMountPoint checks if a given path is mount or not - rpc IsMountPoint(IsMountPointRequest) returns (IsMountPointResponse) {} -} + // CreateSymlink creates a symbolic link called target_path that points to source_path + // in the host filesystem (target_path is the name of the symbolic link created, + // source_path is the existing path). + rpc CreateSymlink(CreateSymlinkRequest) returns (CreateSymlinkResponse) {} -// Context of the paths used for path prefix validation -enum PathContext { - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as - // the path context. This may be used while handling NodeStageVolume where - // a volume may need to be mounted at a plugin-specific path like: - // kubelet\plugins\kubernetes.io\csi\pv\\globalmount - PLUGIN = 0; - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path - // context. This may be used while handling NodePublishVolume where a staged - // volume may be need to be symlinked to a pod-specific path like: - // kubelet\pods\\volumes\kubernetes.io~csi\\mount - POD = 1; + // IsSymlink checks if a given path is a symlink. + rpc IsSymlink(IsSymlinkRequest) returns (IsSymlinkResponse) {} } message PathExistsRequest { // The path whose existence we want to check in the host's filesystem string path = 1; - - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; } message PathExistsResponse { - // Error message if any. Empty string indicates success - string error = 1; - // Indicates whether the path in PathExistsRequest exists in the host's filesystem - bool exists = 2; + bool exists = 1; } message MkdirRequest { @@ -63,7 +45,7 @@ message MkdirRequest { // // Restrictions: // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // Depending on the context parameter of this function, the path prefix needs + // Depending on the context parameter of this function, the path prefix needs // to match the paths specified either as kubelet-csi-plugins-path // or as kubelet-pod-path parameters of csi-proxy. // The path parameter cannot already exist in the host's filesystem. @@ -72,15 +54,10 @@ message MkdirRequest { // Characters: .. / : | ? * in the path are not allowed. // Maximum path length will be capped to 260 characters. string path = 1; - - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; } message MkdirResponse { - // Error message if any. Empty string indicates success - string error = 1; + // Intentionally empty. } message RmdirRequest { @@ -91,7 +68,7 @@ message RmdirRequest { // // Restrictions: // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // Depending on the context parameter of this function, the path prefix needs + // Depending on the context parameter of this function, the path prefix needs // to match the paths specified either as kubelet-csi-plugins-path // or as kubelet-pod-path parameters of csi-proxy. // UNC paths of the form "\\server\share\path\file" are not allowed. @@ -101,28 +78,23 @@ message RmdirRequest { // Maximum path length will be capped to 260 characters. string path = 1; - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - PathContext context = 2; - // Force remove all contents under path (if any). - bool force = 3; + bool force = 2; } message RmdirResponse { - // Error message if any. Empty string indicates success - string error = 1; + // Intentionally empty. } -message LinkPathRequest { - // The path where the symlink is created in the host's filesystem. +message CreateSymlinkRequest { + // The path of the existing directory to be linked. // All special characters allowed by Windows in path names will be allowed // except for restrictions noted below. For details, please check: // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file // // Restrictions: // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // The path prefix needs needs to match the paths specified as + // The path prefix needs needs to match the paths specified as // kubelet-csi-plugins-path parameter of csi-proxy. // UNC paths of the form "\\server\share\path\file" are not allowed. // All directory separators need to be backslash character: "\". @@ -131,7 +103,7 @@ message LinkPathRequest { // Maximum path length will be capped to 260 characters. string source_path = 1; - // Target path in the host's filesystem used for the symlink creation. + // Target path is the location of the new directory entry to be created in the host's filesystem. // All special characters allowed by Windows in path names will be allowed // except for restrictions noted below. For details, please check: // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file @@ -149,20 +121,16 @@ message LinkPathRequest { string target_path = 2; } -message LinkPathResponse { - // Error message if any. Empty string indicates success - string error = 1; +message CreateSymlinkResponse { + // Intentionally empty. } - -message IsMountPointRequest { - // The path whose existence we want to check in the host's filesystem + +message IsSymlinkRequest { + // The path whose existence as a symlink we want to check in the host's filesystem. string path = 1; } -message IsMountPointResponse { - // Error message if any. Empty string indicates success - string error = 1; - - // Indicates whether the path in PathExistsRequest exists in the host's filesystem - bool is_mount_point = 2; +message IsSymlinkResponse { + // Indicates whether the path in IsSymlinkRequest is a symlink. + bool is_symlink = 1; } diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.pb.go deleted file mode 100644 index 9b8f897bd3..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.pb.go +++ /dev/null @@ -1,872 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.proto - -package v1beta1 - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Context of the paths used for path prefix validation -type PathContext int32 - -const ( - // Indicates the kubelet-csi-plugins-path parameter of csi-proxy be used as - // the path context. This may be used while handling NodeStageVolume where - // a volume may need to be mounted at a plugin-specific path like: - // kubelet\plugins\kubernetes.io\csi\pv\\globalmount - PathContext_PLUGIN PathContext = 0 - // Indicates the kubelet-pod-path parameter of csi-proxy be used as the path - // context. This may be used while handling NodePublishVolume where a staged - // volume may be need to be symlinked to a pod-specific path like: - // kubelet\pods\\volumes\kubernetes.io~csi\\mount - PathContext_POD PathContext = 1 -) - -var PathContext_name = map[int32]string{ - 0: "PLUGIN", - 1: "POD", -} - -var PathContext_value = map[string]int32{ - "PLUGIN": 0, - "POD": 1, -} - -func (x PathContext) String() string { - return proto.EnumName(PathContext_name, int32(x)) -} - -func (PathContext) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{0} -} - -type PathExistsRequest struct { - // The path whose existence we want to check in the host's filesystem - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta1.PathContext" json:"context,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PathExistsRequest) Reset() { *m = PathExistsRequest{} } -func (m *PathExistsRequest) String() string { return proto.CompactTextString(m) } -func (*PathExistsRequest) ProtoMessage() {} -func (*PathExistsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{0} -} - -func (m *PathExistsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PathExistsRequest.Unmarshal(m, b) -} -func (m *PathExistsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PathExistsRequest.Marshal(b, m, deterministic) -} -func (m *PathExistsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_PathExistsRequest.Merge(m, src) -} -func (m *PathExistsRequest) XXX_Size() int { - return xxx_messageInfo_PathExistsRequest.Size(m) -} -func (m *PathExistsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_PathExistsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_PathExistsRequest proto.InternalMessageInfo - -func (m *PathExistsRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *PathExistsRequest) GetContext() PathContext { - if m != nil { - return m.Context - } - return PathContext_PLUGIN -} - -type PathExistsResponse struct { - // Error message if any. Empty string indicates success - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - // Indicates whether the path in PathExistsRequest exists in the host's filesystem - Exists bool `protobuf:"varint,2,opt,name=exists,proto3" json:"exists,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PathExistsResponse) Reset() { *m = PathExistsResponse{} } -func (m *PathExistsResponse) String() string { return proto.CompactTextString(m) } -func (*PathExistsResponse) ProtoMessage() {} -func (*PathExistsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{1} -} - -func (m *PathExistsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PathExistsResponse.Unmarshal(m, b) -} -func (m *PathExistsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PathExistsResponse.Marshal(b, m, deterministic) -} -func (m *PathExistsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_PathExistsResponse.Merge(m, src) -} -func (m *PathExistsResponse) XXX_Size() int { - return xxx_messageInfo_PathExistsResponse.Size(m) -} -func (m *PathExistsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_PathExistsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_PathExistsResponse proto.InternalMessageInfo - -func (m *PathExistsResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func (m *PathExistsResponse) GetExists() bool { - if m != nil { - return m.Exists - } - return false -} - -type MkdirRequest struct { - // The path to create in the host's filesystem. - // All special characters allowed by Windows in path names will be allowed - // except for restrictions noted below. For details, please check: - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - // Non-existent parent directories in the path will be automatically created. - // Directories will be created with Read and Write privileges of the Windows - // User account under which csi-proxy is started (typically LocalSystem). - // - // Restrictions: - // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // Depending on the context parameter of this function, the path prefix needs - // to match the paths specified either as kubelet-csi-plugins-path - // or as kubelet-pod-path parameters of csi-proxy. - // The path parameter cannot already exist in the host's filesystem. - // UNC paths of the form "\\server\share\path\file" are not allowed. - // All directory separators need to be backslash character: "\". - // Characters: .. / : | ? * in the path are not allowed. - // Maximum path length will be capped to 260 characters. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta1.PathContext" json:"context,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MkdirRequest) Reset() { *m = MkdirRequest{} } -func (m *MkdirRequest) String() string { return proto.CompactTextString(m) } -func (*MkdirRequest) ProtoMessage() {} -func (*MkdirRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{2} -} - -func (m *MkdirRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MkdirRequest.Unmarshal(m, b) -} -func (m *MkdirRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MkdirRequest.Marshal(b, m, deterministic) -} -func (m *MkdirRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MkdirRequest.Merge(m, src) -} -func (m *MkdirRequest) XXX_Size() int { - return xxx_messageInfo_MkdirRequest.Size(m) -} -func (m *MkdirRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MkdirRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MkdirRequest proto.InternalMessageInfo - -func (m *MkdirRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *MkdirRequest) GetContext() PathContext { - if m != nil { - return m.Context - } - return PathContext_PLUGIN -} - -type MkdirResponse struct { - // Error message if any. Empty string indicates success - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MkdirResponse) Reset() { *m = MkdirResponse{} } -func (m *MkdirResponse) String() string { return proto.CompactTextString(m) } -func (*MkdirResponse) ProtoMessage() {} -func (*MkdirResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{3} -} - -func (m *MkdirResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MkdirResponse.Unmarshal(m, b) -} -func (m *MkdirResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MkdirResponse.Marshal(b, m, deterministic) -} -func (m *MkdirResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MkdirResponse.Merge(m, src) -} -func (m *MkdirResponse) XXX_Size() int { - return xxx_messageInfo_MkdirResponse.Size(m) -} -func (m *MkdirResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MkdirResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MkdirResponse proto.InternalMessageInfo - -func (m *MkdirResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type RmdirRequest struct { - // The path to remove in the host's filesystem. - // All special characters allowed by Windows in path names will be allowed - // except for restrictions noted below. For details, please check: - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - // - // Restrictions: - // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // Depending on the context parameter of this function, the path prefix needs - // to match the paths specified either as kubelet-csi-plugins-path - // or as kubelet-pod-path parameters of csi-proxy. - // UNC paths of the form "\\server\share\path\file" are not allowed. - // All directory separators need to be backslash character: "\". - // Characters: .. / : | ? * in the path are not allowed. - // Path cannot be a file of type symlink. - // Maximum path length will be capped to 260 characters. - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // Context of the path parameter. - // This is used to validate prefix for absolute paths passed - Context PathContext `protobuf:"varint,2,opt,name=context,proto3,enum=v1beta1.PathContext" json:"context,omitempty"` - // Force remove all contents under path (if any). - Force bool `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RmdirRequest) Reset() { *m = RmdirRequest{} } -func (m *RmdirRequest) String() string { return proto.CompactTextString(m) } -func (*RmdirRequest) ProtoMessage() {} -func (*RmdirRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{4} -} - -func (m *RmdirRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RmdirRequest.Unmarshal(m, b) -} -func (m *RmdirRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RmdirRequest.Marshal(b, m, deterministic) -} -func (m *RmdirRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_RmdirRequest.Merge(m, src) -} -func (m *RmdirRequest) XXX_Size() int { - return xxx_messageInfo_RmdirRequest.Size(m) -} -func (m *RmdirRequest) XXX_DiscardUnknown() { - xxx_messageInfo_RmdirRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_RmdirRequest proto.InternalMessageInfo - -func (m *RmdirRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *RmdirRequest) GetContext() PathContext { - if m != nil { - return m.Context - } - return PathContext_PLUGIN -} - -func (m *RmdirRequest) GetForce() bool { - if m != nil { - return m.Force - } - return false -} - -type RmdirResponse struct { - // Error message if any. Empty string indicates success - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *RmdirResponse) Reset() { *m = RmdirResponse{} } -func (m *RmdirResponse) String() string { return proto.CompactTextString(m) } -func (*RmdirResponse) ProtoMessage() {} -func (*RmdirResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{5} -} - -func (m *RmdirResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RmdirResponse.Unmarshal(m, b) -} -func (m *RmdirResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RmdirResponse.Marshal(b, m, deterministic) -} -func (m *RmdirResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_RmdirResponse.Merge(m, src) -} -func (m *RmdirResponse) XXX_Size() int { - return xxx_messageInfo_RmdirResponse.Size(m) -} -func (m *RmdirResponse) XXX_DiscardUnknown() { - xxx_messageInfo_RmdirResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_RmdirResponse proto.InternalMessageInfo - -func (m *RmdirResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type LinkPathRequest struct { - // The path where the symlink is created in the host's filesystem. - // All special characters allowed by Windows in path names will be allowed - // except for restrictions noted below. For details, please check: - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - // - // Restrictions: - // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // The path prefix needs needs to match the paths specified as - // kubelet-csi-plugins-path parameter of csi-proxy. - // UNC paths of the form "\\server\share\path\file" are not allowed. - // All directory separators need to be backslash character: "\". - // Characters: .. / : | ? * in the path are not allowed. - // source_path cannot already exist in the host filesystem. - // Maximum path length will be capped to 260 characters. - SourcePath string `protobuf:"bytes,1,opt,name=source_path,json=sourcePath,proto3" json:"source_path,omitempty"` - // Target path in the host's filesystem used for the symlink creation. - // All special characters allowed by Windows in path names will be allowed - // except for restrictions noted below. For details, please check: - // https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file - // - // Restrictions: - // Only absolute path (indicated by a drive letter prefix: e.g. "C:\") is accepted. - // The path prefix needs to match the paths specified as - // kubelet-pod-path parameter of csi-proxy. - // UNC paths of the form "\\server\share\path\file" are not allowed. - // All directory separators need to be backslash character: "\". - // Characters: .. / : | ? * in the path are not allowed. - // target_path needs to exist as a directory in the host that is empty. - // target_path cannot be a symbolic link. - // Maximum path length will be capped to 260 characters. - TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LinkPathRequest) Reset() { *m = LinkPathRequest{} } -func (m *LinkPathRequest) String() string { return proto.CompactTextString(m) } -func (*LinkPathRequest) ProtoMessage() {} -func (*LinkPathRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{6} -} - -func (m *LinkPathRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LinkPathRequest.Unmarshal(m, b) -} -func (m *LinkPathRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LinkPathRequest.Marshal(b, m, deterministic) -} -func (m *LinkPathRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinkPathRequest.Merge(m, src) -} -func (m *LinkPathRequest) XXX_Size() int { - return xxx_messageInfo_LinkPathRequest.Size(m) -} -func (m *LinkPathRequest) XXX_DiscardUnknown() { - xxx_messageInfo_LinkPathRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_LinkPathRequest proto.InternalMessageInfo - -func (m *LinkPathRequest) GetSourcePath() string { - if m != nil { - return m.SourcePath - } - return "" -} - -func (m *LinkPathRequest) GetTargetPath() string { - if m != nil { - return m.TargetPath - } - return "" -} - -type LinkPathResponse struct { - // Error message if any. Empty string indicates success - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *LinkPathResponse) Reset() { *m = LinkPathResponse{} } -func (m *LinkPathResponse) String() string { return proto.CompactTextString(m) } -func (*LinkPathResponse) ProtoMessage() {} -func (*LinkPathResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{7} -} - -func (m *LinkPathResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LinkPathResponse.Unmarshal(m, b) -} -func (m *LinkPathResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LinkPathResponse.Marshal(b, m, deterministic) -} -func (m *LinkPathResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LinkPathResponse.Merge(m, src) -} -func (m *LinkPathResponse) XXX_Size() int { - return xxx_messageInfo_LinkPathResponse.Size(m) -} -func (m *LinkPathResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LinkPathResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_LinkPathResponse proto.InternalMessageInfo - -func (m *LinkPathResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -type IsMountPointRequest struct { - // The path whose existence we want to check in the host's filesystem - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IsMountPointRequest) Reset() { *m = IsMountPointRequest{} } -func (m *IsMountPointRequest) String() string { return proto.CompactTextString(m) } -func (*IsMountPointRequest) ProtoMessage() {} -func (*IsMountPointRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{8} -} - -func (m *IsMountPointRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IsMountPointRequest.Unmarshal(m, b) -} -func (m *IsMountPointRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IsMountPointRequest.Marshal(b, m, deterministic) -} -func (m *IsMountPointRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsMountPointRequest.Merge(m, src) -} -func (m *IsMountPointRequest) XXX_Size() int { - return xxx_messageInfo_IsMountPointRequest.Size(m) -} -func (m *IsMountPointRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IsMountPointRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_IsMountPointRequest proto.InternalMessageInfo - -func (m *IsMountPointRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -type IsMountPointResponse struct { - // Error message if any. Empty string indicates success - Error string `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"` - // Indicates whether the path in PathExistsRequest exists in the host's filesystem - IsMountPoint bool `protobuf:"varint,2,opt,name=is_mount_point,json=isMountPoint,proto3" json:"is_mount_point,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IsMountPointResponse) Reset() { *m = IsMountPointResponse{} } -func (m *IsMountPointResponse) String() string { return proto.CompactTextString(m) } -func (*IsMountPointResponse) ProtoMessage() {} -func (*IsMountPointResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_b03a6091226f91c2, []int{9} -} - -func (m *IsMountPointResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IsMountPointResponse.Unmarshal(m, b) -} -func (m *IsMountPointResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IsMountPointResponse.Marshal(b, m, deterministic) -} -func (m *IsMountPointResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsMountPointResponse.Merge(m, src) -} -func (m *IsMountPointResponse) XXX_Size() int { - return xxx_messageInfo_IsMountPointResponse.Size(m) -} -func (m *IsMountPointResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IsMountPointResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IsMountPointResponse proto.InternalMessageInfo - -func (m *IsMountPointResponse) GetError() string { - if m != nil { - return m.Error - } - return "" -} - -func (m *IsMountPointResponse) GetIsMountPoint() bool { - if m != nil { - return m.IsMountPoint - } - return false -} - -func init() { - proto.RegisterEnum("v1beta1.PathContext", PathContext_name, PathContext_value) - proto.RegisterType((*PathExistsRequest)(nil), "v1beta1.PathExistsRequest") - proto.RegisterType((*PathExistsResponse)(nil), "v1beta1.PathExistsResponse") - proto.RegisterType((*MkdirRequest)(nil), "v1beta1.MkdirRequest") - proto.RegisterType((*MkdirResponse)(nil), "v1beta1.MkdirResponse") - proto.RegisterType((*RmdirRequest)(nil), "v1beta1.RmdirRequest") - proto.RegisterType((*RmdirResponse)(nil), "v1beta1.RmdirResponse") - proto.RegisterType((*LinkPathRequest)(nil), "v1beta1.LinkPathRequest") - proto.RegisterType((*LinkPathResponse)(nil), "v1beta1.LinkPathResponse") - proto.RegisterType((*IsMountPointRequest)(nil), "v1beta1.IsMountPointRequest") - proto.RegisterType((*IsMountPointResponse)(nil), "v1beta1.IsMountPointResponse") -} - -func init() { - proto.RegisterFile("github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.proto", fileDescriptor_b03a6091226f91c2) -} - -var fileDescriptor_b03a6091226f91c2 = []byte{ - // 461 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0x4f, 0x6f, 0xd3, 0x40, - 0x10, 0xc5, 0x93, 0x94, 0x26, 0x65, 0x1a, 0x4a, 0x18, 0x42, 0x15, 0x0c, 0x88, 0x6a, 0x05, 0x52, - 0x40, 0xaa, 0xad, 0x96, 0x0b, 0x57, 0xfe, 0x56, 0x15, 0x0d, 0x44, 0x46, 0x88, 0x63, 0xe4, 0x98, - 0x69, 0xb3, 0x4a, 0xe3, 0x35, 0xbb, 0x63, 0x94, 0x7e, 0x56, 0xbe, 0x0c, 0x5a, 0xdb, 0x71, 0x37, - 0x55, 0xf0, 0xa9, 0xb7, 0xec, 0xcc, 0x6f, 0xdf, 0xbc, 0xec, 0x3c, 0x19, 0xbe, 0x5c, 0x48, 0x9e, - 0x65, 0x53, 0x3f, 0x56, 0x8b, 0x60, 0x9e, 0x4d, 0x49, 0x27, 0xc4, 0x64, 0x0e, 0x63, 0x23, 0x83, - 0xd8, 0xc8, 0xc3, 0x54, 0xab, 0xe5, 0x55, 0x10, 0x5f, 0x4a, 0x4a, 0x38, 0x88, 0x52, 0x19, 0x9c, - 0xcb, 0x4b, 0x32, 0x57, 0x86, 0x69, 0x11, 0xfc, 0x39, 0x9a, 0x12, 0x47, 0x47, 0xb6, 0xec, 0xa7, - 0x5a, 0xb1, 0xc2, 0x4e, 0x59, 0x12, 0x3f, 0xe1, 0xc1, 0x38, 0xe2, 0xd9, 0xa7, 0xa5, 0x34, 0x6c, - 0x42, 0xfa, 0x9d, 0x91, 0x61, 0x44, 0xb8, 0x93, 0x46, 0x3c, 0x1b, 0x34, 0x0f, 0x9a, 0xc3, 0xbb, - 0x61, 0xfe, 0x1b, 0x7d, 0xe8, 0xc4, 0x2a, 0x61, 0x5a, 0xf2, 0xa0, 0x75, 0xd0, 0x1c, 0xee, 0x1d, - 0xf7, 0xfd, 0x52, 0xc3, 0xb7, 0x02, 0x1f, 0x8a, 0x5e, 0xb8, 0x82, 0xc4, 0x7b, 0x40, 0x57, 0xd8, - 0xa4, 0x2a, 0x31, 0x84, 0x7d, 0xd8, 0x26, 0xad, 0x95, 0x2e, 0xa5, 0x8b, 0x03, 0xee, 0x43, 0x9b, - 0x72, 0x2e, 0x97, 0xde, 0x09, 0xcb, 0x93, 0x08, 0xa1, 0x3b, 0x9a, 0xff, 0x92, 0xfa, 0x36, 0x7d, - 0xbd, 0x84, 0x7b, 0xa5, 0x66, 0x9d, 0x25, 0x31, 0x83, 0x6e, 0xb8, 0xb8, 0xdd, 0xd1, 0x76, 0xd2, - 0xb9, 0xd2, 0x31, 0x0d, 0xb6, 0xf2, 0x7f, 0x59, 0x1c, 0xac, 0xa1, 0x72, 0x52, 0xad, 0xa1, 0xef, - 0x70, 0xff, 0x4c, 0x26, 0x73, 0x2b, 0xbc, 0xf2, 0xf4, 0x1c, 0x76, 0x8d, 0xca, 0x74, 0x4c, 0x13, - 0xc7, 0x1a, 0x14, 0x25, 0xcb, 0x59, 0x80, 0x23, 0x7d, 0x41, 0x5c, 0x00, 0xad, 0x02, 0x28, 0x4a, - 0x16, 0x10, 0x43, 0xe8, 0x5d, 0x8b, 0xd6, 0x8e, 0x7f, 0x05, 0x0f, 0x4f, 0xcd, 0x48, 0x65, 0x09, - 0x8f, 0x95, 0x4c, 0xb8, 0xe6, 0x59, 0x44, 0x08, 0xfd, 0x75, 0xb4, 0x76, 0xf7, 0x2f, 0x60, 0x4f, - 0x9a, 0xc9, 0xc2, 0xe2, 0x93, 0xd4, 0xf2, 0x65, 0x06, 0xba, 0xd2, 0xd1, 0x78, 0x2d, 0x60, 0xd7, - 0x79, 0x52, 0x04, 0x68, 0x8f, 0xcf, 0x7e, 0x9c, 0x9c, 0x7e, 0xed, 0x35, 0xb0, 0x03, 0x5b, 0xe3, - 0x6f, 0x1f, 0x7b, 0xcd, 0xe3, 0xbf, 0x2d, 0x80, 0xcf, 0x55, 0xe8, 0xf1, 0x04, 0xe0, 0x3a, 0x80, - 0xe8, 0xad, 0xad, 0x66, 0x2d, 0xee, 0xde, 0x93, 0x8d, 0xbd, 0xc2, 0xb5, 0x68, 0xe0, 0x5b, 0xd8, - 0xce, 0x13, 0x83, 0x8f, 0x2a, 0xce, 0x4d, 0xa5, 0xb7, 0x7f, 0xb3, 0xec, 0xde, 0xcc, 0x57, 0xeb, - 0xdc, 0x74, 0x43, 0xe5, 0xdc, 0x5c, 0x4b, 0x80, 0x68, 0xe0, 0x3b, 0xd8, 0x59, 0x2d, 0x06, 0x07, - 0x15, 0x75, 0x23, 0x00, 0xde, 0xe3, 0x0d, 0x9d, 0x4a, 0x62, 0x04, 0x5d, 0x77, 0x0d, 0xf8, 0xb4, - 0x82, 0x37, 0x2c, 0xd2, 0x7b, 0xf6, 0x9f, 0xee, 0x4a, 0x6e, 0xda, 0xce, 0x3f, 0x1c, 0x6f, 0xfe, - 0x05, 0x00, 0x00, 0xff, 0xff, 0x54, 0x94, 0x73, 0xfe, 0x87, 0x04, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// FilesystemClient is the client API for Filesystem service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type FilesystemClient interface { - // PathExists checks if the requested path exists in the host's filesystem - PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) - // Mkdir creates a directory at the requested path in the host's filesystem - Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) - // Rmdir removes the directory at the requested path in the host's filesystem. - // This may be used for unlinking a symlink created through LinkPath - Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) - // LinkPath creates a local directory symbolic link between a source path - // and target path in the host's filesystem - LinkPath(ctx context.Context, in *LinkPathRequest, opts ...grpc.CallOption) (*LinkPathResponse, error) - //IsMountPoint checks if a given path is mount or not - IsMountPoint(ctx context.Context, in *IsMountPointRequest, opts ...grpc.CallOption) (*IsMountPointResponse, error) -} - -type filesystemClient struct { - cc *grpc.ClientConn -} - -func NewFilesystemClient(cc *grpc.ClientConn) FilesystemClient { - return &filesystemClient{cc} -} - -func (c *filesystemClient) PathExists(ctx context.Context, in *PathExistsRequest, opts ...grpc.CallOption) (*PathExistsResponse, error) { - out := new(PathExistsResponse) - err := c.cc.Invoke(ctx, "/v1beta1.Filesystem/PathExists", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *filesystemClient) Mkdir(ctx context.Context, in *MkdirRequest, opts ...grpc.CallOption) (*MkdirResponse, error) { - out := new(MkdirResponse) - err := c.cc.Invoke(ctx, "/v1beta1.Filesystem/Mkdir", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *filesystemClient) Rmdir(ctx context.Context, in *RmdirRequest, opts ...grpc.CallOption) (*RmdirResponse, error) { - out := new(RmdirResponse) - err := c.cc.Invoke(ctx, "/v1beta1.Filesystem/Rmdir", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *filesystemClient) LinkPath(ctx context.Context, in *LinkPathRequest, opts ...grpc.CallOption) (*LinkPathResponse, error) { - out := new(LinkPathResponse) - err := c.cc.Invoke(ctx, "/v1beta1.Filesystem/LinkPath", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *filesystemClient) IsMountPoint(ctx context.Context, in *IsMountPointRequest, opts ...grpc.CallOption) (*IsMountPointResponse, error) { - out := new(IsMountPointResponse) - err := c.cc.Invoke(ctx, "/v1beta1.Filesystem/IsMountPoint", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// FilesystemServer is the server API for Filesystem service. -type FilesystemServer interface { - // PathExists checks if the requested path exists in the host's filesystem - PathExists(context.Context, *PathExistsRequest) (*PathExistsResponse, error) - // Mkdir creates a directory at the requested path in the host's filesystem - Mkdir(context.Context, *MkdirRequest) (*MkdirResponse, error) - // Rmdir removes the directory at the requested path in the host's filesystem. - // This may be used for unlinking a symlink created through LinkPath - Rmdir(context.Context, *RmdirRequest) (*RmdirResponse, error) - // LinkPath creates a local directory symbolic link between a source path - // and target path in the host's filesystem - LinkPath(context.Context, *LinkPathRequest) (*LinkPathResponse, error) - //IsMountPoint checks if a given path is mount or not - IsMountPoint(context.Context, *IsMountPointRequest) (*IsMountPointResponse, error) -} - -// UnimplementedFilesystemServer can be embedded to have forward compatible implementations. -type UnimplementedFilesystemServer struct { -} - -func (*UnimplementedFilesystemServer) PathExists(ctx context.Context, req *PathExistsRequest) (*PathExistsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PathExists not implemented") -} -func (*UnimplementedFilesystemServer) Mkdir(ctx context.Context, req *MkdirRequest) (*MkdirResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Mkdir not implemented") -} -func (*UnimplementedFilesystemServer) Rmdir(ctx context.Context, req *RmdirRequest) (*RmdirResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Rmdir not implemented") -} -func (*UnimplementedFilesystemServer) LinkPath(ctx context.Context, req *LinkPathRequest) (*LinkPathResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method LinkPath not implemented") -} -func (*UnimplementedFilesystemServer) IsMountPoint(ctx context.Context, req *IsMountPointRequest) (*IsMountPointResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsMountPoint not implemented") -} - -func RegisterFilesystemServer(s *grpc.Server, srv FilesystemServer) { - s.RegisterService(&_Filesystem_serviceDesc, srv) -} - -func _Filesystem_PathExists_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PathExistsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FilesystemServer).PathExists(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta1.Filesystem/PathExists", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FilesystemServer).PathExists(ctx, req.(*PathExistsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Filesystem_Mkdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MkdirRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FilesystemServer).Mkdir(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta1.Filesystem/Mkdir", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FilesystemServer).Mkdir(ctx, req.(*MkdirRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Filesystem_Rmdir_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RmdirRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FilesystemServer).Rmdir(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta1.Filesystem/Rmdir", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FilesystemServer).Rmdir(ctx, req.(*RmdirRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Filesystem_LinkPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(LinkPathRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FilesystemServer).LinkPath(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta1.Filesystem/LinkPath", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FilesystemServer).LinkPath(ctx, req.(*LinkPathRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Filesystem_IsMountPoint_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsMountPointRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(FilesystemServer).IsMountPoint(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta1.Filesystem/IsMountPoint", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(FilesystemServer).IsMountPoint(ctx, req.(*IsMountPointRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Filesystem_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1beta1.Filesystem", - HandlerType: (*FilesystemServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "PathExists", - Handler: _Filesystem_PathExists_Handler, - }, - { - MethodName: "Mkdir", - Handler: _Filesystem_Mkdir_Handler, - }, - { - MethodName: "Rmdir", - Handler: _Filesystem_Rmdir_Handler, - }, - { - MethodName: "LinkPath", - Handler: _Filesystem_LinkPath_Handler, - }, - { - MethodName: "IsMountPoint", - Handler: _Filesystem_IsMountPoint_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1/api.proto", -} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go new file mode 100644 index 0000000000..2a7a9be184 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.pb.go @@ -0,0 +1,1876 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.12.4 +// source: github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type ListVolumesOnDiskRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Disk device number of the disk to query for volumes. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` + // The partition number (optional), by default it uses the first partition of the disk. + PartitionNumber uint32 `protobuf:"varint,2,opt,name=partition_number,json=partitionNumber,proto3" json:"partition_number,omitempty"` +} + +func (x *ListVolumesOnDiskRequest) Reset() { + *x = ListVolumesOnDiskRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumesOnDiskRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumesOnDiskRequest) ProtoMessage() {} + +func (x *ListVolumesOnDiskRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumesOnDiskRequest.ProtoReflect.Descriptor instead. +func (*ListVolumesOnDiskRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{0} +} + +func (x *ListVolumesOnDiskRequest) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +func (x *ListVolumesOnDiskRequest) GetPartitionNumber() uint32 { + if x != nil { + return x.PartitionNumber + } + return 0 +} + +type ListVolumesOnDiskResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device IDs of volumes on the specified disk. + VolumeIds []string `protobuf:"bytes,1,rep,name=volume_ids,json=volumeIds,proto3" json:"volume_ids,omitempty"` +} + +func (x *ListVolumesOnDiskResponse) Reset() { + *x = ListVolumesOnDiskResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListVolumesOnDiskResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListVolumesOnDiskResponse) ProtoMessage() {} + +func (x *ListVolumesOnDiskResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListVolumesOnDiskResponse.ProtoReflect.Descriptor instead. +func (*ListVolumesOnDiskResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{1} +} + +func (x *ListVolumesOnDiskResponse) GetVolumeIds() []string { + if x != nil { + return x.VolumeIds + } + return nil +} + +type MountVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to mount. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // Path in the host's file system where the volume needs to be mounted. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *MountVolumeRequest) Reset() { + *x = MountVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MountVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MountVolumeRequest) ProtoMessage() {} + +func (x *MountVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MountVolumeRequest.ProtoReflect.Descriptor instead. +func (*MountVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{2} +} + +func (x *MountVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *MountVolumeRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type MountVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MountVolumeResponse) Reset() { + *x = MountVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MountVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MountVolumeResponse) ProtoMessage() {} + +func (x *MountVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MountVolumeResponse.ProtoReflect.Descriptor instead. +func (*MountVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{3} +} + +type UnmountVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to dismount. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // Path where the volume has been mounted. + TargetPath string `protobuf:"bytes,2,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *UnmountVolumeRequest) Reset() { + *x = UnmountVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnmountVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnmountVolumeRequest) ProtoMessage() {} + +func (x *UnmountVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnmountVolumeRequest.ProtoReflect.Descriptor instead. +func (*UnmountVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{4} +} + +func (x *UnmountVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *UnmountVolumeRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type UnmountVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *UnmountVolumeResponse) Reset() { + *x = UnmountVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UnmountVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UnmountVolumeResponse) ProtoMessage() {} + +func (x *UnmountVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UnmountVolumeResponse.ProtoReflect.Descriptor instead. +func (*UnmountVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{5} +} + +type IsVolumeFormattedRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to check. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *IsVolumeFormattedRequest) Reset() { + *x = IsVolumeFormattedRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsVolumeFormattedRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsVolumeFormattedRequest) ProtoMessage() {} + +func (x *IsVolumeFormattedRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsVolumeFormattedRequest.ProtoReflect.Descriptor instead. +func (*IsVolumeFormattedRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{6} +} + +func (x *IsVolumeFormattedRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type IsVolumeFormattedResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Is the volume formatted with NTFS. + Formatted bool `protobuf:"varint,1,opt,name=formatted,proto3" json:"formatted,omitempty"` +} + +func (x *IsVolumeFormattedResponse) Reset() { + *x = IsVolumeFormattedResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *IsVolumeFormattedResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IsVolumeFormattedResponse) ProtoMessage() {} + +func (x *IsVolumeFormattedResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IsVolumeFormattedResponse.ProtoReflect.Descriptor instead. +func (*IsVolumeFormattedResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{7} +} + +func (x *IsVolumeFormattedResponse) GetFormatted() bool { + if x != nil { + return x.Formatted + } + return false +} + +type FormatVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to format. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *FormatVolumeRequest) Reset() { + *x = FormatVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FormatVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FormatVolumeRequest) ProtoMessage() {} + +func (x *FormatVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FormatVolumeRequest.ProtoReflect.Descriptor instead. +func (*FormatVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{8} +} + +func (x *FormatVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type FormatVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *FormatVolumeResponse) Reset() { + *x = FormatVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FormatVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FormatVolumeResponse) ProtoMessage() {} + +func (x *FormatVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FormatVolumeResponse.ProtoReflect.Descriptor instead. +func (*FormatVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{9} +} + +type ResizeVolumeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to resize. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` + // New size in bytes of the volume. + SizeBytes int64 `protobuf:"varint,2,opt,name=size_bytes,json=sizeBytes,proto3" json:"size_bytes,omitempty"` +} + +func (x *ResizeVolumeRequest) Reset() { + *x = ResizeVolumeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResizeVolumeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResizeVolumeRequest) ProtoMessage() {} + +func (x *ResizeVolumeRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResizeVolumeRequest.ProtoReflect.Descriptor instead. +func (*ResizeVolumeRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{10} +} + +func (x *ResizeVolumeRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +func (x *ResizeVolumeRequest) GetSizeBytes() int64 { + if x != nil { + return x.SizeBytes + } + return 0 +} + +type ResizeVolumeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ResizeVolumeResponse) Reset() { + *x = ResizeVolumeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ResizeVolumeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ResizeVolumeResponse) ProtoMessage() {} + +func (x *ResizeVolumeResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ResizeVolumeResponse.ProtoReflect.Descriptor instead. +func (*ResizeVolumeResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{11} +} + +type GetVolumeStatsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device Id of the volume to get the stats for. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *GetVolumeStatsRequest) Reset() { + *x = GetVolumeStatsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeStatsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeStatsRequest) ProtoMessage() {} + +func (x *GetVolumeStatsRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeStatsRequest.ProtoReflect.Descriptor instead. +func (*GetVolumeStatsRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{12} +} + +func (x *GetVolumeStatsRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type GetVolumeStatsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Total bytes + TotalBytes int64 `protobuf:"varint,1,opt,name=total_bytes,json=totalBytes,proto3" json:"total_bytes,omitempty"` + // Used bytes + UsedBytes int64 `protobuf:"varint,2,opt,name=used_bytes,json=usedBytes,proto3" json:"used_bytes,omitempty"` +} + +func (x *GetVolumeStatsResponse) Reset() { + *x = GetVolumeStatsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeStatsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeStatsResponse) ProtoMessage() {} + +func (x *GetVolumeStatsResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeStatsResponse.ProtoReflect.Descriptor instead. +func (*GetVolumeStatsResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{13} +} + +func (x *GetVolumeStatsResponse) GetTotalBytes() int64 { + if x != nil { + return x.TotalBytes + } + return 0 +} + +func (x *GetVolumeStatsResponse) GetUsedBytes() int64 { + if x != nil { + return x.UsedBytes + } + return 0 +} + +type GetDiskNumberFromVolumeIDRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to get the disk number for. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *GetDiskNumberFromVolumeIDRequest) Reset() { + *x = GetDiskNumberFromVolumeIDRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskNumberFromVolumeIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskNumberFromVolumeIDRequest) ProtoMessage() {} + +func (x *GetDiskNumberFromVolumeIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskNumberFromVolumeIDRequest.ProtoReflect.Descriptor instead. +func (*GetDiskNumberFromVolumeIDRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{14} +} + +func (x *GetDiskNumberFromVolumeIDRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type GetDiskNumberFromVolumeIDResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Corresponding disk number. + DiskNumber uint32 `protobuf:"varint,1,opt,name=disk_number,json=diskNumber,proto3" json:"disk_number,omitempty"` +} + +func (x *GetDiskNumberFromVolumeIDResponse) Reset() { + *x = GetDiskNumberFromVolumeIDResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetDiskNumberFromVolumeIDResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetDiskNumberFromVolumeIDResponse) ProtoMessage() {} + +func (x *GetDiskNumberFromVolumeIDResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetDiskNumberFromVolumeIDResponse.ProtoReflect.Descriptor instead. +func (*GetDiskNumberFromVolumeIDResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{15} +} + +func (x *GetDiskNumberFromVolumeIDResponse) GetDiskNumber() uint32 { + if x != nil { + return x.DiskNumber + } + return 0 +} + +type GetVolumeIDFromTargetPathRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The target path. + TargetPath string `protobuf:"bytes,1,opt,name=target_path,json=targetPath,proto3" json:"target_path,omitempty"` +} + +func (x *GetVolumeIDFromTargetPathRequest) Reset() { + *x = GetVolumeIDFromTargetPathRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeIDFromTargetPathRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeIDFromTargetPathRequest) ProtoMessage() {} + +func (x *GetVolumeIDFromTargetPathRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeIDFromTargetPathRequest.ProtoReflect.Descriptor instead. +func (*GetVolumeIDFromTargetPathRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{16} +} + +func (x *GetVolumeIDFromTargetPathRequest) GetTargetPath() string { + if x != nil { + return x.TargetPath + } + return "" +} + +type GetVolumeIDFromTargetPathResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The volume device ID. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *GetVolumeIDFromTargetPathResponse) Reset() { + *x = GetVolumeIDFromTargetPathResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetVolumeIDFromTargetPathResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetVolumeIDFromTargetPathResponse) ProtoMessage() {} + +func (x *GetVolumeIDFromTargetPathResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetVolumeIDFromTargetPathResponse.ProtoReflect.Descriptor instead. +func (*GetVolumeIDFromTargetPathResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{17} +} + +func (x *GetVolumeIDFromTargetPathResponse) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type WriteVolumeCacheRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Volume device ID of the volume to flush the cache. + VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` +} + +func (x *WriteVolumeCacheRequest) Reset() { + *x = WriteVolumeCacheRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteVolumeCacheRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteVolumeCacheRequest) ProtoMessage() {} + +func (x *WriteVolumeCacheRequest) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteVolumeCacheRequest.ProtoReflect.Descriptor instead. +func (*WriteVolumeCacheRequest) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{18} +} + +func (x *WriteVolumeCacheRequest) GetVolumeId() string { + if x != nil { + return x.VolumeId + } + return "" +} + +type WriteVolumeCacheResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WriteVolumeCacheResponse) Reset() { + *x = WriteVolumeCacheResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WriteVolumeCacheResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WriteVolumeCacheResponse) ProtoMessage() {} + +func (x *WriteVolumeCacheResponse) ProtoReflect() protoreflect.Message { + mi := &file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WriteVolumeCacheResponse.ProtoReflect.Descriptor instead. +func (*WriteVolumeCacheResponse) Descriptor() ([]byte, []int) { + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP(), []int{19} +} + +var File_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto protoreflect.FileDescriptor + +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc = []byte{ + 0x0a, 0x42, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x70, 0x69, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x66, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x0f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x22, 0x3a, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4f, + 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, + 0x0a, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x73, 0x22, 0x52, 0x0a, 0x12, + 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, + 0x1f, 0x0a, 0x0b, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, + 0x22, 0x15, 0x0a, 0x13, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x54, 0x0a, 0x14, 0x55, 0x6e, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x17, 0x0a, + 0x15, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x37, 0x0a, 0x18, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, + 0x39, 0x0a, 0x19, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, + 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x09, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x22, 0x32, 0x0a, 0x13, 0x46, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x16, + 0x0a, 0x14, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x13, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, + 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x69, + 0x7a, 0x65, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x73, 0x69, 0x7a, 0x65, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x16, 0x0a, 0x14, 0x52, 0x65, 0x73, + 0x69, 0x7a, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x34, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x58, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x56, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x73, 0x65, 0x64, 0x42, 0x79, 0x74, 0x65, + 0x73, 0x22, 0x3f, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x49, 0x64, 0x22, 0x44, 0x0a, 0x21, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x69, 0x73, 0x6b, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x69, + 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x43, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x22, 0x40, 0x0a, + 0x21, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, 0x72, 0x6f, 0x6d, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, + 0x36, 0x0a, 0x17, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x61, + 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x6f, + 0x6c, 0x75, 0x6d, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x64, 0x22, 0x1a, 0x0a, 0x18, 0x57, 0x72, 0x69, 0x74, 0x65, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xb8, 0x06, 0x0a, 0x06, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x52, + 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x44, + 0x69, 0x73, 0x6b, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x73, 0x4f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x73, 0x4f, 0x6e, 0x44, 0x69, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x40, 0x0a, 0x0b, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, + 0x65, 0x12, 0x16, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0d, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x52, 0x0a, 0x11, + 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, + 0x64, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x73, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x46, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0c, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x31, 0x2e, 0x46, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x12, 0x17, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, + 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x69, 0x7a, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x76, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, + 0x49, 0x44, 0x12, 0x24, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, + 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, + 0x74, 0x44, 0x69, 0x73, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, + 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, + 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x24, + 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, + 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, 0x61, 0x74, 0x68, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x56, 0x6f, 0x6c, + 0x75, 0x6d, 0x65, 0x49, 0x44, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x50, + 0x61, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a, + 0x10, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, 0x61, 0x63, 0x68, + 0x65, 0x12, 0x1b, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, + 0x6d, 0x65, 0x43, 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, + 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x72, 0x69, 0x74, 0x65, 0x56, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x43, + 0x61, 0x63, 0x68, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x3a, + 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x62, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x65, 0x73, 0x2d, 0x63, 0x73, 0x69, 0x2f, 0x63, 0x73, 0x69, 0x2d, + 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x76, 0x6f, 0x6c, 0x75, 0x6d, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescOnce sync.Once + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData = file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc +) + +func file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescGZIP() []byte { + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescOnce.Do(func() { + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData = protoimpl.X.CompressGZIP(file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData) + }) + return file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDescData +} + +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes = make([]protoimpl.MessageInfo, 20) +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_goTypes = []interface{}{ + (*ListVolumesOnDiskRequest)(nil), // 0: v1.ListVolumesOnDiskRequest + (*ListVolumesOnDiskResponse)(nil), // 1: v1.ListVolumesOnDiskResponse + (*MountVolumeRequest)(nil), // 2: v1.MountVolumeRequest + (*MountVolumeResponse)(nil), // 3: v1.MountVolumeResponse + (*UnmountVolumeRequest)(nil), // 4: v1.UnmountVolumeRequest + (*UnmountVolumeResponse)(nil), // 5: v1.UnmountVolumeResponse + (*IsVolumeFormattedRequest)(nil), // 6: v1.IsVolumeFormattedRequest + (*IsVolumeFormattedResponse)(nil), // 7: v1.IsVolumeFormattedResponse + (*FormatVolumeRequest)(nil), // 8: v1.FormatVolumeRequest + (*FormatVolumeResponse)(nil), // 9: v1.FormatVolumeResponse + (*ResizeVolumeRequest)(nil), // 10: v1.ResizeVolumeRequest + (*ResizeVolumeResponse)(nil), // 11: v1.ResizeVolumeResponse + (*GetVolumeStatsRequest)(nil), // 12: v1.GetVolumeStatsRequest + (*GetVolumeStatsResponse)(nil), // 13: v1.GetVolumeStatsResponse + (*GetDiskNumberFromVolumeIDRequest)(nil), // 14: v1.GetDiskNumberFromVolumeIDRequest + (*GetDiskNumberFromVolumeIDResponse)(nil), // 15: v1.GetDiskNumberFromVolumeIDResponse + (*GetVolumeIDFromTargetPathRequest)(nil), // 16: v1.GetVolumeIDFromTargetPathRequest + (*GetVolumeIDFromTargetPathResponse)(nil), // 17: v1.GetVolumeIDFromTargetPathResponse + (*WriteVolumeCacheRequest)(nil), // 18: v1.WriteVolumeCacheRequest + (*WriteVolumeCacheResponse)(nil), // 19: v1.WriteVolumeCacheResponse +} +var file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_depIdxs = []int32{ + 0, // 0: v1.Volume.ListVolumesOnDisk:input_type -> v1.ListVolumesOnDiskRequest + 2, // 1: v1.Volume.MountVolume:input_type -> v1.MountVolumeRequest + 4, // 2: v1.Volume.UnmountVolume:input_type -> v1.UnmountVolumeRequest + 6, // 3: v1.Volume.IsVolumeFormatted:input_type -> v1.IsVolumeFormattedRequest + 8, // 4: v1.Volume.FormatVolume:input_type -> v1.FormatVolumeRequest + 10, // 5: v1.Volume.ResizeVolume:input_type -> v1.ResizeVolumeRequest + 12, // 6: v1.Volume.GetVolumeStats:input_type -> v1.GetVolumeStatsRequest + 14, // 7: v1.Volume.GetDiskNumberFromVolumeID:input_type -> v1.GetDiskNumberFromVolumeIDRequest + 16, // 8: v1.Volume.GetVolumeIDFromTargetPath:input_type -> v1.GetVolumeIDFromTargetPathRequest + 18, // 9: v1.Volume.WriteVolumeCache:input_type -> v1.WriteVolumeCacheRequest + 1, // 10: v1.Volume.ListVolumesOnDisk:output_type -> v1.ListVolumesOnDiskResponse + 3, // 11: v1.Volume.MountVolume:output_type -> v1.MountVolumeResponse + 5, // 12: v1.Volume.UnmountVolume:output_type -> v1.UnmountVolumeResponse + 7, // 13: v1.Volume.IsVolumeFormatted:output_type -> v1.IsVolumeFormattedResponse + 9, // 14: v1.Volume.FormatVolume:output_type -> v1.FormatVolumeResponse + 11, // 15: v1.Volume.ResizeVolume:output_type -> v1.ResizeVolumeResponse + 13, // 16: v1.Volume.GetVolumeStats:output_type -> v1.GetVolumeStatsResponse + 15, // 17: v1.Volume.GetDiskNumberFromVolumeID:output_type -> v1.GetDiskNumberFromVolumeIDResponse + 17, // 18: v1.Volume.GetVolumeIDFromTargetPath:output_type -> v1.GetVolumeIDFromTargetPathResponse + 19, // 19: v1.Volume.WriteVolumeCache:output_type -> v1.WriteVolumeCacheResponse + 10, // [10:20] is the sub-list for method output_type + 0, // [0:10] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_init() } +func file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_init() { + if File_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumesOnDiskRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListVolumesOnDiskResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MountVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MountVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnmountVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UnmountVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsVolumeFormattedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IsVolumeFormattedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormatVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FormatVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResizeVolumeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResizeVolumeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeStatsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeStatsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskNumberFromVolumeIDRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetDiskNumberFromVolumeIDResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeIDFromTargetPathRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetVolumeIDFromTargetPathResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteVolumeCacheRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*WriteVolumeCacheResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc, + NumEnums: 0, + NumMessages: 20, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_goTypes, + DependencyIndexes: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_depIdxs, + MessageInfos: file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_msgTypes, + }.Build() + File_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto = out.File + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_rawDesc = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_goTypes = nil + file_github_com_kubernetes_csi_csi_proxy_client_api_volume_v1_api_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// VolumeClient is the client API for Volume service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type VolumeClient interface { + // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a + // given disk number and partition number (optional) + ListVolumesOnDisk(ctx context.Context, in *ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*ListVolumesOnDiskResponse, error) + // MountVolume mounts the volume at the requested global staging path. + MountVolume(ctx context.Context, in *MountVolumeRequest, opts ...grpc.CallOption) (*MountVolumeResponse, error) + // UnmountVolume flushes data cache to disk and removes the global staging path. + UnmountVolume(ctx context.Context, in *UnmountVolumeRequest, opts ...grpc.CallOption) (*UnmountVolumeResponse, error) + // IsVolumeFormatted checks if a volume is formatted. + IsVolumeFormatted(ctx context.Context, in *IsVolumeFormattedRequest, opts ...grpc.CallOption) (*IsVolumeFormattedResponse, error) + // FormatVolume formats a volume with NTFS. + FormatVolume(ctx context.Context, in *FormatVolumeRequest, opts ...grpc.CallOption) (*FormatVolumeResponse, error) + // ResizeVolume performs resizing of the partition and file system for a block based volume. + ResizeVolume(ctx context.Context, in *ResizeVolumeRequest, opts ...grpc.CallOption) (*ResizeVolumeResponse, error) + // GetVolumeStats gathers total bytes and used bytes for a volume. + GetVolumeStats(ctx context.Context, in *GetVolumeStatsRequest, opts ...grpc.CallOption) (*GetVolumeStatsResponse, error) + // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located. + GetDiskNumberFromVolumeID(ctx context.Context, in *GetDiskNumberFromVolumeIDRequest, opts ...grpc.CallOption) (*GetDiskNumberFromVolumeIDResponse, error) + // GetVolumeIDFromTargetPath gets the volume id for a given target path. + GetVolumeIDFromTargetPath(ctx context.Context, in *GetVolumeIDFromTargetPathRequest, opts ...grpc.CallOption) (*GetVolumeIDFromTargetPathResponse, error) + // WriteVolumeCache write volume cache to disk. + WriteVolumeCache(ctx context.Context, in *WriteVolumeCacheRequest, opts ...grpc.CallOption) (*WriteVolumeCacheResponse, error) +} + +type volumeClient struct { + cc grpc.ClientConnInterface +} + +func NewVolumeClient(cc grpc.ClientConnInterface) VolumeClient { + return &volumeClient{cc} +} + +func (c *volumeClient) ListVolumesOnDisk(ctx context.Context, in *ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*ListVolumesOnDiskResponse, error) { + out := new(ListVolumesOnDiskResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/ListVolumesOnDisk", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) MountVolume(ctx context.Context, in *MountVolumeRequest, opts ...grpc.CallOption) (*MountVolumeResponse, error) { + out := new(MountVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/MountVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) UnmountVolume(ctx context.Context, in *UnmountVolumeRequest, opts ...grpc.CallOption) (*UnmountVolumeResponse, error) { + out := new(UnmountVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/UnmountVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) IsVolumeFormatted(ctx context.Context, in *IsVolumeFormattedRequest, opts ...grpc.CallOption) (*IsVolumeFormattedResponse, error) { + out := new(IsVolumeFormattedResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/IsVolumeFormatted", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) FormatVolume(ctx context.Context, in *FormatVolumeRequest, opts ...grpc.CallOption) (*FormatVolumeResponse, error) { + out := new(FormatVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/FormatVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) ResizeVolume(ctx context.Context, in *ResizeVolumeRequest, opts ...grpc.CallOption) (*ResizeVolumeResponse, error) { + out := new(ResizeVolumeResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/ResizeVolume", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) GetVolumeStats(ctx context.Context, in *GetVolumeStatsRequest, opts ...grpc.CallOption) (*GetVolumeStatsResponse, error) { + out := new(GetVolumeStatsResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/GetVolumeStats", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) GetDiskNumberFromVolumeID(ctx context.Context, in *GetDiskNumberFromVolumeIDRequest, opts ...grpc.CallOption) (*GetDiskNumberFromVolumeIDResponse, error) { + out := new(GetDiskNumberFromVolumeIDResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/GetDiskNumberFromVolumeID", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) GetVolumeIDFromTargetPath(ctx context.Context, in *GetVolumeIDFromTargetPathRequest, opts ...grpc.CallOption) (*GetVolumeIDFromTargetPathResponse, error) { + out := new(GetVolumeIDFromTargetPathResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/GetVolumeIDFromTargetPath", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *volumeClient) WriteVolumeCache(ctx context.Context, in *WriteVolumeCacheRequest, opts ...grpc.CallOption) (*WriteVolumeCacheResponse, error) { + out := new(WriteVolumeCacheResponse) + err := c.cc.Invoke(ctx, "/v1.Volume/WriteVolumeCache", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// VolumeServer is the server API for Volume service. +type VolumeServer interface { + // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a + // given disk number and partition number (optional) + ListVolumesOnDisk(context.Context, *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error) + // MountVolume mounts the volume at the requested global staging path. + MountVolume(context.Context, *MountVolumeRequest) (*MountVolumeResponse, error) + // UnmountVolume flushes data cache to disk and removes the global staging path. + UnmountVolume(context.Context, *UnmountVolumeRequest) (*UnmountVolumeResponse, error) + // IsVolumeFormatted checks if a volume is formatted. + IsVolumeFormatted(context.Context, *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error) + // FormatVolume formats a volume with NTFS. + FormatVolume(context.Context, *FormatVolumeRequest) (*FormatVolumeResponse, error) + // ResizeVolume performs resizing of the partition and file system for a block based volume. + ResizeVolume(context.Context, *ResizeVolumeRequest) (*ResizeVolumeResponse, error) + // GetVolumeStats gathers total bytes and used bytes for a volume. + GetVolumeStats(context.Context, *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error) + // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located. + GetDiskNumberFromVolumeID(context.Context, *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error) + // GetVolumeIDFromTargetPath gets the volume id for a given target path. + GetVolumeIDFromTargetPath(context.Context, *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error) + // WriteVolumeCache write volume cache to disk. + WriteVolumeCache(context.Context, *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error) +} + +// UnimplementedVolumeServer can be embedded to have forward compatible implementations. +type UnimplementedVolumeServer struct { +} + +func (*UnimplementedVolumeServer) ListVolumesOnDisk(context.Context, *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListVolumesOnDisk not implemented") +} +func (*UnimplementedVolumeServer) MountVolume(context.Context, *MountVolumeRequest) (*MountVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MountVolume not implemented") +} +func (*UnimplementedVolumeServer) UnmountVolume(context.Context, *UnmountVolumeRequest) (*UnmountVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnmountVolume not implemented") +} +func (*UnimplementedVolumeServer) IsVolumeFormatted(context.Context, *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method IsVolumeFormatted not implemented") +} +func (*UnimplementedVolumeServer) FormatVolume(context.Context, *FormatVolumeRequest) (*FormatVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FormatVolume not implemented") +} +func (*UnimplementedVolumeServer) ResizeVolume(context.Context, *ResizeVolumeRequest) (*ResizeVolumeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ResizeVolume not implemented") +} +func (*UnimplementedVolumeServer) GetVolumeStats(context.Context, *GetVolumeStatsRequest) (*GetVolumeStatsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVolumeStats not implemented") +} +func (*UnimplementedVolumeServer) GetDiskNumberFromVolumeID(context.Context, *GetDiskNumberFromVolumeIDRequest) (*GetDiskNumberFromVolumeIDResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDiskNumberFromVolumeID not implemented") +} +func (*UnimplementedVolumeServer) GetVolumeIDFromTargetPath(context.Context, *GetVolumeIDFromTargetPathRequest) (*GetVolumeIDFromTargetPathResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetVolumeIDFromTargetPath not implemented") +} +func (*UnimplementedVolumeServer) WriteVolumeCache(context.Context, *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WriteVolumeCache not implemented") +} + +func RegisterVolumeServer(s *grpc.Server, srv VolumeServer) { + s.RegisterService(&_Volume_serviceDesc, srv) +} + +func _Volume_ListVolumesOnDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListVolumesOnDiskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).ListVolumesOnDisk(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/ListVolumesOnDisk", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).ListVolumesOnDisk(ctx, req.(*ListVolumesOnDiskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_MountVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MountVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).MountVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/MountVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).MountVolume(ctx, req.(*MountVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_UnmountVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UnmountVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).UnmountVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/UnmountVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).UnmountVolume(ctx, req.(*UnmountVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_IsVolumeFormatted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IsVolumeFormattedRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).IsVolumeFormatted(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/IsVolumeFormatted", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).IsVolumeFormatted(ctx, req.(*IsVolumeFormattedRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_FormatVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FormatVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).FormatVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/FormatVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).FormatVolume(ctx, req.(*FormatVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_ResizeVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResizeVolumeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).ResizeVolume(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/ResizeVolume", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).ResizeVolume(ctx, req.(*ResizeVolumeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_GetVolumeStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVolumeStatsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).GetVolumeStats(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/GetVolumeStats", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).GetVolumeStats(ctx, req.(*GetVolumeStatsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_GetDiskNumberFromVolumeID_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetDiskNumberFromVolumeIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).GetDiskNumberFromVolumeID(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/GetDiskNumberFromVolumeID", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).GetDiskNumberFromVolumeID(ctx, req.(*GetDiskNumberFromVolumeIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_GetVolumeIDFromTargetPath_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetVolumeIDFromTargetPathRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).GetVolumeIDFromTargetPath(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/GetVolumeIDFromTargetPath", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).GetVolumeIDFromTargetPath(ctx, req.(*GetVolumeIDFromTargetPathRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Volume_WriteVolumeCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WriteVolumeCacheRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(VolumeServer).WriteVolumeCache(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/v1.Volume/WriteVolumeCache", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(VolumeServer).WriteVolumeCache(ctx, req.(*WriteVolumeCacheRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Volume_serviceDesc = grpc.ServiceDesc{ + ServiceName: "v1.Volume", + HandlerType: (*VolumeServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListVolumesOnDisk", + Handler: _Volume_ListVolumesOnDisk_Handler, + }, + { + MethodName: "MountVolume", + Handler: _Volume_MountVolume_Handler, + }, + { + MethodName: "UnmountVolume", + Handler: _Volume_UnmountVolume_Handler, + }, + { + MethodName: "IsVolumeFormatted", + Handler: _Volume_IsVolumeFormatted_Handler, + }, + { + MethodName: "FormatVolume", + Handler: _Volume_FormatVolume_Handler, + }, + { + MethodName: "ResizeVolume", + Handler: _Volume_ResizeVolume_Handler, + }, + { + MethodName: "GetVolumeStats", + Handler: _Volume_GetVolumeStats_Handler, + }, + { + MethodName: "GetDiskNumberFromVolumeID", + Handler: _Volume_GetDiskNumberFromVolumeID_Handler, + }, + { + MethodName: "GetVolumeIDFromTargetPath", + Handler: _Volume_GetVolumeIDFromTargetPath_Handler, + }, + { + MethodName: "WriteVolumeCache", + Handler: _Volume_WriteVolumeCache_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto", +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto new file mode 100644 index 0000000000..a065381041 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1/api.proto @@ -0,0 +1,143 @@ +syntax = "proto3"; + +package v1; + +option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1"; + +service Volume { + // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for all volumes from a + // given disk number and partition number (optional) + rpc ListVolumesOnDisk(ListVolumesOnDiskRequest) returns (ListVolumesOnDiskResponse) {} + + // MountVolume mounts the volume at the requested global staging path. + rpc MountVolume(MountVolumeRequest) returns (MountVolumeResponse) {} + + // UnmountVolume flushes data cache to disk and removes the global staging path. + rpc UnmountVolume(UnmountVolumeRequest) returns (UnmountVolumeResponse) {} + + // IsVolumeFormatted checks if a volume is formatted. + rpc IsVolumeFormatted(IsVolumeFormattedRequest) returns (IsVolumeFormattedResponse) {} + + // FormatVolume formats a volume with NTFS. + rpc FormatVolume(FormatVolumeRequest) returns (FormatVolumeResponse) {} + + // ResizeVolume performs resizing of the partition and file system for a block based volume. + rpc ResizeVolume(ResizeVolumeRequest) returns (ResizeVolumeResponse) {} + + // GetVolumeStats gathers total bytes and used bytes for a volume. + rpc GetVolumeStats(GetVolumeStatsRequest) returns (GetVolumeStatsResponse) {} + + // GetDiskNumberFromVolumeID gets the disk number of the disk where the volume is located. + rpc GetDiskNumberFromVolumeID(GetDiskNumberFromVolumeIDRequest) returns (GetDiskNumberFromVolumeIDResponse ) {} + + // GetVolumeIDFromTargetPath gets the volume id for a given target path. + rpc GetVolumeIDFromTargetPath(GetVolumeIDFromTargetPathRequest) returns (GetVolumeIDFromTargetPathResponse) {} + + // WriteVolumeCache write volume cache to disk. + rpc WriteVolumeCache(WriteVolumeCacheRequest) returns (WriteVolumeCacheResponse) {} +} + +message ListVolumesOnDiskRequest { + // Disk device number of the disk to query for volumes. + uint32 disk_number = 1; + // The partition number (optional), by default it uses the first partition of the disk. + uint32 partition_number = 2; +} + +message ListVolumesOnDiskResponse { + // Volume device IDs of volumes on the specified disk. + repeated string volume_ids = 1; +} + +message MountVolumeRequest { + // Volume device ID of the volume to mount. + string volume_id = 1; + // Path in the host's file system where the volume needs to be mounted. + string target_path = 2; +} + +message MountVolumeResponse { + // Intentionally empty. +} + +message UnmountVolumeRequest { + // Volume device ID of the volume to dismount. + string volume_id = 1; + // Path where the volume has been mounted. + string target_path = 2; +} + +message UnmountVolumeResponse { + // Intentionally empty. +} + +message IsVolumeFormattedRequest { + // Volume device ID of the volume to check. + string volume_id = 1; +} + +message IsVolumeFormattedResponse { + // Is the volume formatted with NTFS. + bool formatted = 1; +} + +message FormatVolumeRequest { + // Volume device ID of the volume to format. + string volume_id = 1; +} + +message FormatVolumeResponse { + // Intentionally empty. +} + +message ResizeVolumeRequest { + // Volume device ID of the volume to resize. + string volume_id = 1; + // New size in bytes of the volume. + int64 size_bytes = 2; +} + +message ResizeVolumeResponse { + // Intentionally empty. +} + +message GetVolumeStatsRequest{ + // Volume device Id of the volume to get the stats for. + string volume_id = 1; +} + +message GetVolumeStatsResponse{ + // Total bytes + int64 total_bytes = 1; + // Used bytes + int64 used_bytes = 2; +} + +message GetDiskNumberFromVolumeIDRequest { + // Volume device ID of the volume to get the disk number for. + string volume_id = 1; +} + +message GetDiskNumberFromVolumeIDResponse { + // Corresponding disk number. + uint32 disk_number = 1; +} + +message GetVolumeIDFromTargetPathRequest { + // The target path. + string target_path = 1; +} + +message GetVolumeIDFromTargetPathResponse { + // The volume device ID. + string volume_id = 1; +} + +message WriteVolumeCacheRequest { + // Volume device ID of the volume to flush the cache. + string volume_id = 1; +} + +message WriteVolumeCacheResponse { + // Intentionally empty. +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2/api.pb.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2/api.pb.go deleted file mode 100644 index 2bc4962c9c..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2/api.pb.go +++ /dev/null @@ -1,1313 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: client/api/volume/v1beta2/api.proto - -package v1beta2 - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type ListVolumesOnDiskRequest struct { - // Disk device ID of the disk to query for volumes - DiskId string `protobuf:"bytes,1,opt,name=disk_id,json=diskId,proto3" json:"disk_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListVolumesOnDiskRequest) Reset() { *m = ListVolumesOnDiskRequest{} } -func (m *ListVolumesOnDiskRequest) String() string { return proto.CompactTextString(m) } -func (*ListVolumesOnDiskRequest) ProtoMessage() {} -func (*ListVolumesOnDiskRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{0} -} - -func (m *ListVolumesOnDiskRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListVolumesOnDiskRequest.Unmarshal(m, b) -} -func (m *ListVolumesOnDiskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListVolumesOnDiskRequest.Marshal(b, m, deterministic) -} -func (m *ListVolumesOnDiskRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListVolumesOnDiskRequest.Merge(m, src) -} -func (m *ListVolumesOnDiskRequest) XXX_Size() int { - return xxx_messageInfo_ListVolumesOnDiskRequest.Size(m) -} -func (m *ListVolumesOnDiskRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ListVolumesOnDiskRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ListVolumesOnDiskRequest proto.InternalMessageInfo - -func (m *ListVolumesOnDiskRequest) GetDiskId() string { - if m != nil { - return m.DiskId - } - return "" -} - -type ListVolumesOnDiskResponse struct { - // Volume device IDs of volumes on the specified disk - VolumeIds []string `protobuf:"bytes,1,rep,name=volume_ids,json=volumeIds,proto3" json:"volume_ids,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ListVolumesOnDiskResponse) Reset() { *m = ListVolumesOnDiskResponse{} } -func (m *ListVolumesOnDiskResponse) String() string { return proto.CompactTextString(m) } -func (*ListVolumesOnDiskResponse) ProtoMessage() {} -func (*ListVolumesOnDiskResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{1} -} - -func (m *ListVolumesOnDiskResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ListVolumesOnDiskResponse.Unmarshal(m, b) -} -func (m *ListVolumesOnDiskResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ListVolumesOnDiskResponse.Marshal(b, m, deterministic) -} -func (m *ListVolumesOnDiskResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ListVolumesOnDiskResponse.Merge(m, src) -} -func (m *ListVolumesOnDiskResponse) XXX_Size() int { - return xxx_messageInfo_ListVolumesOnDiskResponse.Size(m) -} -func (m *ListVolumesOnDiskResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ListVolumesOnDiskResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ListVolumesOnDiskResponse proto.InternalMessageInfo - -func (m *ListVolumesOnDiskResponse) GetVolumeIds() []string { - if m != nil { - return m.VolumeIds - } - return nil -} - -type MountVolumeRequest struct { - // Volume device ID of the volume to mount - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - // Path in the host's file system where the volume needs to be mounted - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MountVolumeRequest) Reset() { *m = MountVolumeRequest{} } -func (m *MountVolumeRequest) String() string { return proto.CompactTextString(m) } -func (*MountVolumeRequest) ProtoMessage() {} -func (*MountVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{2} -} - -func (m *MountVolumeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MountVolumeRequest.Unmarshal(m, b) -} -func (m *MountVolumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MountVolumeRequest.Marshal(b, m, deterministic) -} -func (m *MountVolumeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_MountVolumeRequest.Merge(m, src) -} -func (m *MountVolumeRequest) XXX_Size() int { - return xxx_messageInfo_MountVolumeRequest.Size(m) -} -func (m *MountVolumeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_MountVolumeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_MountVolumeRequest proto.InternalMessageInfo - -func (m *MountVolumeRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -func (m *MountVolumeRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -type MountVolumeResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *MountVolumeResponse) Reset() { *m = MountVolumeResponse{} } -func (m *MountVolumeResponse) String() string { return proto.CompactTextString(m) } -func (*MountVolumeResponse) ProtoMessage() {} -func (*MountVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{3} -} - -func (m *MountVolumeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MountVolumeResponse.Unmarshal(m, b) -} -func (m *MountVolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MountVolumeResponse.Marshal(b, m, deterministic) -} -func (m *MountVolumeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MountVolumeResponse.Merge(m, src) -} -func (m *MountVolumeResponse) XXX_Size() int { - return xxx_messageInfo_MountVolumeResponse.Size(m) -} -func (m *MountVolumeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MountVolumeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MountVolumeResponse proto.InternalMessageInfo - -type DismountVolumeRequest struct { - // Volume device ID of the volume to dismount - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - // Path where the volume has been mounted. - Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DismountVolumeRequest) Reset() { *m = DismountVolumeRequest{} } -func (m *DismountVolumeRequest) String() string { return proto.CompactTextString(m) } -func (*DismountVolumeRequest) ProtoMessage() {} -func (*DismountVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{4} -} - -func (m *DismountVolumeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DismountVolumeRequest.Unmarshal(m, b) -} -func (m *DismountVolumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DismountVolumeRequest.Marshal(b, m, deterministic) -} -func (m *DismountVolumeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_DismountVolumeRequest.Merge(m, src) -} -func (m *DismountVolumeRequest) XXX_Size() int { - return xxx_messageInfo_DismountVolumeRequest.Size(m) -} -func (m *DismountVolumeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_DismountVolumeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_DismountVolumeRequest proto.InternalMessageInfo - -func (m *DismountVolumeRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -func (m *DismountVolumeRequest) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -type DismountVolumeResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *DismountVolumeResponse) Reset() { *m = DismountVolumeResponse{} } -func (m *DismountVolumeResponse) String() string { return proto.CompactTextString(m) } -func (*DismountVolumeResponse) ProtoMessage() {} -func (*DismountVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{5} -} - -func (m *DismountVolumeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DismountVolumeResponse.Unmarshal(m, b) -} -func (m *DismountVolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DismountVolumeResponse.Marshal(b, m, deterministic) -} -func (m *DismountVolumeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_DismountVolumeResponse.Merge(m, src) -} -func (m *DismountVolumeResponse) XXX_Size() int { - return xxx_messageInfo_DismountVolumeResponse.Size(m) -} -func (m *DismountVolumeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_DismountVolumeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_DismountVolumeResponse proto.InternalMessageInfo - -type IsVolumeFormattedRequest struct { - // Volume device ID of the volume to check - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IsVolumeFormattedRequest) Reset() { *m = IsVolumeFormattedRequest{} } -func (m *IsVolumeFormattedRequest) String() string { return proto.CompactTextString(m) } -func (*IsVolumeFormattedRequest) ProtoMessage() {} -func (*IsVolumeFormattedRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{6} -} - -func (m *IsVolumeFormattedRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IsVolumeFormattedRequest.Unmarshal(m, b) -} -func (m *IsVolumeFormattedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IsVolumeFormattedRequest.Marshal(b, m, deterministic) -} -func (m *IsVolumeFormattedRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsVolumeFormattedRequest.Merge(m, src) -} -func (m *IsVolumeFormattedRequest) XXX_Size() int { - return xxx_messageInfo_IsVolumeFormattedRequest.Size(m) -} -func (m *IsVolumeFormattedRequest) XXX_DiscardUnknown() { - xxx_messageInfo_IsVolumeFormattedRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_IsVolumeFormattedRequest proto.InternalMessageInfo - -func (m *IsVolumeFormattedRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -type IsVolumeFormattedResponse struct { - // Is the volume formatted with NTFS - Formatted bool `protobuf:"varint,1,opt,name=formatted,proto3" json:"formatted,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *IsVolumeFormattedResponse) Reset() { *m = IsVolumeFormattedResponse{} } -func (m *IsVolumeFormattedResponse) String() string { return proto.CompactTextString(m) } -func (*IsVolumeFormattedResponse) ProtoMessage() {} -func (*IsVolumeFormattedResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{7} -} - -func (m *IsVolumeFormattedResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IsVolumeFormattedResponse.Unmarshal(m, b) -} -func (m *IsVolumeFormattedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IsVolumeFormattedResponse.Marshal(b, m, deterministic) -} -func (m *IsVolumeFormattedResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_IsVolumeFormattedResponse.Merge(m, src) -} -func (m *IsVolumeFormattedResponse) XXX_Size() int { - return xxx_messageInfo_IsVolumeFormattedResponse.Size(m) -} -func (m *IsVolumeFormattedResponse) XXX_DiscardUnknown() { - xxx_messageInfo_IsVolumeFormattedResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_IsVolumeFormattedResponse proto.InternalMessageInfo - -func (m *IsVolumeFormattedResponse) GetFormatted() bool { - if m != nil { - return m.Formatted - } - return false -} - -type FormatVolumeRequest struct { - // Volume device ID of the volume to format - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FormatVolumeRequest) Reset() { *m = FormatVolumeRequest{} } -func (m *FormatVolumeRequest) String() string { return proto.CompactTextString(m) } -func (*FormatVolumeRequest) ProtoMessage() {} -func (*FormatVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{8} -} - -func (m *FormatVolumeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FormatVolumeRequest.Unmarshal(m, b) -} -func (m *FormatVolumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FormatVolumeRequest.Marshal(b, m, deterministic) -} -func (m *FormatVolumeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FormatVolumeRequest.Merge(m, src) -} -func (m *FormatVolumeRequest) XXX_Size() int { - return xxx_messageInfo_FormatVolumeRequest.Size(m) -} -func (m *FormatVolumeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FormatVolumeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FormatVolumeRequest proto.InternalMessageInfo - -func (m *FormatVolumeRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -type FormatVolumeResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FormatVolumeResponse) Reset() { *m = FormatVolumeResponse{} } -func (m *FormatVolumeResponse) String() string { return proto.CompactTextString(m) } -func (*FormatVolumeResponse) ProtoMessage() {} -func (*FormatVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{9} -} - -func (m *FormatVolumeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FormatVolumeResponse.Unmarshal(m, b) -} -func (m *FormatVolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FormatVolumeResponse.Marshal(b, m, deterministic) -} -func (m *FormatVolumeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FormatVolumeResponse.Merge(m, src) -} -func (m *FormatVolumeResponse) XXX_Size() int { - return xxx_messageInfo_FormatVolumeResponse.Size(m) -} -func (m *FormatVolumeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FormatVolumeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FormatVolumeResponse proto.InternalMessageInfo - -type ResizeVolumeRequest struct { - // Volume device ID of the volume to dismount - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - // New size of the volume - Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResizeVolumeRequest) Reset() { *m = ResizeVolumeRequest{} } -func (m *ResizeVolumeRequest) String() string { return proto.CompactTextString(m) } -func (*ResizeVolumeRequest) ProtoMessage() {} -func (*ResizeVolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{10} -} - -func (m *ResizeVolumeRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResizeVolumeRequest.Unmarshal(m, b) -} -func (m *ResizeVolumeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResizeVolumeRequest.Marshal(b, m, deterministic) -} -func (m *ResizeVolumeRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeVolumeRequest.Merge(m, src) -} -func (m *ResizeVolumeRequest) XXX_Size() int { - return xxx_messageInfo_ResizeVolumeRequest.Size(m) -} -func (m *ResizeVolumeRequest) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeVolumeRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeVolumeRequest proto.InternalMessageInfo - -func (m *ResizeVolumeRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -func (m *ResizeVolumeRequest) GetSize() int64 { - if m != nil { - return m.Size - } - return 0 -} - -type ResizeVolumeResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ResizeVolumeResponse) Reset() { *m = ResizeVolumeResponse{} } -func (m *ResizeVolumeResponse) String() string { return proto.CompactTextString(m) } -func (*ResizeVolumeResponse) ProtoMessage() {} -func (*ResizeVolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{11} -} - -func (m *ResizeVolumeResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ResizeVolumeResponse.Unmarshal(m, b) -} -func (m *ResizeVolumeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ResizeVolumeResponse.Marshal(b, m, deterministic) -} -func (m *ResizeVolumeResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_ResizeVolumeResponse.Merge(m, src) -} -func (m *ResizeVolumeResponse) XXX_Size() int { - return xxx_messageInfo_ResizeVolumeResponse.Size(m) -} -func (m *ResizeVolumeResponse) XXX_DiscardUnknown() { - xxx_messageInfo_ResizeVolumeResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_ResizeVolumeResponse proto.InternalMessageInfo - -type VolumeStatsRequest struct { - // Volume device Id of the volume to get the stats for - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VolumeStatsRequest) Reset() { *m = VolumeStatsRequest{} } -func (m *VolumeStatsRequest) String() string { return proto.CompactTextString(m) } -func (*VolumeStatsRequest) ProtoMessage() {} -func (*VolumeStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{12} -} - -func (m *VolumeStatsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VolumeStatsRequest.Unmarshal(m, b) -} -func (m *VolumeStatsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VolumeStatsRequest.Marshal(b, m, deterministic) -} -func (m *VolumeStatsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeStatsRequest.Merge(m, src) -} -func (m *VolumeStatsRequest) XXX_Size() int { - return xxx_messageInfo_VolumeStatsRequest.Size(m) -} -func (m *VolumeStatsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeStatsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeStatsRequest proto.InternalMessageInfo - -func (m *VolumeStatsRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -type VolumeStatsResponse struct { - // Capacity of the volume - VolumeSize int64 `protobuf:"varint,1,opt,name=volumeSize,proto3" json:"volumeSize,omitempty"` - // Used bytes - VolumeUsedSize int64 `protobuf:"varint,2,opt,name=volumeUsedSize,proto3" json:"volumeUsedSize,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VolumeStatsResponse) Reset() { *m = VolumeStatsResponse{} } -func (m *VolumeStatsResponse) String() string { return proto.CompactTextString(m) } -func (*VolumeStatsResponse) ProtoMessage() {} -func (*VolumeStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{13} -} - -func (m *VolumeStatsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VolumeStatsResponse.Unmarshal(m, b) -} -func (m *VolumeStatsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VolumeStatsResponse.Marshal(b, m, deterministic) -} -func (m *VolumeStatsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeStatsResponse.Merge(m, src) -} -func (m *VolumeStatsResponse) XXX_Size() int { - return xxx_messageInfo_VolumeStatsResponse.Size(m) -} -func (m *VolumeStatsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeStatsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeStatsResponse proto.InternalMessageInfo - -func (m *VolumeStatsResponse) GetVolumeSize() int64 { - if m != nil { - return m.VolumeSize - } - return 0 -} - -func (m *VolumeStatsResponse) GetVolumeUsedSize() int64 { - if m != nil { - return m.VolumeUsedSize - } - return 0 -} - -type VolumeDiskNumberRequest struct { - // Volume device Id of the volume to get the disk number for - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VolumeDiskNumberRequest) Reset() { *m = VolumeDiskNumberRequest{} } -func (m *VolumeDiskNumberRequest) String() string { return proto.CompactTextString(m) } -func (*VolumeDiskNumberRequest) ProtoMessage() {} -func (*VolumeDiskNumberRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{14} -} - -func (m *VolumeDiskNumberRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VolumeDiskNumberRequest.Unmarshal(m, b) -} -func (m *VolumeDiskNumberRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VolumeDiskNumberRequest.Marshal(b, m, deterministic) -} -func (m *VolumeDiskNumberRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeDiskNumberRequest.Merge(m, src) -} -func (m *VolumeDiskNumberRequest) XXX_Size() int { - return xxx_messageInfo_VolumeDiskNumberRequest.Size(m) -} -func (m *VolumeDiskNumberRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeDiskNumberRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeDiskNumberRequest proto.InternalMessageInfo - -func (m *VolumeDiskNumberRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -type VolumeDiskNumberResponse struct { - // Corresponding disk number - DiskNumber int64 `protobuf:"varint,1,opt,name=diskNumber,proto3" json:"diskNumber,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VolumeDiskNumberResponse) Reset() { *m = VolumeDiskNumberResponse{} } -func (m *VolumeDiskNumberResponse) String() string { return proto.CompactTextString(m) } -func (*VolumeDiskNumberResponse) ProtoMessage() {} -func (*VolumeDiskNumberResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{15} -} - -func (m *VolumeDiskNumberResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VolumeDiskNumberResponse.Unmarshal(m, b) -} -func (m *VolumeDiskNumberResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VolumeDiskNumberResponse.Marshal(b, m, deterministic) -} -func (m *VolumeDiskNumberResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeDiskNumberResponse.Merge(m, src) -} -func (m *VolumeDiskNumberResponse) XXX_Size() int { - return xxx_messageInfo_VolumeDiskNumberResponse.Size(m) -} -func (m *VolumeDiskNumberResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeDiskNumberResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeDiskNumberResponse proto.InternalMessageInfo - -func (m *VolumeDiskNumberResponse) GetDiskNumber() int64 { - if m != nil { - return m.DiskNumber - } - return 0 -} - -type VolumeIDFromMountRequest struct { - // Mount - Mount string `protobuf:"bytes,1,opt,name=mount,proto3" json:"mount,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VolumeIDFromMountRequest) Reset() { *m = VolumeIDFromMountRequest{} } -func (m *VolumeIDFromMountRequest) String() string { return proto.CompactTextString(m) } -func (*VolumeIDFromMountRequest) ProtoMessage() {} -func (*VolumeIDFromMountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{16} -} - -func (m *VolumeIDFromMountRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VolumeIDFromMountRequest.Unmarshal(m, b) -} -func (m *VolumeIDFromMountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VolumeIDFromMountRequest.Marshal(b, m, deterministic) -} -func (m *VolumeIDFromMountRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeIDFromMountRequest.Merge(m, src) -} -func (m *VolumeIDFromMountRequest) XXX_Size() int { - return xxx_messageInfo_VolumeIDFromMountRequest.Size(m) -} -func (m *VolumeIDFromMountRequest) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeIDFromMountRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeIDFromMountRequest proto.InternalMessageInfo - -func (m *VolumeIDFromMountRequest) GetMount() string { - if m != nil { - return m.Mount - } - return "" -} - -type VolumeIDFromMountResponse struct { - // Mount - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *VolumeIDFromMountResponse) Reset() { *m = VolumeIDFromMountResponse{} } -func (m *VolumeIDFromMountResponse) String() string { return proto.CompactTextString(m) } -func (*VolumeIDFromMountResponse) ProtoMessage() {} -func (*VolumeIDFromMountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{17} -} - -func (m *VolumeIDFromMountResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_VolumeIDFromMountResponse.Unmarshal(m, b) -} -func (m *VolumeIDFromMountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_VolumeIDFromMountResponse.Marshal(b, m, deterministic) -} -func (m *VolumeIDFromMountResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_VolumeIDFromMountResponse.Merge(m, src) -} -func (m *VolumeIDFromMountResponse) XXX_Size() int { - return xxx_messageInfo_VolumeIDFromMountResponse.Size(m) -} -func (m *VolumeIDFromMountResponse) XXX_DiscardUnknown() { - xxx_messageInfo_VolumeIDFromMountResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_VolumeIDFromMountResponse proto.InternalMessageInfo - -func (m *VolumeIDFromMountResponse) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -type WriteVolumeCacheRequest struct { - // Volume device ID of the volume to flush the cache - VolumeId string `protobuf:"bytes,1,opt,name=volume_id,json=volumeId,proto3" json:"volume_id,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteVolumeCacheRequest) Reset() { *m = WriteVolumeCacheRequest{} } -func (m *WriteVolumeCacheRequest) String() string { return proto.CompactTextString(m) } -func (*WriteVolumeCacheRequest) ProtoMessage() {} -func (*WriteVolumeCacheRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{18} -} - -func (m *WriteVolumeCacheRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteVolumeCacheRequest.Unmarshal(m, b) -} -func (m *WriteVolumeCacheRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteVolumeCacheRequest.Marshal(b, m, deterministic) -} -func (m *WriteVolumeCacheRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteVolumeCacheRequest.Merge(m, src) -} -func (m *WriteVolumeCacheRequest) XXX_Size() int { - return xxx_messageInfo_WriteVolumeCacheRequest.Size(m) -} -func (m *WriteVolumeCacheRequest) XXX_DiscardUnknown() { - xxx_messageInfo_WriteVolumeCacheRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteVolumeCacheRequest proto.InternalMessageInfo - -func (m *WriteVolumeCacheRequest) GetVolumeId() string { - if m != nil { - return m.VolumeId - } - return "" -} - -type WriteVolumeCacheResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *WriteVolumeCacheResponse) Reset() { *m = WriteVolumeCacheResponse{} } -func (m *WriteVolumeCacheResponse) String() string { return proto.CompactTextString(m) } -func (*WriteVolumeCacheResponse) ProtoMessage() {} -func (*WriteVolumeCacheResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_99d2e9a7d1d95ce9, []int{19} -} - -func (m *WriteVolumeCacheResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_WriteVolumeCacheResponse.Unmarshal(m, b) -} -func (m *WriteVolumeCacheResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_WriteVolumeCacheResponse.Marshal(b, m, deterministic) -} -func (m *WriteVolumeCacheResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_WriteVolumeCacheResponse.Merge(m, src) -} -func (m *WriteVolumeCacheResponse) XXX_Size() int { - return xxx_messageInfo_WriteVolumeCacheResponse.Size(m) -} -func (m *WriteVolumeCacheResponse) XXX_DiscardUnknown() { - xxx_messageInfo_WriteVolumeCacheResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_WriteVolumeCacheResponse proto.InternalMessageInfo - -func init() { - proto.RegisterType((*ListVolumesOnDiskRequest)(nil), "v1beta2.ListVolumesOnDiskRequest") - proto.RegisterType((*ListVolumesOnDiskResponse)(nil), "v1beta2.ListVolumesOnDiskResponse") - proto.RegisterType((*MountVolumeRequest)(nil), "v1beta2.MountVolumeRequest") - proto.RegisterType((*MountVolumeResponse)(nil), "v1beta2.MountVolumeResponse") - proto.RegisterType((*DismountVolumeRequest)(nil), "v1beta2.DismountVolumeRequest") - proto.RegisterType((*DismountVolumeResponse)(nil), "v1beta2.DismountVolumeResponse") - proto.RegisterType((*IsVolumeFormattedRequest)(nil), "v1beta2.IsVolumeFormattedRequest") - proto.RegisterType((*IsVolumeFormattedResponse)(nil), "v1beta2.IsVolumeFormattedResponse") - proto.RegisterType((*FormatVolumeRequest)(nil), "v1beta2.FormatVolumeRequest") - proto.RegisterType((*FormatVolumeResponse)(nil), "v1beta2.FormatVolumeResponse") - proto.RegisterType((*ResizeVolumeRequest)(nil), "v1beta2.ResizeVolumeRequest") - proto.RegisterType((*ResizeVolumeResponse)(nil), "v1beta2.ResizeVolumeResponse") - proto.RegisterType((*VolumeStatsRequest)(nil), "v1beta2.VolumeStatsRequest") - proto.RegisterType((*VolumeStatsResponse)(nil), "v1beta2.VolumeStatsResponse") - proto.RegisterType((*VolumeDiskNumberRequest)(nil), "v1beta2.VolumeDiskNumberRequest") - proto.RegisterType((*VolumeDiskNumberResponse)(nil), "v1beta2.VolumeDiskNumberResponse") - proto.RegisterType((*VolumeIDFromMountRequest)(nil), "v1beta2.VolumeIDFromMountRequest") - proto.RegisterType((*VolumeIDFromMountResponse)(nil), "v1beta2.VolumeIDFromMountResponse") - proto.RegisterType((*WriteVolumeCacheRequest)(nil), "v1beta2.WriteVolumeCacheRequest") - proto.RegisterType((*WriteVolumeCacheResponse)(nil), "v1beta2.WriteVolumeCacheResponse") -} - -func init() { - proto.RegisterFile("client/api/volume/v1beta2/api.proto", fileDescriptor_99d2e9a7d1d95ce9) -} - -var fileDescriptor_99d2e9a7d1d95ce9 = []byte{ - // 625 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0x6b, 0x6f, 0xd3, 0x30, - 0x14, 0x6d, 0x19, 0x74, 0xeb, 0x05, 0x4d, 0xcc, 0xdd, 0x23, 0xcd, 0x1e, 0x74, 0x46, 0x42, 0xfb, - 0xb2, 0x86, 0x75, 0xd2, 0x80, 0x49, 0x08, 0x09, 0x4a, 0xa1, 0x88, 0x81, 0x94, 0x0a, 0x10, 0x68, - 0xa8, 0x4a, 0x1b, 0x43, 0xad, 0x2e, 0x4d, 0x89, 0x9d, 0x09, 0xf8, 0xc7, 0xfc, 0x0b, 0x14, 0xdb, - 0x49, 0xdd, 0x3c, 0xaa, 0x22, 0xf1, 0x2d, 0x3e, 0xf6, 0x39, 0xe7, 0xda, 0xbe, 0xc7, 0x81, 0xfb, - 0xc3, 0x2b, 0x4a, 0x26, 0xdc, 0x72, 0xa6, 0xd4, 0xba, 0xf6, 0xaf, 0x42, 0x8f, 0x58, 0xd7, 0x27, - 0x03, 0xc2, 0x9d, 0x56, 0x04, 0x35, 0xa7, 0x81, 0xcf, 0x7d, 0xb4, 0xaa, 0x20, 0x7c, 0x0a, 0xc6, - 0x5b, 0xca, 0xf8, 0x47, 0xb1, 0x90, 0xbd, 0x9f, 0xb4, 0x29, 0x1b, 0xdb, 0xe4, 0x47, 0x48, 0x18, - 0x47, 0x3b, 0xb0, 0xea, 0x52, 0x36, 0xee, 0x53, 0xd7, 0x28, 0x37, 0xca, 0x47, 0x55, 0xbb, 0x12, - 0x0d, 0xbb, 0x2e, 0x3e, 0x87, 0x7a, 0x0e, 0x89, 0x4d, 0xfd, 0x09, 0x23, 0x68, 0x1f, 0x40, 0xda, - 0xf6, 0xa9, 0xcb, 0x8c, 0x72, 0x63, 0xe5, 0xa8, 0x6a, 0x57, 0x25, 0xd2, 0x75, 0x19, 0x7e, 0x09, - 0xe8, 0xc2, 0x0f, 0x27, 0x8a, 0x1c, 0x5b, 0xed, 0x42, 0x35, 0x21, 0x29, 0xb3, 0xb5, 0x98, 0x83, - 0x10, 0xdc, 0x9c, 0x3a, 0x7c, 0x64, 0xdc, 0x10, 0xb8, 0xf8, 0xc6, 0x5b, 0x50, 0x9b, 0x93, 0x91, - 0xe6, 0xf8, 0x35, 0x6c, 0xb5, 0x29, 0xf3, 0xfe, 0x83, 0x81, 0x01, 0xdb, 0x69, 0x25, 0xe5, 0xf1, - 0x08, 0x8c, 0x2e, 0x93, 0x58, 0xc7, 0x0f, 0x3c, 0x87, 0x73, 0xe2, 0x2e, 0x63, 0x83, 0x9f, 0x40, - 0x3d, 0x87, 0xa8, 0x8e, 0x6d, 0x0f, 0xaa, 0xdf, 0x62, 0x50, 0x30, 0xd7, 0xec, 0x19, 0x80, 0x5b, - 0x50, 0x93, 0x94, 0xe5, 0x77, 0x85, 0xb7, 0x61, 0x73, 0x9e, 0xa3, 0xea, 0xef, 0x40, 0xcd, 0x26, - 0x8c, 0xfe, 0x26, 0xff, 0x76, 0x42, 0x11, 0x43, 0x9c, 0xd0, 0x8a, 0x2d, 0xbe, 0x23, 0xfd, 0x79, - 0x1d, 0xa5, 0x7f, 0x02, 0x48, 0x22, 0x3d, 0xee, 0x70, 0xb6, 0x54, 0xa9, 0x5f, 0xa1, 0x36, 0x47, - 0x51, 0x67, 0x72, 0x10, 0xb7, 0x52, 0x2f, 0xf2, 0x2e, 0x0b, 0x6f, 0x0d, 0x41, 0x0f, 0x60, 0x5d, - 0x8e, 0x3e, 0x30, 0xe2, 0xf6, 0x66, 0xf5, 0xa5, 0x50, 0x7c, 0x06, 0x3b, 0x52, 0x3e, 0x6a, 0xd4, - 0x77, 0xa1, 0x37, 0x20, 0xc1, 0x52, 0x65, 0x9d, 0x83, 0x91, 0xe5, 0xcd, 0x6a, 0x73, 0x13, 0x34, - 0xae, 0x6d, 0x86, 0xe0, 0x87, 0x31, 0xb7, 0xdb, 0xee, 0x04, 0xbe, 0x27, 0x9a, 0x35, 0x36, 0xdd, - 0x84, 0x5b, 0xa2, 0xb1, 0x94, 0xa1, 0x1c, 0xe0, 0xc7, 0x50, 0xcf, 0x61, 0x28, 0xbb, 0x85, 0x75, - 0x9e, 0xc1, 0xce, 0xa7, 0x80, 0x72, 0x75, 0x11, 0x2f, 0x9c, 0xe1, 0x68, 0xb9, 0x0e, 0x31, 0xc1, - 0xc8, 0xf2, 0xa4, 0x61, 0xeb, 0x4f, 0x05, 0x2a, 0x12, 0x47, 0x97, 0xb0, 0x91, 0x89, 0x3b, 0x3a, - 0x6c, 0xaa, 0x27, 0xa4, 0x59, 0xf4, 0x7e, 0x98, 0x78, 0xd1, 0x12, 0xd5, 0x2c, 0x25, 0xf4, 0x06, - 0x6e, 0x6b, 0x49, 0x46, 0xbb, 0x09, 0x29, 0xfb, 0x4c, 0x98, 0x7b, 0xf9, 0x93, 0x89, 0x56, 0x0f, - 0xd6, 0xe7, 0x43, 0x8b, 0x0e, 0x12, 0x46, 0xee, 0xbb, 0x60, 0xde, 0x2b, 0x9c, 0x4f, 0x44, 0x2f, - 0x61, 0x23, 0x13, 0x5b, 0x6d, 0xfb, 0x45, 0x6f, 0x81, 0xb6, 0xfd, 0xc2, 0xd4, 0xe3, 0x12, 0xba, - 0x80, 0x3b, 0x7a, 0x4a, 0xd1, 0x6c, 0x8b, 0x39, 0x81, 0x37, 0xf7, 0x0b, 0x66, 0x75, 0x39, 0x3d, - 0x94, 0x9a, 0x5c, 0x4e, 0xe6, 0x35, 0xb9, 0xdc, 0x24, 0x8b, 0xcb, 0xd1, 0x82, 0xa9, 0x5d, 0x4e, - 0x36, 0xe1, 0xda, 0xe5, 0xe4, 0x64, 0x59, 0x9c, 0x63, 0xed, 0x15, 0xe1, 0xe9, 0x40, 0xa1, 0x46, - 0x8a, 0x96, 0xc9, 0xa8, 0x79, 0xb8, 0x60, 0x45, 0xa2, 0xde, 0x87, 0xcd, 0x44, 0x5d, 0x0b, 0x10, - 0x4a, 0x93, 0xb3, 0x71, 0xd4, 0x2e, 0xaa, 0x30, 0x7f, 0xb8, 0x84, 0x3e, 0xc3, 0xdd, 0x74, 0x58, - 0xb4, 0xda, 0x0b, 0xf2, 0xa7, 0xd5, 0x5e, 0x94, 0x34, 0x5c, 0x7a, 0xfe, 0xec, 0xcb, 0xd3, 0xef, - 0x94, 0x8f, 0xc2, 0x41, 0x73, 0xe8, 0x7b, 0xd6, 0x38, 0x1c, 0x90, 0x60, 0x42, 0x38, 0x61, 0xc7, - 0x43, 0x46, 0xad, 0x21, 0xa3, 0xc7, 0xd3, 0xc0, 0xff, 0xf9, 0xcb, 0x2a, 0xfc, 0xb1, 0x0f, 0x2a, - 0xe2, 0xaf, 0x7e, 0xfa, 0x37, 0x00, 0x00, 0xff, 0xff, 0xef, 0xbc, 0x51, 0x38, 0xfc, 0x07, 0x00, - 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// VolumeClient is the client API for Volume service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type VolumeClient interface { - // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for - // all volumes on a Disk device - ListVolumesOnDisk(ctx context.Context, in *ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*ListVolumesOnDiskResponse, error) - // MountVolume mounts the volume at the requested global staging path - MountVolume(ctx context.Context, in *MountVolumeRequest, opts ...grpc.CallOption) (*MountVolumeResponse, error) - // DismountVolume gracefully dismounts a volume - DismountVolume(ctx context.Context, in *DismountVolumeRequest, opts ...grpc.CallOption) (*DismountVolumeResponse, error) - // IsVolumeFormatted checks if a volume is formatted with NTFS - IsVolumeFormatted(ctx context.Context, in *IsVolumeFormattedRequest, opts ...grpc.CallOption) (*IsVolumeFormattedResponse, error) - // FormatVolume formats a volume with the provided file system - FormatVolume(ctx context.Context, in *FormatVolumeRequest, opts ...grpc.CallOption) (*FormatVolumeResponse, error) - // ResizeVolume performs resizing of the partition and file system for a block based volume - ResizeVolume(ctx context.Context, in *ResizeVolumeRequest, opts ...grpc.CallOption) (*ResizeVolumeResponse, error) - // VolumeStats gathers DiskSize, VolumeSize and VolumeUsedSize for a volume - VolumeStats(ctx context.Context, in *VolumeStatsRequest, opts ...grpc.CallOption) (*VolumeStatsResponse, error) - // GetVolumeDiskNumber gets the disk number of the disk where the volume is located - GetVolumeDiskNumber(ctx context.Context, in *VolumeDiskNumberRequest, opts ...grpc.CallOption) (*VolumeDiskNumberResponse, error) - // GetVolumeIDFromMount gets the volume id for a given mount - GetVolumeIDFromMount(ctx context.Context, in *VolumeIDFromMountRequest, opts ...grpc.CallOption) (*VolumeIDFromMountResponse, error) - // WriteVolumeCache write volume cache to disk - WriteVolumeCache(ctx context.Context, in *WriteVolumeCacheRequest, opts ...grpc.CallOption) (*WriteVolumeCacheResponse, error) -} - -type volumeClient struct { - cc *grpc.ClientConn -} - -func NewVolumeClient(cc *grpc.ClientConn) VolumeClient { - return &volumeClient{cc} -} - -func (c *volumeClient) ListVolumesOnDisk(ctx context.Context, in *ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*ListVolumesOnDiskResponse, error) { - out := new(ListVolumesOnDiskResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/ListVolumesOnDisk", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) MountVolume(ctx context.Context, in *MountVolumeRequest, opts ...grpc.CallOption) (*MountVolumeResponse, error) { - out := new(MountVolumeResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/MountVolume", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) DismountVolume(ctx context.Context, in *DismountVolumeRequest, opts ...grpc.CallOption) (*DismountVolumeResponse, error) { - out := new(DismountVolumeResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/DismountVolume", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) IsVolumeFormatted(ctx context.Context, in *IsVolumeFormattedRequest, opts ...grpc.CallOption) (*IsVolumeFormattedResponse, error) { - out := new(IsVolumeFormattedResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/IsVolumeFormatted", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) FormatVolume(ctx context.Context, in *FormatVolumeRequest, opts ...grpc.CallOption) (*FormatVolumeResponse, error) { - out := new(FormatVolumeResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/FormatVolume", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) ResizeVolume(ctx context.Context, in *ResizeVolumeRequest, opts ...grpc.CallOption) (*ResizeVolumeResponse, error) { - out := new(ResizeVolumeResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/ResizeVolume", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) VolumeStats(ctx context.Context, in *VolumeStatsRequest, opts ...grpc.CallOption) (*VolumeStatsResponse, error) { - out := new(VolumeStatsResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/VolumeStats", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) GetVolumeDiskNumber(ctx context.Context, in *VolumeDiskNumberRequest, opts ...grpc.CallOption) (*VolumeDiskNumberResponse, error) { - out := new(VolumeDiskNumberResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/GetVolumeDiskNumber", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) GetVolumeIDFromMount(ctx context.Context, in *VolumeIDFromMountRequest, opts ...grpc.CallOption) (*VolumeIDFromMountResponse, error) { - out := new(VolumeIDFromMountResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/GetVolumeIDFromMount", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *volumeClient) WriteVolumeCache(ctx context.Context, in *WriteVolumeCacheRequest, opts ...grpc.CallOption) (*WriteVolumeCacheResponse, error) { - out := new(WriteVolumeCacheResponse) - err := c.cc.Invoke(ctx, "/v1beta2.Volume/WriteVolumeCache", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// VolumeServer is the server API for Volume service. -type VolumeServer interface { - // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for - // all volumes on a Disk device - ListVolumesOnDisk(context.Context, *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error) - // MountVolume mounts the volume at the requested global staging path - MountVolume(context.Context, *MountVolumeRequest) (*MountVolumeResponse, error) - // DismountVolume gracefully dismounts a volume - DismountVolume(context.Context, *DismountVolumeRequest) (*DismountVolumeResponse, error) - // IsVolumeFormatted checks if a volume is formatted with NTFS - IsVolumeFormatted(context.Context, *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error) - // FormatVolume formats a volume with the provided file system - FormatVolume(context.Context, *FormatVolumeRequest) (*FormatVolumeResponse, error) - // ResizeVolume performs resizing of the partition and file system for a block based volume - ResizeVolume(context.Context, *ResizeVolumeRequest) (*ResizeVolumeResponse, error) - // VolumeStats gathers DiskSize, VolumeSize and VolumeUsedSize for a volume - VolumeStats(context.Context, *VolumeStatsRequest) (*VolumeStatsResponse, error) - // GetVolumeDiskNumber gets the disk number of the disk where the volume is located - GetVolumeDiskNumber(context.Context, *VolumeDiskNumberRequest) (*VolumeDiskNumberResponse, error) - // GetVolumeIDFromMount gets the volume id for a given mount - GetVolumeIDFromMount(context.Context, *VolumeIDFromMountRequest) (*VolumeIDFromMountResponse, error) - // WriteVolumeCache write volume cache to disk - WriteVolumeCache(context.Context, *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error) -} - -// UnimplementedVolumeServer can be embedded to have forward compatible implementations. -type UnimplementedVolumeServer struct { -} - -func (*UnimplementedVolumeServer) ListVolumesOnDisk(ctx context.Context, req *ListVolumesOnDiskRequest) (*ListVolumesOnDiskResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListVolumesOnDisk not implemented") -} -func (*UnimplementedVolumeServer) MountVolume(ctx context.Context, req *MountVolumeRequest) (*MountVolumeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method MountVolume not implemented") -} -func (*UnimplementedVolumeServer) DismountVolume(ctx context.Context, req *DismountVolumeRequest) (*DismountVolumeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DismountVolume not implemented") -} -func (*UnimplementedVolumeServer) IsVolumeFormatted(ctx context.Context, req *IsVolumeFormattedRequest) (*IsVolumeFormattedResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method IsVolumeFormatted not implemented") -} -func (*UnimplementedVolumeServer) FormatVolume(ctx context.Context, req *FormatVolumeRequest) (*FormatVolumeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FormatVolume not implemented") -} -func (*UnimplementedVolumeServer) ResizeVolume(ctx context.Context, req *ResizeVolumeRequest) (*ResizeVolumeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResizeVolume not implemented") -} -func (*UnimplementedVolumeServer) VolumeStats(ctx context.Context, req *VolumeStatsRequest) (*VolumeStatsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method VolumeStats not implemented") -} -func (*UnimplementedVolumeServer) GetVolumeDiskNumber(ctx context.Context, req *VolumeDiskNumberRequest) (*VolumeDiskNumberResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVolumeDiskNumber not implemented") -} -func (*UnimplementedVolumeServer) GetVolumeIDFromMount(ctx context.Context, req *VolumeIDFromMountRequest) (*VolumeIDFromMountResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetVolumeIDFromMount not implemented") -} -func (*UnimplementedVolumeServer) WriteVolumeCache(ctx context.Context, req *WriteVolumeCacheRequest) (*WriteVolumeCacheResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WriteVolumeCache not implemented") -} - -func RegisterVolumeServer(s *grpc.Server, srv VolumeServer) { - s.RegisterService(&_Volume_serviceDesc, srv) -} - -func _Volume_ListVolumesOnDisk_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListVolumesOnDiskRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).ListVolumesOnDisk(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/ListVolumesOnDisk", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).ListVolumesOnDisk(ctx, req.(*ListVolumesOnDiskRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_MountVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MountVolumeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).MountVolume(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/MountVolume", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).MountVolume(ctx, req.(*MountVolumeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_DismountVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DismountVolumeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).DismountVolume(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/DismountVolume", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).DismountVolume(ctx, req.(*DismountVolumeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_IsVolumeFormatted_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(IsVolumeFormattedRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).IsVolumeFormatted(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/IsVolumeFormatted", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).IsVolumeFormatted(ctx, req.(*IsVolumeFormattedRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_FormatVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FormatVolumeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).FormatVolume(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/FormatVolume", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).FormatVolume(ctx, req.(*FormatVolumeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_ResizeVolume_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ResizeVolumeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).ResizeVolume(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/ResizeVolume", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).ResizeVolume(ctx, req.(*ResizeVolumeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_VolumeStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VolumeStatsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).VolumeStats(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/VolumeStats", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).VolumeStats(ctx, req.(*VolumeStatsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_GetVolumeDiskNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VolumeDiskNumberRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).GetVolumeDiskNumber(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/GetVolumeDiskNumber", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).GetVolumeDiskNumber(ctx, req.(*VolumeDiskNumberRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_GetVolumeIDFromMount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(VolumeIDFromMountRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).GetVolumeIDFromMount(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/GetVolumeIDFromMount", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).GetVolumeIDFromMount(ctx, req.(*VolumeIDFromMountRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Volume_WriteVolumeCache_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(WriteVolumeCacheRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VolumeServer).WriteVolumeCache(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1beta2.Volume/WriteVolumeCache", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VolumeServer).WriteVolumeCache(ctx, req.(*WriteVolumeCacheRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Volume_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1beta2.Volume", - HandlerType: (*VolumeServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListVolumesOnDisk", - Handler: _Volume_ListVolumesOnDisk_Handler, - }, - { - MethodName: "MountVolume", - Handler: _Volume_MountVolume_Handler, - }, - { - MethodName: "DismountVolume", - Handler: _Volume_DismountVolume_Handler, - }, - { - MethodName: "IsVolumeFormatted", - Handler: _Volume_IsVolumeFormatted_Handler, - }, - { - MethodName: "FormatVolume", - Handler: _Volume_FormatVolume_Handler, - }, - { - MethodName: "ResizeVolume", - Handler: _Volume_ResizeVolume_Handler, - }, - { - MethodName: "VolumeStats", - Handler: _Volume_VolumeStats_Handler, - }, - { - MethodName: "GetVolumeDiskNumber", - Handler: _Volume_GetVolumeDiskNumber_Handler, - }, - { - MethodName: "GetVolumeIDFromMount", - Handler: _Volume_GetVolumeIDFromMount_Handler, - }, - { - MethodName: "WriteVolumeCache", - Handler: _Volume_WriteVolumeCache_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "client/api/volume/v1beta2/api.proto", -} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2/api.proto b/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2/api.proto deleted file mode 100644 index c88e1f57e9..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2/api.proto +++ /dev/null @@ -1,132 +0,0 @@ -syntax = "proto3"; - -package v1beta2; - -option go_package = "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2"; - -service Volume { - // ListVolumesOnDisk returns the volume IDs (in \\.\Volume{GUID} format) for - // all volumes on a Disk device - rpc ListVolumesOnDisk(ListVolumesOnDiskRequest) returns (ListVolumesOnDiskResponse) {} - // MountVolume mounts the volume at the requested global staging path - rpc MountVolume(MountVolumeRequest) returns (MountVolumeResponse) {} - // DismountVolume gracefully dismounts a volume - rpc DismountVolume(DismountVolumeRequest) returns (DismountVolumeResponse) {} - // IsVolumeFormatted checks if a volume is formatted with NTFS - rpc IsVolumeFormatted(IsVolumeFormattedRequest) returns (IsVolumeFormattedResponse) {} - // FormatVolume formats a volume with the provided file system - rpc FormatVolume(FormatVolumeRequest) returns (FormatVolumeResponse) {} - // ResizeVolume performs resizing of the partition and file system for a block based volume - rpc ResizeVolume(ResizeVolumeRequest) returns (ResizeVolumeResponse) {} - // VolumeStats gathers DiskSize, VolumeSize and VolumeUsedSize for a volume - rpc VolumeStats(VolumeStatsRequest) returns (VolumeStatsResponse) {} - // GetVolumeDiskNumber gets the disk number of the disk where the volume is located - rpc GetVolumeDiskNumber(VolumeDiskNumberRequest) returns (VolumeDiskNumberResponse) {} - // GetVolumeIDFromMount gets the volume id for a given mount - rpc GetVolumeIDFromMount(VolumeIDFromMountRequest) returns (VolumeIDFromMountResponse) {} - // WriteVolumeCache write volume cache to disk - rpc WriteVolumeCache(WriteVolumeCacheRequest) returns (WriteVolumeCacheResponse) {} -} - -message ListVolumesOnDiskRequest { - // Disk device ID of the disk to query for volumes - string disk_id = 1; -} - -message ListVolumesOnDiskResponse { - // Volume device IDs of volumes on the specified disk - repeated string volume_ids = 1; -} - -message MountVolumeRequest { - // Volume device ID of the volume to mount - string volume_id = 1; - // Path in the host's file system where the volume needs to be mounted - string path = 2; -} - -message MountVolumeResponse { - // Intentionally empty -} - -message DismountVolumeRequest { - // Volume device ID of the volume to dismount - string volume_id = 1; - // Path where the volume has been mounted. - string path = 2; -} - -message DismountVolumeResponse { - // Intentionally empty -} - -message IsVolumeFormattedRequest { - // Volume device ID of the volume to check - string volume_id = 1; -} - -message IsVolumeFormattedResponse { - // Is the volume formatted with NTFS - bool formatted = 1; -} - -message FormatVolumeRequest { - // Volume device ID of the volume to format - string volume_id = 1; -} - -message FormatVolumeResponse { - // Intentionally empty -} - -message ResizeVolumeRequest { - // Volume device ID of the volume to dismount - string volume_id = 1; - // New size of the volume - int64 size = 2; -} - -message ResizeVolumeResponse { - // Intentionally empty -} - -message VolumeStatsRequest{ - // Volume device Id of the volume to get the stats for - string volume_id = 1; -} - -message VolumeStatsResponse{ - // Capacity of the volume - int64 volumeSize = 1; - // Used bytes - int64 volumeUsedSize = 2; -} - -message VolumeDiskNumberRequest{ - // Volume device Id of the volume to get the disk number for - string volume_id = 1; -} - -message VolumeDiskNumberResponse{ - // Corresponding disk number - int64 diskNumber = 1; -} - -message VolumeIDFromMountRequest { - // Mount - string mount = 1; -} - -message VolumeIDFromMountResponse { - // Mount - string volume_id = 1; -} - -message WriteVolumeCacheRequest { - // Volume device ID of the volume to flush the cache - string volume_id = 1; -} - -message WriteVolumeCacheResponse { - // Intentionally empty -} \ No newline at end of file diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod index 85501884a1..5fedd0365e 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.mod @@ -1,11 +1,11 @@ module github.com/kubernetes-csi/csi-proxy/client -go 1.12 +go 1.16 require ( - github.com/Microsoft/go-winio v0.4.14 + github.com/Microsoft/go-winio v0.4.16 github.com/golang/protobuf v1.4.1 - github.com/pkg/errors v0.8.1 + github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.2.2 google.golang.org/grpc v1.27.0 google.golang.org/protobuf v1.25.0 diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum index 7b2beee327..a5931e299d 100644 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/go.sum @@ -2,6 +2,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Microsoft/go-winio v0.4.14 h1:+hMXMk01us9KgxGb7ftKQt2Xpf5hH/yky+TDA+qxleU= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16 h1:FtSW/jqD+l4ba5iPBj9CODVtgfYAD8w2wS923g/cFDk= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -30,6 +32,8 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -56,6 +60,8 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3 h1:7TYNF4UdlohbFwpNH04CoPMp1cHUZgO1Ebq5r2hIjfo= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go new file mode 100644 index 0000000000..524814e958 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1/client_generated.go @@ -0,0 +1,94 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + v1 "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "disk" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1") + +type Client struct { + client v1.DiskClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the disk API group version v1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v1.NewDiskClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v1.DiskClient = &Client{} + +func (w *Client) GetDiskState(context context.Context, request *v1.GetDiskStateRequest, opts ...grpc.CallOption) (*v1.GetDiskStateResponse, error) { + return w.client.GetDiskState(context, request, opts...) +} + +func (w *Client) GetDiskStats(context context.Context, request *v1.GetDiskStatsRequest, opts ...grpc.CallOption) (*v1.GetDiskStatsResponse, error) { + return w.client.GetDiskStats(context, request, opts...) +} + +func (w *Client) ListDiskIDs(context context.Context, request *v1.ListDiskIDsRequest, opts ...grpc.CallOption) (*v1.ListDiskIDsResponse, error) { + return w.client.ListDiskIDs(context, request, opts...) +} + +func (w *Client) ListDiskLocations(context context.Context, request *v1.ListDiskLocationsRequest, opts ...grpc.CallOption) (*v1.ListDiskLocationsResponse, error) { + return w.client.ListDiskLocations(context, request, opts...) +} + +func (w *Client) PartitionDisk(context context.Context, request *v1.PartitionDiskRequest, opts ...grpc.CallOption) (*v1.PartitionDiskResponse, error) { + return w.client.PartitionDisk(context, request, opts...) +} + +func (w *Client) Rescan(context context.Context, request *v1.RescanRequest, opts ...grpc.CallOption) (*v1.RescanResponse, error) { + return w.client.Rescan(context, request, opts...) +} + +func (w *Client) SetDiskState(context context.Context, request *v1.SetDiskStateRequest, opts ...grpc.CallOption) (*v1.SetDiskStateResponse, error) { + return w.client.SetDiskState(context, request, opts...) +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go deleted file mode 100644 index a5e85d8131..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/disk/v1beta2/client_generated.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by csi-proxy-api-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "context" - "net" - - "github.com/Microsoft/go-winio" - "github.com/kubernetes-csi/csi-proxy/client" - "github.com/kubernetes-csi/csi-proxy/client/api/disk/v1beta2" - "github.com/kubernetes-csi/csi-proxy/client/apiversion" - "google.golang.org/grpc" -) - -const groupName = "disk" - -var version = apiversion.NewVersionOrPanic("v1beta2") - -type Client struct { - client v1beta2.DiskClient - connection *grpc.ClientConn -} - -// NewClient returns a client to make calls to the disk API group version v1beta2. -// It's the caller's responsibility to Close the client when done. -func NewClient() (*Client, error) { - pipePath := client.PipePath(groupName, version) - - connection, err := grpc.Dial(pipePath, - grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { - return winio.DialPipeContext(context, s) - }), - grpc.WithInsecure()) - if err != nil { - return nil, err - } - - client := v1beta2.NewDiskClient(connection) - return &Client{ - client: client, - connection: connection, - }, nil -} - -// Close closes the client. It must be called before the client gets GC-ed. -func (w *Client) Close() error { - return w.connection.Close() -} - -// ensures we implement all the required methods -var _ v1beta2.DiskClient = &Client{} - -func (w *Client) DiskStats(context context.Context, request *v1beta2.DiskStatsRequest, opts ...grpc.CallOption) (*v1beta2.DiskStatsResponse, error) { - return w.client.DiskStats(context, request, opts...) -} - -func (w *Client) GetAttachState(context context.Context, request *v1beta2.GetAttachStateRequest, opts ...grpc.CallOption) (*v1beta2.GetAttachStateResponse, error) { - return w.client.GetAttachState(context, request, opts...) -} - -func (w *Client) ListDiskIDs(context context.Context, request *v1beta2.ListDiskIDsRequest, opts ...grpc.CallOption) (*v1beta2.ListDiskIDsResponse, error) { - return w.client.ListDiskIDs(context, request, opts...) -} - -func (w *Client) ListDiskLocations(context context.Context, request *v1beta2.ListDiskLocationsRequest, opts ...grpc.CallOption) (*v1beta2.ListDiskLocationsResponse, error) { - return w.client.ListDiskLocations(context, request, opts...) -} - -func (w *Client) PartitionDisk(context context.Context, request *v1beta2.PartitionDiskRequest, opts ...grpc.CallOption) (*v1beta2.PartitionDiskResponse, error) { - return w.client.PartitionDisk(context, request, opts...) -} - -func (w *Client) Rescan(context context.Context, request *v1beta2.RescanRequest, opts ...grpc.CallOption) (*v1beta2.RescanResponse, error) { - return w.client.Rescan(context, request, opts...) -} - -func (w *Client) SetAttachState(context context.Context, request *v1beta2.SetAttachStateRequest, opts ...grpc.CallOption) (*v1beta2.SetAttachStateResponse, error) { - return w.client.SetAttachState(context, request, opts...) -} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go new file mode 100644 index 0000000000..b3ffc7fa73 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1/client_generated.go @@ -0,0 +1,86 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + v1 "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "filesystem" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1") + +type Client struct { + client v1.FilesystemClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the filesystem API group version v1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v1.NewFilesystemClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v1.FilesystemClient = &Client{} + +func (w *Client) CreateSymlink(context context.Context, request *v1.CreateSymlinkRequest, opts ...grpc.CallOption) (*v1.CreateSymlinkResponse, error) { + return w.client.CreateSymlink(context, request, opts...) +} + +func (w *Client) IsSymlink(context context.Context, request *v1.IsSymlinkRequest, opts ...grpc.CallOption) (*v1.IsSymlinkResponse, error) { + return w.client.IsSymlink(context, request, opts...) +} + +func (w *Client) Mkdir(context context.Context, request *v1.MkdirRequest, opts ...grpc.CallOption) (*v1.MkdirResponse, error) { + return w.client.Mkdir(context, request, opts...) +} + +func (w *Client) PathExists(context context.Context, request *v1.PathExistsRequest, opts ...grpc.CallOption) (*v1.PathExistsResponse, error) { + return w.client.PathExists(context, request, opts...) +} + +func (w *Client) Rmdir(context context.Context, request *v1.RmdirRequest, opts ...grpc.CallOption) (*v1.RmdirResponse, error) { + return w.client.Rmdir(context, request, opts...) +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go deleted file mode 100644 index a68e86fa9b..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/filesystem/v1beta1/client_generated.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by csi-proxy-api-gen. DO NOT EDIT. - -package v1beta1 - -import ( - "context" - "net" - - "github.com/Microsoft/go-winio" - "github.com/kubernetes-csi/csi-proxy/client" - "github.com/kubernetes-csi/csi-proxy/client/api/filesystem/v1beta1" - "github.com/kubernetes-csi/csi-proxy/client/apiversion" - "google.golang.org/grpc" -) - -const groupName = "filesystem" - -var version = apiversion.NewVersionOrPanic("v1beta1") - -type Client struct { - client v1beta1.FilesystemClient - connection *grpc.ClientConn -} - -// NewClient returns a client to make calls to the filesystem API group version v1beta1. -// It's the caller's responsibility to Close the client when done. -func NewClient() (*Client, error) { - pipePath := client.PipePath(groupName, version) - - connection, err := grpc.Dial(pipePath, - grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { - return winio.DialPipeContext(context, s) - }), - grpc.WithInsecure()) - if err != nil { - return nil, err - } - - client := v1beta1.NewFilesystemClient(connection) - return &Client{ - client: client, - connection: connection, - }, nil -} - -// Close closes the client. It must be called before the client gets GC-ed. -func (w *Client) Close() error { - return w.connection.Close() -} - -// ensures we implement all the required methods -var _ v1beta1.FilesystemClient = &Client{} - -func (w *Client) IsMountPoint(context context.Context, request *v1beta1.IsMountPointRequest, opts ...grpc.CallOption) (*v1beta1.IsMountPointResponse, error) { - return w.client.IsMountPoint(context, request, opts...) -} - -func (w *Client) LinkPath(context context.Context, request *v1beta1.LinkPathRequest, opts ...grpc.CallOption) (*v1beta1.LinkPathResponse, error) { - return w.client.LinkPath(context, request, opts...) -} - -func (w *Client) Mkdir(context context.Context, request *v1beta1.MkdirRequest, opts ...grpc.CallOption) (*v1beta1.MkdirResponse, error) { - return w.client.Mkdir(context, request, opts...) -} - -func (w *Client) PathExists(context context.Context, request *v1beta1.PathExistsRequest, opts ...grpc.CallOption) (*v1beta1.PathExistsResponse, error) { - return w.client.PathExists(context, request, opts...) -} - -func (w *Client) Rmdir(context context.Context, request *v1beta1.RmdirRequest, opts ...grpc.CallOption) (*v1beta1.RmdirResponse, error) { - return w.client.Rmdir(context, request, opts...) -} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go new file mode 100644 index 0000000000..659ed34b83 --- /dev/null +++ b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1/client_generated.go @@ -0,0 +1,106 @@ +// Code generated by csi-proxy-api-gen. DO NOT EDIT. + +package v1 + +import ( + "context" + "net" + + "github.com/Microsoft/go-winio" + "github.com/kubernetes-csi/csi-proxy/client" + v1 "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1" + "github.com/kubernetes-csi/csi-proxy/client/apiversion" + "google.golang.org/grpc" +) + +// GroupName is the group name of this API. +const GroupName = "volume" + +// Version is the api version. +var Version = apiversion.NewVersionOrPanic("v1") + +type Client struct { + client v1.VolumeClient + connection *grpc.ClientConn +} + +// NewClient returns a client to make calls to the volume API group version v1. +// It's the caller's responsibility to Close the client when done. +func NewClient() (*Client, error) { + pipePath := client.PipePath(GroupName, Version) + return NewClientWithPipePath(pipePath) +} + +// NewClientWithPipePath returns a client to make calls to the named pipe located at "pipePath". +// It's the caller's responsibility to Close the client when done. +func NewClientWithPipePath(pipePath string) (*Client, error) { + + // verify that the pipe exists + _, err := winio.DialPipe(pipePath, nil) + if err != nil { + return nil, err + } + + connection, err := grpc.Dial(pipePath, + grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { + return winio.DialPipeContext(context, s) + }), + grpc.WithInsecure()) + if err != nil { + return nil, err + } + + client := v1.NewVolumeClient(connection) + return &Client{ + client: client, + connection: connection, + }, nil +} + +// Close closes the client. It must be called before the client gets GC-ed. +func (w *Client) Close() error { + return w.connection.Close() +} + +// ensures we implement all the required methods +var _ v1.VolumeClient = &Client{} + +func (w *Client) FormatVolume(context context.Context, request *v1.FormatVolumeRequest, opts ...grpc.CallOption) (*v1.FormatVolumeResponse, error) { + return w.client.FormatVolume(context, request, opts...) +} + +func (w *Client) GetDiskNumberFromVolumeID(context context.Context, request *v1.GetDiskNumberFromVolumeIDRequest, opts ...grpc.CallOption) (*v1.GetDiskNumberFromVolumeIDResponse, error) { + return w.client.GetDiskNumberFromVolumeID(context, request, opts...) +} + +func (w *Client) GetVolumeIDFromTargetPath(context context.Context, request *v1.GetVolumeIDFromTargetPathRequest, opts ...grpc.CallOption) (*v1.GetVolumeIDFromTargetPathResponse, error) { + return w.client.GetVolumeIDFromTargetPath(context, request, opts...) +} + +func (w *Client) GetVolumeStats(context context.Context, request *v1.GetVolumeStatsRequest, opts ...grpc.CallOption) (*v1.GetVolumeStatsResponse, error) { + return w.client.GetVolumeStats(context, request, opts...) +} + +func (w *Client) IsVolumeFormatted(context context.Context, request *v1.IsVolumeFormattedRequest, opts ...grpc.CallOption) (*v1.IsVolumeFormattedResponse, error) { + return w.client.IsVolumeFormatted(context, request, opts...) +} + +func (w *Client) ListVolumesOnDisk(context context.Context, request *v1.ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*v1.ListVolumesOnDiskResponse, error) { + return w.client.ListVolumesOnDisk(context, request, opts...) +} + +func (w *Client) MountVolume(context context.Context, request *v1.MountVolumeRequest, opts ...grpc.CallOption) (*v1.MountVolumeResponse, error) { + return w.client.MountVolume(context, request, opts...) +} + +func (w *Client) ResizeVolume(context context.Context, request *v1.ResizeVolumeRequest, opts ...grpc.CallOption) (*v1.ResizeVolumeResponse, error) { + return w.client.ResizeVolume(context, request, opts...) +} + +func (w *Client) UnmountVolume(context context.Context, request *v1.UnmountVolumeRequest, opts ...grpc.CallOption) (*v1.UnmountVolumeResponse, error) { + return w.client.UnmountVolume(context, request, opts...) +} + +func (w *Client) WriteVolumeCache(context context.Context, request *v1.WriteVolumeCacheRequest, opts ...grpc.CallOption) (*v1.WriteVolumeCacheResponse, error) { + return w.client.WriteVolumeCache(context, request, opts...) +} diff --git a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2/client_generated.go b/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2/client_generated.go deleted file mode 100644 index a558a042ac..0000000000 --- a/vendor/github.com/kubernetes-csi/csi-proxy/client/groups/volume/v1beta2/client_generated.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by csi-proxy-api-gen. DO NOT EDIT. - -package v1beta2 - -import ( - "context" - "net" - - "github.com/Microsoft/go-winio" - "github.com/kubernetes-csi/csi-proxy/client" - "github.com/kubernetes-csi/csi-proxy/client/api/volume/v1beta2" - "github.com/kubernetes-csi/csi-proxy/client/apiversion" - "google.golang.org/grpc" -) - -const groupName = "volume" - -var version = apiversion.NewVersionOrPanic("v1beta2") - -type Client struct { - client v1beta2.VolumeClient - connection *grpc.ClientConn -} - -// NewClient returns a client to make calls to the volume API group version v1beta2. -// It's the caller's responsibility to Close the client when done. -func NewClient() (*Client, error) { - pipePath := client.PipePath(groupName, version) - - connection, err := grpc.Dial(pipePath, - grpc.WithContextDialer(func(context context.Context, s string) (net.Conn, error) { - return winio.DialPipeContext(context, s) - }), - grpc.WithInsecure()) - if err != nil { - return nil, err - } - - client := v1beta2.NewVolumeClient(connection) - return &Client{ - client: client, - connection: connection, - }, nil -} - -// Close closes the client. It must be called before the client gets GC-ed. -func (w *Client) Close() error { - return w.connection.Close() -} - -// ensures we implement all the required methods -var _ v1beta2.VolumeClient = &Client{} - -func (w *Client) DismountVolume(context context.Context, request *v1beta2.DismountVolumeRequest, opts ...grpc.CallOption) (*v1beta2.DismountVolumeResponse, error) { - return w.client.DismountVolume(context, request, opts...) -} - -func (w *Client) FormatVolume(context context.Context, request *v1beta2.FormatVolumeRequest, opts ...grpc.CallOption) (*v1beta2.FormatVolumeResponse, error) { - return w.client.FormatVolume(context, request, opts...) -} - -func (w *Client) GetVolumeDiskNumber(context context.Context, request *v1beta2.VolumeDiskNumberRequest, opts ...grpc.CallOption) (*v1beta2.VolumeDiskNumberResponse, error) { - return w.client.GetVolumeDiskNumber(context, request, opts...) -} - -func (w *Client) GetVolumeIDFromMount(context context.Context, request *v1beta2.VolumeIDFromMountRequest, opts ...grpc.CallOption) (*v1beta2.VolumeIDFromMountResponse, error) { - return w.client.GetVolumeIDFromMount(context, request, opts...) -} - -func (w *Client) IsVolumeFormatted(context context.Context, request *v1beta2.IsVolumeFormattedRequest, opts ...grpc.CallOption) (*v1beta2.IsVolumeFormattedResponse, error) { - return w.client.IsVolumeFormatted(context, request, opts...) -} - -func (w *Client) ListVolumesOnDisk(context context.Context, request *v1beta2.ListVolumesOnDiskRequest, opts ...grpc.CallOption) (*v1beta2.ListVolumesOnDiskResponse, error) { - return w.client.ListVolumesOnDisk(context, request, opts...) -} - -func (w *Client) MountVolume(context context.Context, request *v1beta2.MountVolumeRequest, opts ...grpc.CallOption) (*v1beta2.MountVolumeResponse, error) { - return w.client.MountVolume(context, request, opts...) -} - -func (w *Client) ResizeVolume(context context.Context, request *v1beta2.ResizeVolumeRequest, opts ...grpc.CallOption) (*v1beta2.ResizeVolumeResponse, error) { - return w.client.ResizeVolume(context, request, opts...) -} - -func (w *Client) VolumeStats(context context.Context, request *v1beta2.VolumeStatsRequest, opts ...grpc.CallOption) (*v1beta2.VolumeStatsResponse, error) { - return w.client.VolumeStats(context, request, opts...) -} - -func (w *Client) WriteVolumeCache(context context.Context, request *v1beta2.WriteVolumeCacheRequest, opts ...grpc.CallOption) (*v1beta2.WriteVolumeCacheResponse, error) { - return w.client.WriteVolumeCache(context, request, opts...) -} diff --git a/vendor/golang.org/x/net/html/parse.go b/vendor/golang.org/x/net/html/parse.go index f91466f7cd..038941d708 100644 --- a/vendor/golang.org/x/net/html/parse.go +++ b/vendor/golang.org/x/net/html/parse.go @@ -663,6 +663,24 @@ func inHeadIM(p *parser) bool { // Ignore the token. return true case a.Template: + // TODO: remove this divergence from the HTML5 spec. + // + // We don't handle all of the corner cases when mixing foreign + // content (i.e. or ) with